# How do you differentiate  y =-2e^(xcosx) using the chain rule?

##### 1 Answer
Jun 6, 2017

The answer is -2${e}^{x \cos x}$$\cos x - x \sin x$.

#### Explanation:

The $\frac{d}{\mathrm{dx}}$ of ${e}^{x}$ is always itself.

Now that we know this we move forward the trick here is that we take the $\frac{d}{\mathrm{dx}}$ of ${e}^{x}$ then we apply the chain rule to ${e}^{x \cos x}$ we take the $\frac{d}{\mathrm{dx}}$ of the inside $x \cos x$. Here we apply the product rule ${f}^{1} \left(g\right)$ x ${g}^{1} \left(f\right)$ the $\frac{d}{\mathrm{dx}}$ of this is $\cos x - x \sin x$. Our final answer is -2${e}^{x \cos x}$$\cos x - x \sin x$. We don't take the 2 into account because its a constant.