Finding the global maxima and minima on closed interval Given a function $f(\theta) = (4\theta-\pi)\sin(\theta)+4\cos(\theta)-2.$ I want to find a value  for $\theta$ in interval $\theta \in [0,\frac{\pi}{2}]$ such that for that value of $\theta$ my function has global maximum and minimum.
I took the derivative of the function which is equal $f'(\theta) = \cos(\theta)(4\theta-\pi)$.
Here i got two critical points which are $\frac{\pi}{4},\frac{\pi}{2}$.
I picked $\frac{\pi}{6}$ at the left of the crictical point $\frac{\pi}{4}$ and $\frac{\pi}{3}$ at the right of the critical point $\frac{\pi}{4}$ to see the behaviour of the function.
It seems that the function is decreasing on the interval $(0,\frac{\pi}{4})$ and increasing on the interval $(\frac{\pi}{4},\frac{\pi}{2})$ but $\frac{\pi}{2}$ is not included because it is also a critical point. I don't know how to deal with this kind of situation?
I tried to find the co-ordinates also and they are 
$f(0) = 2$
$f(\frac{\pi}{2}) = 1.141$
$f(\frac{\pi}{4}) = 0.82$
Is my global max at $(\theta = 0)$ and global min at $(\theta = \frac{\pi}{4})$?

This is right. Just to add something: if you were only asked to look for global extrema, you can relay on Weierstrass theorem, which guarantees that a continuous function on a compact set (in $\mathbb{R}$ this is just the same as bounded and closed) has a global maximum and a global minimum. So once you've checked that they could only be achieved on $\theta=0$, $\theta=\frac\pi 4$ or $\theta=\frac \pi 2$, checking which of $f(0)$, $f(\frac \pi 4)$ and $f(\frac \pi 2)$ is greater and which is lower, you can conclude where are those global extrema.
