# Let $f(x)= (\sin x)^x$ Find $f'(\frac{\pi}{2})$

I'm not sure if I derived it right. So, Let $$f(x)$$ = $$(\sin x)^x$$. $$f' = x(\cos x)$$ right? then just substitute so $$f' = \frac{\pi}{2}(\cos\frac{\pi}{2})$$ ? Since $$\cos(180°)$$ is equal to $$-1$$. Then its -$$\frac{\pi}{2}$$? they said it's wrong.

after reading all the comments I arrived with $$f'$$ = $$(\sin x)^x$$ $$\frac{\sin x\ln(\sin x) + x\cos x}{\sin x}$$ then substitute $$\frac{\pi}{2}$$ to x so that's $$90 \deg$$ $$\cos90$$ is $$0$$ and $$\sin90\deg$$ is $$1$$ so $$1$$ raised to $$90\deg$$ then $$\frac {(1)(1)+0}{1}$$ my final answer is now $$\frac{\pi}{2}$$ which is in the multiple choice. But is it correct?

• Is this function differentiable? Isn't the function discontinuous at 0? Oct 12, 2014 at 9:17
• @kart I'm not I just answered this in a quiz and I got zero. I just applied the log. differentiation then substitute $90deg.$ to all x Oct 12, 2014 at 9:19

Given that the problem asks for the value of $f'$ at a specific point, rather than for a general formula for $f'$, we might look for a simple solution involving geometry, rather than differentiation rules.

Note that $0\leq\sin(x)\leq1$ on $[0,\pi]$, thus $f(x)=(\sin(x))^x$ is also between $0$ and $1$ on that interval. Furthermore, $f(\pi/2) = 1$. Thus, $f$ has a maximum at $\pi/2$ so that $f'(\pi/2)=0$.

Admittedly, I came up with this explanation after noticing that the answer was zero. Such a simple answer, though, only begs the question further - namely, is there a simple geometric explanation.

No, $f'(x)$ is not $x\cos x$. To find $f'$, first take natural logarithm of both sides of the definition of $f$: $$\ln(f(x)) = \ln\left((\sin x)^x\right)=x\ln(\sin x)$$ Then take the derivative of both sides of the above equation. The left side becomes $\frac{f'(x)}{f(x)}=\frac{f'(x)}{(\sin x)^x}$, so this allows you to solve for what $f'(x)$ is.

• What if $\sin x < 0$ ? Oct 12, 2014 at 8:58
• so the answer is $f'$ = $\frac{xcosxsinx^x}{sinx}$ ? Oct 12, 2014 at 9:02
• @Mickey Not quite. I think you made a mistake computing the derivative of the right hand side, $x\ln\sin x$. Be careful in your use of product rule/chain rule. Oct 12, 2014 at 9:07
• @ZhenZhang $f(x)$ is not a real-valued function when $\sin x<0$; for example, $f(-1/2)=1/\sqrt{\sin(-1/2)}$ is not real. In these cases, the method still works, but you have to use a complex branch of $\log$. Oct 12, 2014 at 9:10
• @mike hmm um i think this is it $f'$ = $(sinx)^x$ $\frac{sinxln(sinx)+xcosx}{sinx}$ product rule my bad Oct 12, 2014 at 9:11
• Try to avoid link only answers :) Oct 12, 2014 at 8:55
• @TheGame That is a hint for the answer so that the OP can work on it.
– C.S.
Oct 12, 2014 at 8:56
• @s.c. so the answer is $f'$ = $\frac{xcosxsinx^x}{sinx}$ ? Oct 12, 2014 at 9:04
• @TheGame: it is not simply a link, it is suggested to take the log and even if you don't follow the link, differentiation is indicated.
– robjohn
Oct 12, 2014 at 9:33
• @S.C.: when giving a hint, it is a good idea to explicitly state that so that others know it is a hint. Hints seem to be judged differently than full answers.
– robjohn
Oct 12, 2014 at 9:34

$f'(x) = xsin(x)^{x-1}*cos(x) + (sin(x))^{x}*ln(sin(x))$ Now $f'(pi/2)$ is the limit as x goes to 0 of $f'(x)$. The first term is 0 and $sin(x)^{x}$ is 1 when x approaches 0. Therefore $f'(pi/2)$ is lim as x -> 0 of $ln(sin(x))$ which is $-\infty$.

• this might help you :) Oct 12, 2014 at 9:24

Starting with $f(x)=\sin(x)^x$ note that $\ln|f(x)|=x\ln|\sin(x)|$ (the absolute values solve negativity problems) and the derivative of this is $$\frac{f'(x)}{f(x)}=\ln|\sin(x)|+\frac {x\cos(x)}{\sin(x)}$$

Plugging in $x=\frac\pi2$, we get $$f'\left(\frac\pi2\right)=0$$

use that $f(x)=(\sin(x))^x=e^{x\ln(\sin(x))}$ thus we get $f'(x)=e^{x\ln(\sin(x))}(\ln(\sin(x))+x\frac{\cos(x)}{\sin(x)})$

• $a^b=e^{b\ln(a)}$ Oct 12, 2014 at 8:54
• Oh, that's not right
– robjohn
Oct 12, 2014 at 9:12
• what do you mean? Oct 12, 2014 at 9:13
• it is right, take the logarithm of both sides Oct 12, 2014 at 9:14
• $(\sin(x))^x=e^{x\log(\sin(x))}$
– robjohn
Oct 12, 2014 at 9:20