# Finding the Zeroes: $f(x)=\sin(x)+\cos(x)$

I am a bit clueless on how to find the zeroes of this function. I know that the function would be zero at $x=-\frac{5\pi}4,-\frac{\pi}4,\frac{3\pi}4$, and etc by graphing the function. How would I find the zeroes of this function without graphing?

$$f(x)=\sin(x)+\cos(x)$$

• let $f(x) = \sin{x} + cos{x}=0\rightarrow \sin{x} =- cos{x}$ and then $$\tan{x} = -1$$ where $x=-\pi/4 + 2*pi*n$ with $n$ integer – HBR Dec 15 '16 at 15:14
• More generally, you can read about "Linear combinations of sine and cosine" in lots of places, e.g. on Wikipedia. – JonathanZ Dec 15 '16 at 15:16

Hint: $$\sin(x)+\cos(x)=\sqrt 2 \left( \frac{1}{\sqrt{2}}\sin(x)+\frac{1}{\sqrt{2}}\cos(x)\right)=\sqrt{2}\sin\left(x+\frac{\pi}{4}\right)$$

• You type to fast XD +1 – Simply Beautiful Art Dec 15 '16 at 15:15
• Out of curiosity, what makes you think of this before just doing $\tan(x)=-1$? – The Count Dec 15 '16 at 15:17
• I was just wondering. It seems less intuitive to me. I'm not criticizing. You thought of a different thing than me, so I figured I would pick your brain to learn. – The Count Dec 15 '16 at 15:20
• @TheCount I've seen this particular solution to this problem thousands of times. And, to be honest, I'm scared of division. – lisyarus Dec 15 '16 at 15:27
• @lisyarus Being scared of division is the appropriate feeling IMO. It makes things go sideways too often. – Stella Biderman Dec 21 '16 at 19:13

$$\sin x+\cos x=0\iff \sin x=-\cos x.$$ If $\cos x=0$, then $\sin x\not=0$, so the equation doesn't hold. Thus, the above holds iff $$\tan x=-1.$$ This occurs iff we have a $45$ degree angle in the second or fourth quadrant. I.e., iff $$x=\frac{3\pi}{4}+\pi n$$ where $n\in\mathbb{Z}$.

Notice that according to the sum of angles formulas,

$$\sin(x)+\cos(x)=\sqrt2\sin\left(x+\frac\pi4\right)$$

Setting this equal to $0$, we now get

$$\sin\left(x+\frac\pi4\right)=0$$

$$x=...$$

Another method that has some generalization, as it works for any pair of shifted functions:

$\sin(x)$ and $\cos(x)$ are shifts of each other, which means that there exists a $k$ such that $\sin(x+k)=\cos(x)$ (in our case, $k=\pi/2$. Rewriting the equation using that, we can obtain the expression $$f(x)=\sin\left(x-\frac{k}{2}\right)+\sin\left(x+\frac{k}{2}\right)$$

to make $f(x)=0$, we just need to find the appropriate value of $x$ to satisfy this equation. In the case of $\sin(x)$, it's rapidly apparent that the answer is $\pi n + 3\pi/4$ because that gives us $$\sin\left(\pi n + \frac{1}{2}\right)+\sin\left(\pi(n+1)\right)=\pm(-1+1)=0$$ and a few quick arguments concerning derivatives suffice to show that there aren't intermediate zeroes.

Zeros occur when $f(x)=0$, so we we need values such that $\cos(x)=-\sin(x)$. Dividing both sides by $\cos(x)$, we have $\tan(x)=-1$. The solutions are precisely those you list.

• Would the downvoter explain why? This is an objectively correct solution. – The Count Dec 15 '16 at 20:07