# Solve equation $\cos x+\sin x=0$

I'm trying to solve an equation here but unfortunately I can't. The equation: $$\cos x + \sin x = 0$$ I'm trying to solve this by replacing $\cos x$ with $(1-t^2)/(1+t^2)$ and $\sin x$ with $2t/(1+t^2), t=\tan x/2, \$ but I can't get the right solution. Also I have tried by squaring both sides but still nothing.

Can anyone help me ?

• try plotting these two functions. Where is $\cos x = - \sin x$? – Alex Jan 19 '14 at 16:15

Note that $$\cos x + \sin x = 0 \iff \cos x = -\sin x$$

Now, $\cos x$ cannot equal zero, since if it did, $\sin x = -1$ or $\sin x = 1$, in which case the given equation isn't satisfied.

So we can divide by $\cos x$ to get $$1 = \dfrac{-\sin x}{\cos x} = -\tan x \iff \tan x = -1$$

Solving for $x$ gives us the values $x = \dfrac {3\pi}4 + k\pi$, where $k$ is any integer.

Another way to solve this is to write $\cos x = (e^{ix}+e^{-ix})/2$ and $\sin x = (e^{ix}-e^{-ix})/2i$. The equation simplifies in a couple of easy steps to $e^{2ix}= e^{-\pi i/2}$. This is equivalent to $2x= -\pi /2 + 2\pi n$, so $x= -\pi /4 + \pi n$ for integral $n$.

• thats a good answer – Dan Z May 16 '17 at 20:37

Following where you got stuck and squaring both sides and you obtain

$$\sin^2 x+\cos^2x+2\sin x \cos x=0 \Rightarrow 1+\sin2x=0$$

Using $\sin 2x = 2\sin x \cos x$.

This means that

$$\sin 2x = -1$$ and hence $$2x = \frac {3\pi}{2}+2k\pi \Rightarrow x=\frac {3\pi}{4}+k\pi$$

I'm going to go through this assuming that you're solving for solutions within $[0,2\pi]$.

$\cos x+\sin x=0$ $\implies \cos x=-\sin x$

With this, we can pull out our trusty old unit circle:

Then, we need to find any angles on the circle where $\cos x = -\sin x$

Sorry for the low res on the second image. But, as you can see, we have our angles. The solutions to $\sin x+\cos x=0$ between $[0,2\pi]$ are $\frac{3\pi}{4}$ and $\frac{7\pi}{4}$.

Hope that helps!

• nice graphics here – janmarqz Jan 19 '14 at 17:50

Since $$\cos x+\sin x=\sqrt 2\sin(x+(\pi/4)),$$ you can solve $$\sin(x+(\pi/4))=0.$$

Hence, you'll have $$x+(\pi/4)=n\pi\ \ \ (n\in\mathbb Z).$$

Hint:

$\cos x=-\sin x=\cos\left(\frac{1}{2}\pi+x\right)$

$\cos x=\cos\alpha$ gives $x=\pm\alpha+2k\pi$ for $k\in\mathbb{Z}$

You already have some good answers, but just for the fun of it here's another way:

$$\cos x+\sin x=\cos x+\cos(π/2-x)=2\cos(π/4)\cos(x-π/4)=0,$$ which implies $$\cos(x-π/4)=0,$$ so that we have $$x-\fracπ4=\fracπ2+πk,$$ where $$k$$ is any integer. Finally this gives $$x=\frac{3π}{4}+πk,k\in\mathrm Z.$$