<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] Looks like you have a problem with the differentiation.  You should have.
You dropped a factor of 3 in the right-hand term.  It should be $(\frac 32 \sin 3x)(\sin 3x)$ in the first line.
You have brought it back by the time you get to.
$3\cos 3x + 1.5\cos^2 3x + \frac 12 \sin^2 3x = 0$
But then $1.5$ becomes $1$ in the next line.
$3\cos 3x  + 1.5 = 0$
Solving for x:
$\cos3x = -\frac 12$

$3x = \pm\frac {2\pi}{3} + 2n\pi\\
x = \pm \frac {2\pi}{9} + \frac {2n\pi}{3}$
$x = \frac {2\pi}{9} + \frac {2n\pi}{3}$ are the maxima
and $x = -\frac {2\pi}{9} + \frac {2n\pi}{3}$ are the minima
</s>