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})$?
I think you got both answers right. $\theta = \frac{\pi}{2}$ is a critical point and yields a "local maximum" value, indeed. I plotted the graph of the function on given interval so you can check it: https://www.wolframalpha.com/input/?i=f(%CE%B8)%3D(4%CE%B8%E2%88%92%CF%80)sin(%CE%B8)%2B4cos(%CE%B8)%E2%88%922;+0+%3C%3D+%CE%B8+%3C%3D+pi%2F2
Also, I plotted the graph of the same function on the interval $0 \le \theta \le \frac{11 \pi}{20}$ in here and as you can see, function starts to decrease after $\theta = \frac{\pi}{2}$: https://www.wolframalpha.com/input/?i=f(%CE%B8)%3D(4%CE%B8%E2%88%92%CF%80)sin(%CE%B8)%2B4cos(%CE%B8)%E2%88%922;+0+%3C%3D+%CE%B8+%3C%3D+11pi%2F20&rawformassumption=%7B%22C%22,+%220%22%7D+-%3E+%7B%22NumberMath%22%7D
But you have to consider local and global extrema on given intervals so your answer and methodology is correct. Good job!