# Is f(x) =sinx-x^2 concave or convex at x=pi/3?

Since the function is twice differentiable, the answer depends on whether the second derivative $f ' ' \left(\frac{\pi}{3}\right)$ is positive or negative
Let's calculate the $f ' ' \left(x\right)$. First $f ' \left(x\right) = \cos x - 2 x$, then $f ' ' \left(x\right) = - \sin x - 2$. So, $f ' ' \left(\frac{\pi}{3}\right) = - \sin \left(\frac{\pi}{3}\right) - 2$.
But $\sin \left(\frac{\pi}{3}\right) = \frac{\sqrt{3}}{2}$, and then $f ' ' \left(\frac{\pi}{3}\right) = - \sin \left(\frac{\pi}{3}\right) - 2 = - \frac{\sqrt{3}}{2} - 2$, which is negative. Thus, since $f ' ' \left(\frac{\pi}{3}\right) < 0$, the function is concave downward (convex)