Find and classify the relative maxima and minima of f(x) if f(x)= defint a=0 b=x

function= t^2-4/(1+cos(x)^2) dt

x^2-4/(1+cos(x)^2)= 0
x^2-4=0
x^2=4
x= +/- 2

So I got relative maximum as -2 and 2. And relative minimum as zero. However, when I graph it on Wolfram, it gives me more maxima like +/-4.99, +/-7.999, etc. How did they get those values? Can someone please explain that to me? Thank you for your time.

Ah. I see the error. We have a function of x and t, not just t. So,

df/dx = f(x,x) + ∫[a,x] ∂/∂x (t^2-4)/(1+cos(x)^2) dt
= x^2-4/(1+cos(x)^2) + ∫[0,x] (t^2-4)sin2x/(1+cos(x)^2)^2 dt
= x^2-4/(1+cos(x)^2) + (1/3 t^3 - 4t)sin2x/(1+cos(x)^2)^2 [0,x]
= x^2-4/(1+cos(x)^2) + x(x^2-12)sin2x / 3(1+cos(x)^2)^2

Now, since the denominator is never zero, we want

3(x^2-4)(1+cos(x)^2) + x(x^2-12)sin2x = 0

Well, I don't get ±5,±8 as you did. How did you get wolfram to evaluate that?