<s>[INST] Absolute maximum value of $\sin^2(x)-\sin(x)$ in $[0,\frac{3\pi}{2}]$ I thought it does not have absolute maximum, but wanted to just check and see why
 [/INST] A continuous function on a closed interval always has both an absolute max and an absolute min.  And, the absolute max and min can only occur at critical points or the end points of the interval (I know of at least one book that includes end points as critical points).  Therefore, the strategy that calculus books give is to find all critical points (in your interval) and plug these, and the end points, in to the original.  The highest value you get is your absolute max and the smallest value you get is your absolute min (and you get the $x$ values where the absolute max and min occur, as the $x$ you plugged in).  Since they must occur, and since these are the only possible places where they can occur, this guarantees we will find the absolute max and min if we do this.
If $f(x) = \sin^2 x - \sin x$, then $f'(x) = 2\sin x \cos x - \cos x = \cos x(2\sin x - 1)$.  This is always defined so the only critical points will be where this is 0.  A product is 0 exactly when one of the two parts is 0, so this is 0 when $\cos x = 0$ or when $\sin x = \frac{1}{2}$.  In $\left[0, \frac{3\pi}{2} \right]$, the solutions would be: $\cos x = 0$ when $x = \frac{\pi}{2}, \frac{3\pi}{2}$, $\sin x = \frac{1}{2}$ when $x = \frac{\pi}{6}$ and $x = 5\pi / 6$.
Now, plugging in all these values, and the end points gives:
$\begin{align*}
f(0) &= 0 \\
f(\pi/6) &= - \frac{1}{4} \\
f(\pi/2) &= 0 \\
f(5\pi/6) &= - \frac{1}{4} \\
f(3\pi/2) &= 2
\end{align*}$
Therefore, the max is 2 at $3\pi/2$ and the min is $-\frac{1}{4}$ at both $\pi/6$ and $5\pi/6$.
</s>