Consider the following:
\(\displaystyle f(x)=(g(x))^{h(x)}\)
Take the natural log of both sides:
\(\displaystyle \ln(f(x))=h(x)\ln(g(x))\)
Implicitly differentiate:
\(\displaystyle \frac{1}{f(x)}\d{f}{x}=\frac{h(x)}{g(x)}+\d{h}{x}\ln(g(x))\)
\(\displaystyle \d{f}{x}=f(x)\left(\frac{h(x)}{g(x)}+\d{h}{x}\ln(g(x))\right)\)
\(\displaystyle \d{f}{x}=(g(x))^{h(x)}\left(\frac{h(x)}{g(x)}+\d{h}{x}\ln(g(x))\right)\)
In the given problem, we have:
\(\displaystyle f(x)=y,\,g(x)=\sin(x),\,h(x)=x\)
And so:
\(\displaystyle \d{y}{x}=\left(\sin(x)\right)^{x}\left(\frac{x}{\sin(x)}+\ln(\sin(x))\right)\)