Concavity Theorem:

If the function is twice differentiable at , then the graph of is concave upward at

if and concave downward if

Now we know that:

To find the concavity we take the second derivative of the function, equal it to zero and find the values of . Those values of are the points(inflection points) where concavity changes.

So:

So the function changes concavity times where within the interval .

You can see the plot of the function here:

plot x^2 + 5cos(x), x = 0 to 720 degree - Wolfram|Alpha