<s>[INST] Find all solutions to $\tan 2x = \cos \frac x2$ on the interval $[0,2\pi]$ I tried to solve this equation for almost 24 hours, using all the trigonometry identities I can think of, to no avail.
$$\tan 2x = \cos \frac x2$$
So far I've gotten to this point,
$$\cos^2 2x (\cos x + 3) = 2$$
but I've not made much of a progress since. I know one of the solutions is $x = \pi$, but I don't know how to solve for the rest.
Can someone give me a hint on how to solve this?
 [/INST] $\tan 2x = \cos \frac{x}{2} \iff \frac {\sin 2x}{\cos 2x} = \pm \sqrt{\frac {1+\cos x}{2}} \iff \frac{\sin^2 2x}{\cos^2 2x} = \frac{1 + \cos x}{2} \iff 2\sin^2 2x=(1 + \cos x)\cos^2 2x \\ \text{condition:} \quad x \neq \frac{\pi}{4} + \frac{k\pi}{2}, k \in \mathbb{Z}$
$ \iff 8\sin^2x \cos^2x = (1 + \cos x)(\cos^2x - \sin^2x)^2$
$\iff 8\sin^2x \cos^2x = (1 + \cos x)(\cos^4x - 2\cos^2x \sin^2x + \sin^4x)$
$\iff 8\sin^2x \cos^2x = \cos^4x - 2\cos^2x \sin^2x + \sin^4x + \cos^5x - 2\cos^3x \sin^2x + \cos x \sin^4x$
$\iff 10\sin^2x \cos^2x = \cos^4x + \sin^4x + \cos^5x - 2\cos^3x \sin^2x + \cos x \sin^4x$
$\iff 10(1 - \cos^2x) \cos^2x = \cos^4x + (1 - \cos^2x)^2 + \cos^5x - 2\cos^3x (1 - \cos^2x) + \cos x (1 - \cos^2x)^2$
$\iff 10\cos^2x -10\cos^4x = \cos^4x + 1 -2\cos^2x +\cos^4x+\cos^5x -2\cos^3x+2\cos^5x+\cos x-2\cos^3x+\cos^5x$
$\iff 4cos^5x +12\cos^4x-4\cos^3x -12\cos^2x + \cos x + 1 = 0$
$\iff 4cos^3x(\cos^2x - 1) +12\cos^2x(\cos^2x - 1) + \cos x + 1 = 0$
$\iff 4cos^3x(\cos x + 1)(\cos x - 1) +12\cos^2x(\cos x + 1)(\cos x - 1) + \cos x + 1 = 0$
$\iff (\cos x + 1)(4cos^3x(\cos x - 1) +12\cos^2x(\cos x - 1) + 1) = 0$
$\iff (\cos x + 1)(4cos^4x + 8\cos^3x -12\cos^2x + 1) = 0$
$\iff \cos x + 1 = 0 \quad \text{OR} \quad 4cos^4x + 8\cos^3x -12\cos^2x + 1 = 0$
Now we can easily find the solution(s) of first equation, and for the second equation we will be able to find solution(s) using substitution $\cos x = t$...

</s>