The relationship between sine and cosine

The graphs of y=sinxy = \sin x and y=cosxy = \cos x have exactly the same shape and differ only by a horizontal shift. Let us confirm the relationship with a formula.

cosx\cos x is sinx\sin x shifted to the left by π2\dfrac{\pi}{2}. In symbols,

cosx=sin(x+π2)\cos x = \sin\left(x + \dfrac{\pi}{2}\right)

Shifting a graph left by π2\dfrac{\pi}{2} amounts to replacing xx with x+π2x + \dfrac{\pi}{2}, and the peaks of sin\sin land exactly on the peaks of cos\cos.

Indeed, sinx\sin x has its maximum 11 (a peak) at x=π2x = \dfrac{\pi}{2}, while cosx\cos x has its maximum 11 at x=0x = 0. The peak of cos\cos is π2\dfrac{\pi}{2} to the left of the peak of sin\sin, exactly the amount of the shift.

Likewise sinx=cos(xπ2)\sin x = \cos\left(x - \dfrac{\pi}{2}\right), so sin\sin is cos\cos shifted right by π2\dfrac{\pi}{2}. Sine and cosine are the same wave, carried onto each other by a shift of π2\dfrac{\pi}{2}. The large dots on the graph are the peak of cos\cos at (0,1)(0, 1) and the peak of sin\sin at (π2,1)\left(\dfrac{\pi}{2}, 1\right).