Why can’t I differentiate $ x^{\sin x} $ using the power rule

derivatives

I'm trying to differentiate $ x^{\sin x} $, with respect to $ x $ and $x > 0 $. My textbook initiates with $ y = x^{\sin x} $, takes logarithms on both sides and arrives at the answer $$ x^{\sin x – 1}.\sin x + x^{\sin x}.\cos x \ \log x $$

Why can't I use the power rule to proceed like this: $ y' = (\sin x) \ x^{\sin x-1} \cos x $.

Here, I've first differentiated $ x $ with respect to $ \sin x $ and then I've differentiated $ \sin x $ with respect to $ x $ to get $ \cos x $.

Best Answer

The power rule states that the derivative of a function of the form $x^k$ is $kx^{k-1}$ where $k$ is a real number. In your case, $\sin x$ is variable, and can takes values from $-1$ to $+1$, so is not constant.


To prove the power rule, note that $y=x^k\implies \ln y=k\ln x\implies \frac{y'}y=\frac kx\cdot$ via the chain rule. Therefore, $y'=x^k\frac kx=kx^{k-1}$. When $K=\sin x$, we need to do some more to manipulate the RHS, since $(\sin x\ln x)'\ne \frac{\sin x}x$.