# If f(x)= cos 4 x  and g(x) = 2 x , how do you differentiate f(g(x))  using the chain rule?

Jun 18, 2016

$- 8 \sin \left(8 x\right)$

#### Explanation:

The chain rule is stated as:

$\textcolor{b l u e}{\left(f \left(g \left(x\right)\right)\right) ' = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)}$

Let's find the derivative of $f \left(x\right)$ and $g \left(x\right)$

$f \left(x\right) = \cos \left(4 x\right)$
$f \left(x\right) = \cos \left(u \left(x\right)\right)$

We have to apply chain rule on $f \left(x\right)$
Knowing that (cos(u(x))'=u'(x)*(cos'(u(x))

Let $u \left(x\right) = 4 x$
$u ' \left(x\right) = 4$

$f ' \left(x\right) = u ' \left(x\right) \cdot \cos ' \left(u \left(x\right)\right)$

color(blue)(f'(x)=4*(-sin(4x))

$g \left(x\right) = 2 x$
$\textcolor{b l u e}{g ' \left(x\right) = 2}$

Substituting the values on the property above:

$\textcolor{b l u e}{\left(f \left(g \left(x\right)\right)\right) ' = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)}$

(f(g(x)))'=4(-sin(4*(g(x)))*2
$\left(f \left(g \left(x\right)\right)\right) ' = 4 \left(- \sin \left(4 \cdot 2 x\right)\right) \cdot 2$

$\left(f \left(g \left(x\right)\right)\right) ' = - 8 \sin \left(8 x\right)$