Failed solution for solving $\cos(\theta) = -\sin(-\theta)$ I'm trying to solve  $\cos(\theta) = -\sin(-\theta)$ on the interval $[0, 2\pi)$,  but having trouble identifying what I'm doing wrong
$$\cos(\theta) = -\sin(-\theta)$$
By even-odd identities:
$$\sin(-\theta)=-\sin(\theta)$$
$$\cos(\theta)= -(-\sin(\theta))$$
$$\cos(\theta)=\sin(\theta)$$
Square both sides
$$\cos^2(\theta)=\sin^2(\theta)$$
By Pythagorean identities: $\sin^2(\theta)=1-\cos^2(\theta)$
$$\cos^2(\theta)=1-\cos^2(\theta)$$
$$2\cos^2(\theta)=1$$
$$\cos^2(\theta)=\frac{1}{2}$$
$$\cos(\theta)=\frac{1}{\sqrt2}$$
$$\theta = \frac{\pi}{4}, \frac{7\pi}{4}$$
I know the correct solutions are $\dfrac{\pi}{4}, \dfrac{5\pi}{4}$. Why am I missing $\dfrac{5\pi}{4}$ and in its place have $\dfrac{7\pi}{4}$ instead?
 A: Two of your steps cause issues

*

*It is true that $\cos(\theta)=\sin(\theta) \implies \cos^2(\theta)=\sin^2(\theta)$ but it is also true that $\cos(\theta)=-\sin(\theta) \implies \cos^2(\theta)=\sin^2(\theta)$.  This introduced the possibility of spurious results such as $\frac{7\pi}4$ or $\frac{3\pi}4$ and is which is is always worth checking results in the original expression.


*It is not true $\cos^2(\theta)=\frac12 \implies \cos(\theta)=\frac1{\sqrt{2}}$.  What is true is $\cos^2(\theta)=\frac12 \implies \cos(\theta)=\frac1{\sqrt{2}} \text{ or }\cos(\theta)=-\frac1{\sqrt{2}}$.  The second of these leads to $\frac{5\pi}4$ and the spurious $\frac{3\pi}4$.
A: Well, first, a slightly different approach: $\sin(-\theta) = -\sin(\theta)$ since sine is an odd function. Thus, your original equation is identical to
$$\cos \theta = \sin \theta$$
Dividing by $\cos \theta$ on both sides (on the premise it is nonzero), you get that
$$\tan \theta = 1, \theta \ne \pi/2$$
This method of solving it might be more pleasant for you.

As for your solution, note that you need to account for the fact that
$$\cos^2 \theta = \frac 1 2 \implies | \cos \theta | = \frac{1}{\sqrt 2} \implies \cos \theta = \frac{1}{\sqrt 2} \text{ or} - \frac{1}{\sqrt 2}$$
Moreover, squaring an equation introduces extraneous solutions which you might need to eliminate, which accounts possibly for your extra solution. For instance, $x=1$. Squaring this gets you $x^2 = 1$, for which not only $1$ is a solution but also $-1$. That is, $x=1$ implies $x^2 = 1$, but the converse isn't true (i.e. $x^2 = 1$ doesn't always mean $x=1$).
A: It is very easy to miss roots when taking the square root.
You have correctly observed that $\sin\theta=\cos\theta$. Since this is impossible to be true when $\cos\theta=0$, the problem reduces to $\tan\theta=1$. Now you can use the fact that $\tan\theta$ is periodic.
A: Method-1:
$$\cos(\theta)=-\sin(-\theta)\iff \cos(\theta)=\sin(\theta)$$$$\cos(\theta)=\cos\left(\frac{\pi}{2}-\theta\right)$$
$$\theta=2k\pi\pm\left(\frac{\pi}{2}-\theta\right)$$$$ \theta=k\pi+\frac{\pi}{4}$$
Where, $k$ is any integer i.e. $k=0, \pm1, \pm2, \ldots$. For given interval $\theta\in[0, 2\pi)$, substitute $k=0, k=1$ in above general solution to get
$$\color{blue}{\theta= \frac{\pi}{4}, \frac{5\pi}{4}}$$
Method-2:
$$\cos(\theta)=\sin(\theta)$$
$$\cos(\theta)\frac{1}{\sqrt2}-\sin(\theta)\frac{1}{\sqrt2}=0$$
$$\cos\left(\theta+\frac{\pi}{4}\right)=0$$
$$\theta+\frac{\pi}{4}=\frac{(2k+1)\pi}{2}$$$$\theta=\frac{(4k+1)\pi}{4}$$
Where, $k$ is any integer i.e. $k=0, \pm1, \pm2, \ldots$. For given interval $\theta\in[0, 2\pi)$, substitute $k=0, k=1$ in above general solution to get
$$\color{blue}{\theta= \frac{\pi}{4}, \frac{5\pi}{4}}$$
A: $\sin \theta = \cos \theta $
$\implies \tan \theta =1$
So $ \theta = nπ+ \frac{π}{4}$ where $n \in Z$
You want $\theta $ in $[0, 2π] $
Thus $\theta = \frac{π}{4}, \frac{5π}{4}$
A: $$\cos \theta = \sin \theta \Leftrightarrow \cos \theta - \sin \theta = \sqrt 2 \sin (\frac{\pi}{4}- \theta) =0$$
$$\frac{\pi}{4}- \theta = k \pi \Leftrightarrow \theta = m \pi +\frac{\pi}{4}, m \in \mathbb{Z}$$
From here you obtain all solutions in $\theta \in [0, 2 \pi)\Rightarrow \theta = \frac{\pi}{4},\frac{5\pi}{4}$
