How do you differentiate f(x)=ln(tanx) using the chain rule?

Dec 8, 2015

$\frac{1}{\tan \left(x\right) \cdot {\cos}^{2} \left(x\right)} = \csc \left(x\right) \sec \left(x\right)$

Explanation:

You need the chain rule for composite functions, and the rule states that

$\frac{d}{\mathrm{dx}} f \left(g \left(x\right)\right) = f ' g \left(x\right) \cdot g ' \left(x\right)$

So, you differentiate the outer function, leaving its argument untouched, and then you multiply by the derivative of the inner function.

In your case, the outer function is $f \left(x\right) = \ln \left(x\right)$, and the inner function is $g \left(x\right) = \tan \left(x\right)$

So, the derivative of the outer function is $\frac{d}{\mathrm{dx}} \ln \left(x\right) = \frac{1}{x}$, so

$f ' \left(g \left(x\right)\right) = \frac{1}{\tan} \left(x\right)$.

On the other hand, the derivative of $\tan \left(x\right)$ is $\frac{1}{\cos} ^ 2 \left(x\right)$.

So,

$f ' g \left(x\right) \cdot g ' \left(x\right) = \frac{1}{\tan} \left(x\right) \cdot \frac{1}{\cos} ^ 2 \left(x\right) = \frac{1}{\tan \left(x\right) \cdot {\cos}^{2} \left(x\right)}$

And since $\tan \left(x\right) = \sin \frac{x}{\cos} \left(x\right)$, we have that

$\tan \left(x\right) \cdot {\cos}^{2} \left(x\right) = \sin \left(x\right) \cos \left(x\right)$, and so the derivative becomes

$\frac{1}{\sin \left(x\right) \cos \left(x\right)} = \csc \left(x\right) \sec \left(x\right)$