Why can't I differentiate $ x^{\sin x} $ using the power rule? 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 $. 
 A: 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$.
A: $(x^k)'=kx^{k-1},$ where $k$ is constant. 
In our case $\sin{x}\neq constant$ and we can not use this rule.
By the way,
$$\left(x^{\sin{x}}\right)'=\left(e^{\sin{x}\ln{x}}\right)'=e^{\sin{x}\ln{x}}(\sin{x}\ln{x})'=...$$
Can you end it now?
A: Because the power rule requires that the exponent be a constant. $\sin x$ is most definitely not a constant.
A: You are trying to use the rule
$$\frac{d}{dx}f(g(x)) = g'(x)f'(g(x))$$
But this rule doesn't apply here, because $x^{\sin x}$ is not just a function of $\sin x$, it is a function of $x$ and $\sin x$.
