Find $\theta$ for which $\sin m \theta = \cos n \theta$ 
Question: Find $\theta$ for which $\sin m \theta = \cos n \theta$


My attempt:
$$\cos(m\theta)=\sin(\pi/2 - m\theta)$$
$$=\sin\big[k\pi + (-1)^k (\pi/2-m\theta)\big]$$
Since $\cos(m \theta)=\sin(n \theta)$, therefore:
$$\big[k\pi + (-1)^k (\pi/2-m\theta)\big]=n\theta$$
And hence we get $$\theta = \frac{\pi\Big[k+\frac{(-1)^k}{2}\Big]}{n+(-1)^km}$$
$m,n,k$ can be any number $\in \mathbb{R}$ as in my case.
But is there any better representation of $\theta$ instead of what I've shown? I know I'm not wrong anywhere, but still if there's a shorter representation of the value of $\theta$ in terms some real number (positive, negative or zero), do write an answer. 
Regards,
Mathbg
 A: I think your solution's good. It doesn't get much 'simpler' I believe. Perhaps the presentation could be made better. We have that
$$\sin(y)=x\iff y={(-1)}^k\arcsin(x)+k\pi$$
for some $k\in\mathbb{Z}$. Hence, from $\cos(n\theta)=\sin(\pi/2-n\theta)$ we have that
\begin{align}
\sin(m\theta)=\cos(n\theta)&\iff m\theta={(-1)}^k(\pi/2-n\theta)+k\pi\\
&\iff(m+{(-1)}^kn)\theta=\left(k+\frac{{(-1)}^k}{2}\right)\pi\\
&\iff\theta=\left(\frac{2k+{(-1)}^k}{m+{(-1)}^kn}\right)\frac{\pi}{2}
\end{align}
A: HINT: use that $$\sin(m\theta)-\cos(n\theta)=-2 \sin \left(-\frac{\theta  m}{2}-\frac{\theta  n}{2}+\frac{\pi }{4}\right) \sin
   \left(-\frac{\theta  m}{2}+\frac{\theta  n}{2}+\frac{\pi }{4}\right)$$
A: In the approach shown in the question, you convert the cosine to a sine.
Suppose instead you convert the sine t a cosine:
$$ \sin(m\theta) = \cos\left(\frac\pi2 - m\theta \right).$$
Therefore we have to solve for $\theta$ in
$$ \cos\left(\frac\pi2 - m\theta \right) = \cos(n\theta).$$
But we also know $\cos(-n\theta) = \cos(n\theta).$
An angle $\theta$ is part of the solution if and only if it
solves one of the following two equations:
$$
\frac\pi2 - m\theta= n\theta + 2k\pi \quad\text{or}\quad
\frac\pi2 - m\theta= -n\theta + 2k\pi,
$$
where $k$ is an integer.
That is,
$$ \frac\pi2 - m\theta= \pm n\theta + 2k\pi, $$
$$ m\theta \pm n\theta =  \frac\pi2 -  2k\pi, $$
$$ \theta  =  \frac{\frac\pi2 -  2k\pi}{m \pm n}
 = \left(\frac{1 - 4k}{m \pm n}\right) \frac \pi2. $$
Since $k$ is an arbitrary integer (positive or negative), you can equally well write
$$ \theta = \left(\frac{1 + 4k}{m \pm n}\right) \frac \pi2. $$

Checking this against the result in the question, the $m+n$ case
produces the same set of values of $\theta$ as you get for even values of $k$ in the question, and the $m-n$ case produces the same set of values of $\theta$ as you get for odd values of $k.$
