# About the sign of $\cos(x)-\sin(x)$ on $[0, \pi]$

Everything's in the title. I have to find the sign of $\cos(x)-\sin(x)$ this expression on $[0, \pi]$, and maybe that's a stupid question, but I just can't figure it out. I just know that it's equal to $0$ when $x=\pi/4$. Thanks for your help!

• Do you know how to write $\cos x - \sin x$ as $A\cos(x+\theta)$ for some $A$ and $\theta$? Commented May 1, 2016 at 15:02
• The function $f(x) = \cos x - \sin x$ is continuous, so on any interval where it's not zero, it's either always positive or always negative. With that in mind, and the fact that the only zero is at $\pi/4$, on the interval $[0, \pi/4)$ is $f$ positive or negative? You can check by testing the value at just $0$. Commented May 1, 2016 at 15:04
• Please read this tutorial on how to typeset mathematics on this site. Commented May 1, 2016 at 15:11
• The point on the unit circle corresponding to the angle $\theta$ is $(x, y) = (\cos \theta, \sin \theta)$, so $\cos \theta - \sin \theta > 0$ for the angles $\theta$ corresponding to the points on the unit circle for which $x > y$. Commented May 1, 2016 at 15:13
• Note that the sign of the required expression is dependent on whether $\cos x > \sin x$ (positive) or $\cos x < \sin x$ (negative). The rest can be concluded from the graph of $\cos x$ and $\sin x$. (These (cos and sine) are really important functions so you should know their graphs really well.) Commented May 1, 2016 at 15:32

On $[0,\pi/2]$ the sine is increasing and the cosine is decreasing; therefore $f(x)=\cos x-\sin x$ is decreasing. It starts at $f(0)=1$ and ends at $f(\pi/2)=-1$; it is zero at $\pi/4$.
On the other hand, on $(\pi/2,\pi]$ the cosine is negative and the sine is nonnegative.
In the plane $xy$, the locus of the points $x>y$ is the lower half plane delimited by the line through the origin with slope $1$.
This plane cuts two arcs of the half unit circle, for angle ranges $(0,\frac\pi4)$ and $(\frac\pi4,\pi)$.