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

Jun 25, 2018

$\frac{d}{\mathrm{dx}} \left({x}^{\sin} x\right) = {x}^{\sin} x \left(\cos x \log x + \sin \frac{x}{x}\right)$ where $\log x$ is the natural logarithm.

#### Explanation:

Let $y = {x}^{\sin} x$. We will use logarithmic differentiation to calculate $\frac{\mathrm{dy}}{\mathrm{dx}}$.
$\log y = \log \left({x}^{\sin} x\right)$
$\log y = \sin x \log x$
Now, differentiating both sides with respect to $x$, we have
$\frac{d}{\mathrm{dx}} \left(\log y\right) = \frac{d}{\mathrm{dx}} \left(\sin x \log x\right)$

To compute the left side, remember the chain rule:
$y = f \left(g \left(x\right)\right) \iff \frac{\mathrm{dy}}{\mathrm{dx}} = f ' \left(g \left(x\right)\right) g ' \left(x\right)$. Letting $f \left(x\right) = \log x$ and $g \left(x\right) = y$, the left side becomes $\frac{d}{\mathrm{dx}} \left(\log y\right) = \frac{1}{y} \frac{\mathrm{dy}}{\mathrm{dx}}$.
$\therefore \frac{1}{y} \frac{\mathrm{dy}}{\mathrm{dx}} = \frac{d}{\mathrm{dx}} \left(\sin x \log x\right)$

To differentiate $\sin x \log x$, remember the product rule:
$y = f \left(x\right) g \left(x\right) \iff \frac{\mathrm{dy}}{\mathrm{dx}} = f ' \left(x\right) g \left(x\right) + g ' \left(x\right) f \left(x\right)$
$\therefore \frac{1}{y} \frac{\mathrm{dy}}{\mathrm{dx}} = \cos x \log x + \sin \frac{x}{x}$

Multiplying through by $y$, we have
$\frac{\mathrm{dy}}{\mathrm{dx}} = y \left(\cos x \log x + \sin \frac{x}{x}\right)$
Remembering that we defined $y = {x}^{\sin} x$, we get
$\frac{\mathrm{dy}}{\mathrm{dx}} = {x}^{\sin} x \left(\cos x \log x + \sin \frac{x}{x}\right)$