# Trigonometric inequality $\cos x+ \sin x>0$

Solve the inequality: $\cos x+ \sin x >0$

Why can't I square this to get $\sin 2x>0$? And what is the first step here then?

• The reason you can't just square both sides is because $f(x)^2 > 0$ is equivalent to $f(x) \neq 0$, which is not equivalent to $f(x) > 0$. You're trying to solve the latter, and solving the former will give you extra solutions. – Alex G. Oct 25 '16 at 13:14
• To solve the inequality, first solve $\cos x + \sin x = 0$. Then in between the solutions to the equation, it will either be the case that $\cos x + \sin x > 0$ or $\cos x + \sin x < 0$ for all $x$. You can simply plug point in to each interval to see which is the case. – Alex G. Oct 25 '16 at 13:16
• Some related posts: Solve equation $\cos x+\sin x=0$ and A trigonometric inequality: $\cos(\theta) + \sin(\theta) > 0$. Found using Approach0. – Martin Sleziak Oct 25 '16 at 14:36

If you simply square the inequality, you lose information because

$$a>0\implies a^2>0$$ but the implied inequality is also true for $a<0$ !

Anyway, this can help you to find the roots by

$$(\cos x+\sin x)^2=1+\sin 2x=0\implies 2x=\frac{3\pi}2+2k\pi$$ or

$$x=\frac{3\pi}4+k\pi.$$

Then as these roots are simple for the original function, the sign alternates between the roots and it is positive in the ranges

$$(-\frac\pi4+2k\pi,\frac{3\pi}4+2k\pi)$$

Hint. Consider that $$\sin(x+\pi/4)=\sin(x)\cos(\pi/4)+\cos(x)\sin(\pi/4).$$

• Nice trick ${}{}$ – Alex G. Oct 25 '16 at 13:16
• So I can write my inequality as $\sin (x+\pi/4)>0$? But how did you figure that out? – lmc Oct 25 '16 at 13:21
• @Now_now_Draco_play_nicely You can write any linear combination of $\cos x$ and $\sin x$ as $C\sin(x+x_0)$ for some $C$ and $x_0$. – Robert Z Oct 25 '16 at 13:25

Hint: Try to express your function as $A\sin(x+x_0)$.

$$\cos(x)+\sin(x)=A\sin(x+x_0)=A\sin(x)\cos(x_0)+A\cos(x)\sin(x_0)$$

By comparing both expressions you will get $$1=A\sin(x_0)$$ $$1=A\cos(X_0)$$

Dividing both expressions gives you $1=\tan(x_0) \implies x_0 = \pi/4$ or $x_0 = -\pi/4$. And squaring and adding both gives you $1=A^2 \implies A =\pm 1$

Check which combination of $x_0$ and $A$ leads to a correct result.

Squaring an inequation $f(x)>0$ is certainly a bad idea to solve it, because $f(x)^2>0$ is true for every $x$ that is not a zero of the function $f$. $A^2>0$ does not imply, at all, that $A>0$.

To solve the inequation $\sin x+\cos x>0$, I'd use some elementary calculus. Define $f(x)=\sin x+\cos x$. This function is continuous, so finding its zeros seems a good idea. They are $3\pi/4+n\pi$, $n\in\Bbb Z$. For $x=2n\pi$, $n\in\Bbb Z$, $f(x)>0$, and for $x=(2n+1)\pi$, $n\in\Bbb Z$ we have $f(x)<0$.

The solution is the union of the intervals $$(-\pi/4+2n\pi,3\pi/4+2n\pi)$$ for $n\in\Bbb Z$.

$$\cos x+ \sin x >0\Rightarrow \frac{\cos}{\sqrt2}+\frac{\sin x}{\sqrt2}=\sin(\frac{\pi}{4}+x)\gt0$$ It follows $$x\in\bigcup\space\left]-\frac{\pi}{4}+2k\pi,\frac{3\pi}{4}+2k\pi\space\right[$$