# Finding the derivative via implicit differentiation of an exponent?

Am I doing this one correct. Wolfram Alpha says otherwise but I'm not sure where I go wrong:

$$y = x^{\sin (x)}$$

Wolfram alpha says the derivative is:

$$y'(x) = x^{(\sin(x) - 1)} \cdot (\sin(x) + x \cdot \log(x) \cdot \cos(x))$$

But here are my calcs:

$$\ln y = \sin(x) \cdot \ln(x)$$

$$\frac{1}{y} \cdot \frac{dy}{dx} = \frac{\sin(x)}{x} + \ln(x)\cos(x)$$

$$\frac{dy}{dx} = x^{\sin(x)} \cdot \left(\frac{\sin(x)}{x} + \ln(x)\cos(x)\right)$$

• the way you did it is fine; in fact, i quite like it (i usually use exponents instead of logs to get the same outcome) – MichaelChirico Feb 12 '18 at 2:53

You have the same answer since

$$x^{\sin(x)}\left(\frac{\sin(x)}{x}+\cos(x)\log(x)\right)=x^{\sin(x)-1}\left(\sin(x)+x\log(x)\cos(x)\right)$$ multiply the bracket by $x$ and $x^{\sin(x)}$ by $\frac1x$

• sorry, can you clarify? Can you take me from the left to the right? – Jwan622 Feb 11 '18 at 22:11
• I'm having trouble seeing how x^{sin(x)} goes to x^{sin(x) -1} – Jwan622 Feb 11 '18 at 22:12
• $x^a \times \frac1x = x^{a-1}$. Meanwhile $\frac{b}{x} \times x= b$ and $c\times x= xc$. So $x^{a}\left(\frac b x +c\right)= x^{a-1}(b+xc)$ – Henry Feb 11 '18 at 22:13
• ohhhh because $\frac{1}{x}$ is $x^{-1}$... – Jwan622 Feb 11 '18 at 22:15

Note that the two expression are equal, indeed

$$x^{(\sin x - 1)}=x^{\sin x}\cdot x^{-1}$$

and thus

$$y'(x) = x^{(\sin x - 1)} \cdot (\sin x + x \cdot \log x \cdot \cos x )= x^{\sin x } \cdot\frac1x (\sin x + x \cdot \log x \cdot \cos x)$$

• sorry, can you clarify? Can you take me from the left to the right? – Jwan622 Feb 11 '18 at 22:12
• @Jwan622 simply note that the result is the same, indeed for algebraic exponential rules $x^{(\sin x - 1)}=x^{\sin x}\cdot x^{-1}$ – user Feb 11 '18 at 22:14
• @Jwan622 sorry I thought it was clear! – user Feb 11 '18 at 22:16

$$y=x^{\sin(x)}$$ Take the logarithm of both sides: $$\log(y)=\sin(x)\log(x)$$ Now differentiate both sides with respect to $x$: $$\frac{y'}{y}=\frac{\sin(x)}{x}+\cos(x)\log(x)$$ $$y'=y*\left(\frac{\sin(x)}{x}+\cos(x)\log(x)\right)$$ $$y'=x^{\sin(x)}\left(\frac{\sin(x)}{x}+\cos(x)\log(x)\right)$$ WolframAlpha's answer: $$y'=x^{\sin(x)-1}\left(\sin(x)+x\log(x)\cos(x)\right)$$ $$y'=\frac{x^{\sin(x)}}{x^1}\left(\sin(x)+x\log(x)\cos(x)\right)$$ $$y'=x^{\sin(x)}\left(\frac{\sin(x)}{x}+\frac{\log(x)\cos(x)x}{x}\right)$$ So both of the answers are the same.

• is the derivative of log(x) really 1/x? – Jwan622 Feb 11 '18 at 22:16
• @Jwan622 Yes, the derivate of $\log_e(x)$ is $\frac{1}{x}$. $\log_e(x)=\log(x)=\ln(x)$. But sometimes $\log(x)$ means $\log_{10}(x)$, but it's base $e$ here. – Botond Feb 11 '18 at 22:44
• thanks for the clarification. – Jwan622 Feb 11 '18 at 23:29

Use the general formula

$$\frac{d}{dx} f(x)^{g(x)} = f(x)^{g(x)}\left(g'(x)\ln(f(x)) + g(x)\frac{f'(x)}{f(x)}\right)$$

• Are you deriving this formula every time you use it, or you can keep it in your mind? – Botond Feb 11 '18 at 21:49
• I have it in my mind, it's simple because $f^g = e^{g \ln(f)}$ hence it's about deriving an exponential. It's easy to derive and remember! – Von Neumann Feb 11 '18 at 21:50
• It might be because of my bad memory, but I find it easier to derive than remember. – Botond Feb 11 '18 at 21:55
• @Botond Both methods are fine! If you don't remember, derive it! :D (pun intended) – Von Neumann Feb 11 '18 at 21:58
• @Botond Remembering this is easy. First, take the derivative assuming $g$ is constant, then take the derivative assuming $f$ is constant. Now add the two! (I have no idea why this works, but it does.) – Theoretical Economist Feb 12 '18 at 1:38