Intersection of sine and cosine

We find where the graphs of y=sin⁡xy = \sin x and y=cos⁡xy = \cos x cross.

Solving the equation

Dividing both sides of sin⁡x=cos⁡x\sin x = \cos x by cos⁡x\cos x gives tan⁡x=1\tan x = 1, which holds exactly at the following values.

x=π4+nπ(n an integer)x = \frac{\pi}{4} + n\pi \quad (n \text{ an integer})

A caution about dividing

Whenever you divide, you must check that the divisor is not 00. If cos⁡x=0\cos x = 0 then sin⁡x=±1\sin x = \pm 1, which is not 00, so sin⁡x=cos⁡x\sin x = \cos x cannot hold there. The values with cos⁡x=0\cos x = 0 were never solutions to begin with, so dividing loses nothing.

Seeing it on the unit circle

The cosine is the horizontal coordinate of a point and the sine the vertical one. So sin⁡x=cos⁡x\sin x = \cos x says that the two coordinates agree, which happens exactly where the unit circle meets the line y=xy = x.

The circle meets that line at two diametrically opposite points, at the angles π4\dfrac{\pi}{4} and 5π4\dfrac{5\pi}{4}. Solutions recur every π\pi rather than every 2π2\pi because those two points lie on opposite sides of the origin, which is the same reason the period of tan⁡\tan is π\pi.

Checking the values

xxsin⁡x\sin xcos⁡x\cos x
π4\dfrac{\pi}{4}22≈0.707\dfrac{\sqrt{2}}{2} \approx 0.70722≈0.707\dfrac{\sqrt{2}}{2} \approx 0.707
5π4\dfrac{5\pi}{4}−22-\dfrac{\sqrt{2}}{2}−22-\dfrac{\sqrt{2}}{2}

The magnitudes are the same and only the sign is reversed.

Solving by combining the waves

There is another route, through the combination of trigonometric functions. The difference collapses into a single sine.

sin⁡x−cos⁡x=2 sin⁡(x−π4)\sin x - \cos x = \sqrt{2}\,\sin\left(x - \frac{\pi}{4}\right)

This vanishes when x−π4=nπx - \dfrac{\pi}{4} = n\pi, that is x=π4+nπx = \dfrac{\pi}{4} + n\pi, agreeing with the answer from the tangent. The reading here is that the difference of two waves is itself a wave, and its zeros are the intersections.

The large dots on the graph are these two intersections, and the crossings repeat every π\pi thereafter.