Intersection of sine and cosine

We find where the graphs of y=sinxy = \sin x and y=cosxy = \cos x cross.

Solving the equation

Dividing both sides of sinx=cosx\sin x = \cos x by cosx\cos x gives tanx=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 cosx=0\cos x = 0 then sinx=±1\sin x = \pm 1, which is not 00, so sinx=cosx\sin x = \cos x cannot hold there. The values with cosx=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 sinx=cosx\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

xxsinx\sin xcosx\cos x
π4\dfrac{\pi}{4}220.707\dfrac{\sqrt{2}}{2} \approx 0.707220.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.

sinxcosx=2sin(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.