# If f(x) =xe^x and g(x) = sin3x , what is f'(g(x)) ?

Jan 11, 2016

I think you meant to write this as: what is $\left(f \left(g \left(x\right)\right)\right) '$? (or $\frac{d}{\mathrm{dx}} \left(f \left(g \left(x\right)\right)\right)$?...since it's supposed to be a Chain Rule problem). In that case, the answer is

$3 {e}^{\sin \left(3 x\right)} \cos \left(3 x\right) + 3 {e}^{\sin \left(3 x\right)} \cos \left(3 x\right) \sin \left(3 x\right)$.

#### Explanation:

Let $h \left(x\right) = f \left(g \left(x\right)\right) = {e}^{\sin \left(3 x\right)} \sin \left(3 x\right)$. We want to find $h ' \left(x\right) = \left(f \left(g \left(x\right)\right)\right) ' = \frac{d}{\mathrm{dx}} \left(f \left(g \left(x\right)\right)\right)$.

The Chain Rule says that $h ' \left(x\right) = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)$.

In this case, the Product Rule gives
$f ' \left(x\right) = {e}^{x} + x {e}^{x}$ and we also know (by the Chain Rule again), that $g ' \left(x\right) = \cos \left(3 x\right) \cdot \frac{d}{\mathrm{dx}} \left(3 x\right) = 3 \cos \left(3 x\right)$.

$h ' \left(x\right) = 3 {e}^{\sin \left(3 x\right)} \cos \left(3 x\right) + 3 {e}^{\sin \left(3 x\right)} \cos \left(3 x\right) \sin \left(3 x\right)$.