Prove that a function is differentiable everywhere using the limit definition of a derivative

I have thw function $$f(x) = (e^x+x^4)\cos(-2x)$$ which is defined for all $x \in \mathbb{R}$.

How do I prove it's differentiable for all x using the limit definition? I'm neither getting conclusive results with $$\lim_{h\to 0} \frac{f(x+h) - f(x)}{h}$$ nor with $$\lim_{x\to x_0} \frac{f(x) - f(x_0)}{x-x_0}$$ when I plug in the function for $f(x)$ and try to rearrange anf simplify it.

What am I missing?

Any help would be appreciated, thanks!

Edit: Is the trick here to Show that all 4 'partial' functions are differentiable on $\mathbb{R}$, thus making the composition of them differentiable in $\mathbb{R}$ as well?

• @MikkoPesonen How do you get Taylor series if you don't even know whether the function is differentiable or not. – Fan May 16 '17 at 15:22
• @MikkoPesonen This problem was asked before the introduction of taylor series, so it must be solveable without it. – Skydiver May 16 '17 at 15:23
• The rules of differentiation exist for very good reasons. Why do you want to use the limit to prove the function is differentiable? – Umberto P. May 16 '17 at 15:25
• You should have a review of the derivation of $(fg)'=f'g+fg'$ – Fan May 16 '17 at 15:25
• @Fan I know how to differentiate it, but I have to prove that it's differentiable at all. – Skydiver May 16 '17 at 15:27

HINT: we have $$\frac{f(x)-f(x_o)}{x-x_o}=\frac{(e^x+x^4)\cos(-2x)-(e^{x_0}+x_0^4)\cos(-2x_0)}{x-x_0}$$ and use $$\cos(-x)=\cos(x)$$

I think this takes multiple applications of the product trick: If you need to work with $ab-cd$, it sometimes helps to transition from one product to the other one factor at a time:

$$ab - cd = ab -cb + cb -cd = (a-c)b + c(b-d).$$

You can multiply your function out and treat each sum separately. I'll do the first:

$$\frac{e^{x+h}\cos(-2(x+h)) - e^x\cos(-2x)}{h}$$

$$= \frac{e^{x+h}\cos(-2(x+h)) -e^{x}\cos(-2(x+h)) + e^{x}\cos(-2(x+h)-e^x\cos(-2x) }{h}$$

$$= \frac{\cos(-2(x+h))(e^{x+h}-e^x)}{h} + \frac{e^x(\cos(-2(x+h))-\cos(-2x))}{h}$$

You get two more, similar terms for the $x^4$ part. When you take the limit, everything works out swell.