Find where the global max and global min of the function occur (on the specified interval).
on the interval [-π,π]
The derivative is
which has a critical point whenever
This occurs when
where k is an integer. Solving,
We want only the critical points in the interval [-π,π]. These would be
Now we evaluate f at lots of places:
The global max occurs at and at . The global min occurs at and at .