# How do you find the derivative of y = x^(cos x)?

Jan 16, 2016

For a function that involves a variable base to a variable exponent, we usually need some form of logarithmic differentiation.

#### Explanation:

$y = {x}^{\cos} x$

Method 1

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

Now differentiate implicitly:

$\frac{1}{y} \frac{\mathrm{dy}}{\mathrm{dx}} = - \sin x \ln x + \cos \frac{x}{x}$

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

Method 2

$y = {e}^{\ln} \left({x}^{\cos} x\right) = {e}^{\cos x \ln x}$

$\frac{\mathrm{dy}}{\mathrm{dx}} = {e}^{\cos x \ln x} \frac{d}{\mathrm{dx}} \left(\cos x \ln x\right)$ (we just did this derivative above)

$= {e}^{\cos x \ln x} \left(\cos \frac{x}{x} - \sin x \ln x\right)$

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