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

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

#### Explanation:

Take the logarithm of both sides $y = {x}^{\cos x}$

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

differentiate both sides of the equation

$\frac{1}{y} \cdot y ' = \cos x \cdot \frac{1}{x} \cdot 1 + \ln x \cdot \left(- \sin x\right)$

$y ' = y \cdot \left(\cos \frac{x}{x} - \sin x \cdot \ln x\right)$

replace $y$ by its equivalent

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