Solving $\cos(2\theta)=\sin\left(\frac{\theta}{2}\right)$ Consider an acute angle $\theta$, which has the property that
$$\cos(2\theta)=\sin\left(\frac{\theta}{2}\right).$$
I am trying to find the value of $\theta$. Using the identity
$$\cos(2\theta)=\sin\left(\frac{\pi}{2}-2\theta\right),$$
I can write the first equation as
$$\sin\left(\frac{\pi}{2}-2\theta\right)=\sin\left(\frac{\theta}{2}\right).$$
Equating the argument of the $\sin$ functions, we see that
\begin{align}
\frac{\pi}{2}-2\theta&=\frac{\theta}{2} \\
\frac{5}{2}\theta&=\frac{\pi}{2} \\
\theta&=\frac{\pi}{5}.
\end{align}
While this yields the correct answer, I do not know how we can justify equating the arguments of the $\sin$ functions.

That guarantees that that is one of the answers.
It's justified because if $x = y$ then $f(x) = f(y)$ for any possible function.
So IF $\frac \theta 2 = \frac \pi 2 - 2\theta$ then $\sin \frac \theta 2 = \sin (\frac \pi 2 -2\theta) = \cos 2\theta$, then any solution to $\frac \theta 2 = \frac \pi 2 - 2\theta$  (there is only one such solution) will be a solution to $\sin \frac \theta 2 = \cos 2\theta$.
But it doesn't mean it is the only solution.
It is true that if $x = y \implies f(x) = f(y)$ but it is not true that $f(x) = f(y) \implies x=y$.  $x=y$ will be one pair of solutions (always) but there may be others.
But we can take this further.
As $\cos 2\theta = \sin (\frac \pi 2 - 2\theta)$ always, it will suffice to find all solutions to $\sin\frac {\theta} 2 = \sin (\frac \pi 2 - 2\theta)$.
So we have to ask ourselves how do we find all solutions to $\sin x = \sin y$.
Well $x = y$ is one but so is $x = y + 2k\pi$ for any integer $k$.  And $x = \pi - y$ is another but so is $x = \pi- y +2j\pi=-y + (2j+1)\pi$ for any integer $j$.  And that is all of them.
So if $\sin\frac {\theta} 2= \sin (\frac \pi 2- 2\theta)$ then we have either

$\frac \theta 2 = \frac \pi 2 - 2\theta + 2k\pi$ for some integer $k$.

Or we have

$\frac \theta 2 = 2\theta - \frac \pi 2 + (2j+1)\pi$ for some integer $j$.

....
Now we just solve those.
If $\frac \theta 2 = \frac \pi 2 - 2\theta + 2k\pi$ then
$\frac 52\theta = \frac \pi 2 + 2k \pi$ so
$\theta = \frac \pi 5 + \frac 45k\pi$.
That is $\frac \pi 5$ is a solution but so are $\pi, \frac 95\pi, \frac{13}5\pi, \frac {17}5\pi$ etc.
And if $\frac \theta 2 = 2\theta - \frac \pi 2 + (2j+1)\pi$ then we have
$\frac 32\theta = \frac \pi 2 - (2j+1)\pi$.
(For simplicity sake we can replace $-(2j+1)$ with any other odd integer so lets replace it with a positive $(2m + 1)$ to get... )
$\frac 32\theta =\frac \pi 2 + (2m+1)\pi$
$\theta = \frac \pi 3 + \frac {4m+2}3\pi$.
So $\theta = -\frac{\pi} 3 \pi, \frac {7\pi}3, \frac {11\pi}3$ are all solutions.
