2
$\begingroup$

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)$$

$\endgroup$
  • $\begingroup$ 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) $\endgroup$ – MichaelChirico Feb 12 '18 at 2:53
2
$\begingroup$

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$

$\endgroup$
  • $\begingroup$ sorry, can you clarify? Can you take me from the left to the right? $\endgroup$ – Jwan622 Feb 11 '18 at 22:11
  • $\begingroup$ I'm having trouble seeing how x^{sin(x)} goes to x^{sin(x) -1} $\endgroup$ – Jwan622 Feb 11 '18 at 22:12
  • 1
    $\begingroup$ $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)$ $\endgroup$ – Henry Feb 11 '18 at 22:13
  • $\begingroup$ ohhhh because $\frac{1}{x}$ is $x^{-1}$... $\endgroup$ – Jwan622 Feb 11 '18 at 22:15
3
$\begingroup$

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)$$

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

$$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.

$\endgroup$
  • $\begingroup$ is the derivative of log(x) really 1/x? $\endgroup$ – Jwan622 Feb 11 '18 at 22:16
  • 2
    $\begingroup$ @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. $\endgroup$ – Botond Feb 11 '18 at 22:44
  • $\begingroup$ thanks for the clarification. $\endgroup$ – Jwan622 Feb 11 '18 at 23:29
0
$\begingroup$

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)$$

$\endgroup$
  • 1
    $\begingroup$ Are you deriving this formula every time you use it, or you can keep it in your mind? $\endgroup$ – Botond Feb 11 '18 at 21:49
  • 1
    $\begingroup$ 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! $\endgroup$ – Von Neumann Feb 11 '18 at 21:50
  • 4
    $\begingroup$ It might be because of my bad memory, but I find it easier to derive than remember. $\endgroup$ – Botond Feb 11 '18 at 21:55
  • 2
    $\begingroup$ @Botond Both methods are fine! If you don't remember, derive it! :D (pun intended) $\endgroup$ – Von Neumann Feb 11 '18 at 21:58
  • $\begingroup$ @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.) $\endgroup$ – Theoretical Economist Feb 12 '18 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.