# What is the derivative of (cos x)^(sin x)?

##### 1 Answer
Nov 27, 2016

Let $y = {\left(\cos x\right)}^{\sin} x$.

Then $\ln y = \ln {\left(\cos x\right)}^{\sin} x$.

We apply the laws of logarithms to simplify as follows:

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

We now use the chain rule to differentiate $\ln \left(\cos x\right)$.

Letting $y = \ln u$ and $u = \cos x$, we have

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{\mathrm{dy}}{\mathrm{du}} \times \frac{\mathrm{du}}{\mathrm{dx}}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = \frac{1}{u} \times - \sin x$

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \sin \frac{x}{\cos} x$

$\frac{\mathrm{dy}}{\mathrm{dx}} = - \tan x$

Differentiating the entire function now with a combination of implicit differentiation and the product rule, we have:

$\frac{1}{y} \left(\frac{\mathrm{dy}}{\mathrm{dx}}\right) = \cos x \times \ln \left(\cos x\right) + \sin x \times - \tan x$

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

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

Hopefully this helps!