<s>[INST] How to isolate $x$ when $\cos(x/2)\cos(3x)/2−3\sin(x/2)\sin(3x)= 0$ Asked to find all relative and absolute extrema of  $f(x) = \sin\left(\frac{1}{2}x\right)\cos(3x)$ on the interval $[0,\pi]$. I've gotten the derivative, $$f'(x)=\frac{\cos(\frac{x}{2})\cos(3x)}{2} - 3\sin(\frac{x}{2})\sin(3x),$$  just fine, but how would I proceed to isolate x after this? I noticed that the situation is similar to the sine angle sum identity, but I don't know if there's an identity for an equation with the form $$h\cos(\alpha)\cos(\beta) - k\sin(\alpha)\sin(\beta)$$ and can't find anything online. I don't have much experience working with Euler's Formula in this context but know enough that I could probably follow an explanation based on it.
 [/INST] Expanding and varying my own comment:
$$\begin{split}
f'(x)&=\tfrac{1}{2}\cos\tfrac{x}{2}\cos 3x - 3\sin\tfrac{x}{2}\sin 3x\\
&=\tfrac{1}{2}\cos\tfrac{x}{2}\left(\cos 3x - 6\frac{\sin\tfrac{x}{2}\sin x}{\cos\tfrac{x}{2}} \frac{\sin 3x}{\sin x}\right)\\
&=\tfrac{1}{2}\cos\tfrac{x}{2}\left(\cos 3x - 6(1-\cos x) \frac{\sin 3x}{\sin x}\right)\\
&=\tfrac{1}{2}\cos\tfrac{x}{2}\left(T_3(\cos x) - 6(1-\cos x) U_2(\cos x)\right)\\
\end{split}$$
where
$$\begin{align}
T_3(y)&=4y^3-3y \\
U_2(y)&=4y^2-1\text{.}
\end{align}$$
Thus,
$$f'(x)=\tfrac{1}{2}\cos\tfrac{x}{2}g(\cos x)$$
where
$$g(y)=28y^3-24y^2-9y+6\text{.}$$
Now, we "cheat" a bit and use a CAS to find an optimized representation for $g(y)$. Let
$$y=\frac{z+2}{2(z+4)}\text{.}$$
Then
$$g(y)=-\frac{h(z)}{(z+4)^3}$$
where
$$h(z)=z^3-66 z -172\text{.}$$
Using the trigonometric solution to the cubic, we find
$$\begin{align}
z&=2\sqrt{22}\cos\theta&\cos 3\theta&=\frac{43}{11\sqrt{22}}\text{.}
\end{align}$$
That is,
$$\begin{align}x&=\arccos\frac{1+\sqrt{22}\cos\theta}{2(2+\sqrt{22}\cos\theta)} \\
\theta&=\tfrac{1}{3}\arccos\frac{43}{11\sqrt{22}}+\frac{2k\pi}{3}\end{align}$$
</s>