# If f(x)= cos3x  and g(x) = sqrt(x+3 , how do you differentiate f(g(x))  using the chain rule?

Feb 25, 2016

$\frac{d \left(f \circ g\right) \left(x\right)}{\mathrm{dx}} = - \frac{3}{2 \sqrt{x + 3}} \sin \left(3 \sqrt{x + 3}\right)$

#### Explanation:

The composition function $\left(f \circ g\right) \left(x\right)$ is found as follows :

$f \left[g \left(x\right)\right] = f \left(\sqrt{x + 3}\right)$

$= \cos \left(3 \sqrt{x + 3}\right)$

$\therefore \frac{d \left(f \circ g\right) \left(x\right)}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \cos \left(3 \sqrt{x + 3}\right)$

$= - \sin \left(3 \sqrt{x + 3}\right) \cdot \frac{3}{2} {\left(x + 3\right)}^{- \frac{1}{2}} \left(1\right)$

$= - \frac{3}{2 \sqrt{x + 3}} \sin \left(3 \sqrt{x + 3}\right)$