# How do you differentiate 5cos (2x)+ tan(3x+4)?

Jun 2, 2015

Let $f \left(u \left(x\right)\right) = 5 \cos \left(2 x\right) + \tan \left(3 x + 4\right)$.

For this, you would have to remember the following two derivatives:

$\left(\frac{d}{\mathrm{dx}}\right) \left[\cos u\right] = - \sin u \frac{\mathrm{du} \left(x\right)}{\mathrm{dx}}$
$\left(\frac{d}{\mathrm{dx}}\right) \left[\tan u\right] = {\sec}^{2} u \frac{\mathrm{du} \left(x\right)}{\mathrm{dx}}$

since as you can see, $\frac{\mathrm{df} \left(u \left(x\right)\right)}{\mathrm{dx}} = \frac{\mathrm{df} \left(u \left(x\right)\right)}{\cancel{\mathrm{du} \left(x\right)}} \cdot \frac{\cancel{\mathrm{du} \left(x\right)}}{\mathrm{dx}}$

where $u \left(x\right) = 2 x$ or $u \left(x\right) = 3 x + 4$, in this case, for example. That just explains why the chain rule works how it works.

So, we get:

$\left(\frac{d}{\mathrm{dx}}\right) \left[5 \cos \left(2 x\right) + \tan \left(3 x + 4\right)\right]$

$= 5 \cdot - \sin \left(2 x\right) \cdot 2 + {\sec}^{2} \left(3 x + 4\right) \cdot 3$

$= - 10 \sin \left(2 x\right) + 3 {\sec}^{2} \left(3 x + 4\right)$

Other ways you might see the chain rule:

In "prime" notation:

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

or in "function composition" notation:

$\left[f \left(x\right) \circ u \left(x\right)\right] ' = \left[f ' \left(x\right) \circ u \left(x\right)\right] \cdot u ' \left(x\right)$

Jun 2, 2015

I would use the Chain Rule in both terms as:
$y ' = - 5 \sin \left(2 x\right) \cdot 2 + \frac{1}{{\cos}^{2} \left(3 x + 4\right)} \cdot 3 =$
$= - 10 \sin \left(2 x\right) + \frac{3}{{\cos}^{2} \left(3 x + 4\right)}$

Where the Chain Rule allows you to derive $y = f \left(g \left(x\right)\right)$ as:
$y ' = f ' \left(g \left(x\right)\right) \cdot g ' \left(x\right)$