# How do you find the derivative of f(x) = tan(sinx)?

Dec 20, 2016

Let $y = \tan u$ and $u = \sin x$. To apply the chain rule, we must differentiate both.

I'll start by showing you $u = \sin x$ using first principles so that you get an understanding of how this works.

$u ' = {\lim}_{h \to 0} \frac{f \left(x + h\right) - f \left(x\right)}{h}$

Use the sum expansion formula $\sin \left(A + B\right) = \sin A \cos B + \cos A \sin B$.

$u ' = {\lim}_{h \to 0} \frac{\sin \left(x + h\right) - \sin x}{h}$

$u ' = {\lim}_{h \to 0} \frac{\cos x \sin h - \sin x + \sin x \cos h}{h}$

$u ' = {\lim}_{h \to 0} \frac{\cos x \sin h - \sin x \left(1 - \cos h\right)}{h}$

$u ' = \text{ } \cos x \cdot {\lim}_{h \to 0} \sin \frac{h}{h} - \sin x \cdot {\lim}_{h \to 0} \frac{1 - \cos h}{h}$

We use the two well known limits ${\lim}_{x \to 0} \sin \frac{x}{x} = 1 \mathmr{and} \frac{1 - \cos x}{x} = 0$ to evaluate.

$u ' = \cos x \cdot 1 - \sin x \cdot 0$

$u ' = \cos x$

A similar process can be used to obtain the derivative of cosine.

Meanwhile, $y = \tan u$ can be written as $y = \sin \frac{u}{\cos} u$. This function, being of the form $f \left(x\right) = \frac{g \left(x\right)}{h \left(x\right)}$, can be differentiated using the quotient rule, where color(magenta)(f'(x) = (g'(x) xx h(x)- g(x) xx h'(x))/(h(x))^2.

You will find the derivative of $\cos x$ to be $- \sin x$. Hence,

$y ' = \frac{\cos u \times \cos u - \left(\sin u \times - \sin u\right)}{\cos u} ^ 2$

Use the pythagorean identity ${\cos}^{2} \theta + {\sin}^{2} \theta = 1$:

$y ' = \frac{{\cos}^{2} u + {\sin}^{2} u}{\cos} ^ 2 u$

$y ' = \frac{1}{\cos} ^ 2 u$

Use the identity $\frac{1}{\cos} \theta = \sec \theta$:

$y ' = {\sec}^{2} u$

Finally, we must determine the derivative of the entire function using the chain rule. This states that $\textcolor{m a \ge n t a}{\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \times \frac{\mathrm{du}}{\mathrm{dx}}}$.

$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} u \times \cos x$

$\frac{\mathrm{dy}}{\mathrm{dx}} = \cos x {\sec}^{2} \left(\sin x\right)$

Hopefully this helps!