# What is the derivative of f(x)=tan(ln(cosx))?

Nov 10, 2015

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

#### Explanation:

So we have

$y = \tan \left(\ln \left(\cos \left(x\right)\right)\right)$

Let's say that $\ln \left(\cos \left(x\right)\right) = u$, so we have

$y = \tan \left(u\right)$

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{du}} \tan \left(u\right) \frac{\mathrm{du}}{\mathrm{dx}}$
dy/dx = sec^2(u)d/dx(ln(cos(x))

Let's say that $\cos \left(x\right) = v$, so we have

$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} \left(u\right) \frac{d}{\mathrm{dv}} \ln \left(v\right) \frac{\mathrm{dv}}{\mathrm{dx}}$
$\frac{\mathrm{dy}}{\mathrm{dx}} = {\sec}^{2} \frac{u}{v} \frac{d}{\mathrm{dx}} \cos \left(x\right)$
$\frac{\mathrm{dy}}{\mathrm{dx}} = - \frac{{\sec}^{2} \left(u\right) \sin \left(x\right)}{v}$

Putting everything in terms of $x$

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