<s>[INST] Find all extrema of a complicated trigonometric function Problem
Find all local extrema for
$$f(x) = \frac{\sin{3x}}{1+\frac{1}{2}\cos{3x}}$$
Attempted solution
My basic approach is to take the derivative, set the derivative equal to zero and solve for x.
Taking the derivative with the quotient rule and a few cases of the chain rule for the trigonometric functions with a final application of the Pythagorean identity:
$$f'(x) = \frac{(1+\frac{1}{2}\cos{3x})(3\cos{3x})+1.5\sin{3x}\sin {3x}}{(1+\frac{1}{2}\cos{3x})^2} = \frac{3\cos 3x+1.5\cos^2 3x + 1.5\sin^2 3x}{(1+\frac{1}{2}\cos 3x)^2} = \frac{3 \cos 3x + 1}{(1+\frac{1}{2}\cos 3x)^2}$$
Putting it equal to zero and solving for x:
$$3\cos 3x + 1 = 0 \Rightarrow x = \frac{\arccos{\Big(-\frac{1}{3}\Big)}}{3} = \frac{\pi}{6} + \frac{2\pi n}{3}$$
...however the expected answer is $\pm\frac{2\pi}{9} + \frac{2\pi n}{3}$
So I must have gone wrong somewhere.
 [/INST] This function has period $\frac{2\pi}3$ and it is an odd function, so we need to determine its variations only on $\bigl[0,\frac\pi 3\bigr]$.
Now simplifying the derivative, you get
$$f'(x)=\frac{3\bigl(\frac12+\cos 3x\bigr)}{\bigl(1+\frac{1}{2}\cos{3x}\bigr)^2},$$
which has the sign of $\;\frac12+\cos 3x$, so we have to solve the inequation
$$\cos 3x>-\tfrac 12\quad\text{on}\quad \bigl[0,\tfrac\pi 3\bigr].$$
Can you continue?
</s>