A function \( f(x)=\sin x(1+\cos x),x\in[0,\pi] \) has a local maxima at \( x= \)
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \( \displaystyle\frac{\pi}{3} \)
By the product rule:
\( \displaystyle f'(x)=\cos x(1+\cos x)+\sin x(-\sin x) \)
\( \displaystyle =\cos x+\cos^2x-\sin^2x \)
\( \displaystyle =\cos x+\cos 2x \)
Setting \( f'(x)=0 \), with \( \cos 2x=2\cos^2x-1 \):
\( \displaystyle 2\cos^2x+\cos x-1=0 \)
\( \displaystyle (2\cos x-1)(\cos x+1)=0 \)
\( \displaystyle \cos x=\frac{1}{2}\ \text{or}\ \cos x=-1 \)
\( \displaystyle x=\frac{\pi}{3}\ \text{or}\ x=\pi \)
Second derivative test at \( x=\frac{\pi}{3} \):
\( \displaystyle f''(x)=-\sin x-2\sin 2x \)
\( \displaystyle f''\left(\frac{\pi}{3}\right)=-\frac{\sqrt{3}}{2}-2\cdot\frac{\sqrt{3}}{2} \)
\( \displaystyle =-\frac{3\sqrt{3}}{2}\lt 0 \)
So f has a local maximum at \( x=\frac{\pi}{3} \).
Why the other options are incorrect
Option (1) 0 — Incorrect. f(0) = 0 and f(x) > 0 just to the right of 0, so x = 0 is a point of local minimum.
Option (3) \( -\displaystyle\frac{\pi}{3} \) — Incorrect. \( -\frac{\pi}{3} \) is not in the domain [0, π].
Option (4) \( \pi \) — Incorrect. f′(π) = 0, but f(π) = 0 while f(x) > 0 just to the left of π, so x = π is a point of local minimum.