Find the minimum and maximum values of f(x) = sin2x-x
Find the minimum and maximum values of $f(x) = \sin2x-x$ on $\left[-\dfrac{\pi}{2},\,\dfrac{\pi}{2}\right]$.
Explanation of Method
Two interior turning points, and neither is the extreme value.
Step 1: The derivative
\[ f'(x) = 2\cos2x-1. \tag{1} \]
Step 2: Critical points
Setting $f' = 0$ gives $\cos2x = \dfrac12$, i.e. $2x = \pm\dfrac{\pi}{3}+2k\pi$. Since $x$ ranges over $\left[-\dfrac{\pi}{2},\dfrac{\pi}{2}\right]$, the angle $2x$ lies in $\bigl[-\pi,\pi\bigr]$ and only two solutions survive:
\[ x = -\frac{\pi}{6}, \qquad x = \frac{\pi}{6}. \]
Step 3: Sign of the derivative
On $\bigl(-\tfrac{\pi}{6},\tfrac{\pi}{6}\bigr)$ we have $|2x|\lt \tfrac{\pi}{3}$, so $\cos2x\gt \tfrac12$ and $f'\gt 0$; outside that interval $\cos2x\lt \tfrac12$ and $f'\lt 0$:
\[ \left(-\frac{\pi}{2},-\frac{\pi}{6}\right):\ \searrow; \qquad \left(-\frac{\pi}{6},\frac{\pi}{6}\right):\ \nearrow; \qquad \left(\frac{\pi}{6},\frac{\pi}{2}\right):\ \searrow. \]
So $x = -\dfrac{\pi}{6}$ is a local minimum and $x = \dfrac{\pi}{6}$ a local maximum.
Step 4: The four candidate values
\[ f\!\left(-\frac{\pi}{2}\right) = \sin(-\pi)+\frac{\pi}{2} = \frac{\pi}{2} \approx 1.5707963, \qquad f\!\left(-\frac{\pi}{6}\right) = -\frac{\sqrt3}{2}+\frac{\pi}{6} \approx -0.3424266, \]
\[ f\!\left(\frac{\pi}{6}\right) = \frac{\sqrt3}{2}-\frac{\pi}{6} \approx 0.3424266, \qquad f\!\left(\frac{\pi}{2}\right) = \sin\pi-\frac{\pi}{2} = -\frac{\pi}{2} \approx -1.5707963. \]
Step 5: Verification
\[f \text{ is odd: } f(-x) = -\sin2x+x = -f(x),\ \text{so the two endpoint values are negatives} \;\;\checkmark\]
\[f(0) = 0,\ \text{between the local minimum } -0.342 \text{ and the local maximum } +0.342 \;\;\checkmark\]
\[\frac{\pi}{2} = 1.5708 \gt 0.3424:\ \text{the endpoints beat both interior turning points} \;\;\checkmark\]
Result
Final answer:
\[\boxed{\,\max_{\left[-\pi/2,\,\pi/2\right]}f = f\!\left(-\frac{\pi}{2}\right) = \frac{\pi}{2}, \qquad \min_{\left[-\pi/2,\,\pi/2\right]}f = f\!\left(\frac{\pi}{2}\right) = -\frac{\pi}{2}\,}\]
Remark
Remark. The oscillation $\sin2x$ has amplitude $1$ while the linear term sweeps through $\pi\approx3.14$ across the interval, so the line dominates: the extreme values sit at the ends, and the two interior turning points are merely local ripples. The interior maximum $\tfrac{\sqrt3}{2}-\tfrac{\pi}{6}$ is in fact smaller than the value at the left endpoint by more than $1.2$.