Sine and Cosine on the Same Axes

April 12, 2026

Problem

Graph y = sin(x) and y = cos(x) on the same axes from 0 to 2π and study their relationship.

Explanation

Plotted side-by-side, sine and cosine reveal a beautiful relationship: they have the exact same shape, but cosx\cos x is shifted to the left by π/2\pi/2 (or equivalently, sine is shifted to the right by π/2\pi/2). One is the other in disguise.

The Phase Relationship

These two formulas are equivalent:

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

sinx=cos ⁣(xπ2)\sin x = \cos\!\left(x - \dfrac{\pi}{2}\right)

Step-by-Step Solution

Given: f(x)=sinxf(x) = \sin x and g(x)=cosxg(x) = \cos x on [0,2π][0, 2\pi].

Find: Their values at the four axis-aligned angles, the relationship between them, and where they intersect.


Step 1 — Tabulate at the cardinal angles.

  • x=0x = 0: sin0=0\sin 0 = 0, cos0=1\cos 0 = 1
  • x=π/2x = \pi/2 (90°): sin(π/2)=1\sin(\pi/2) = 1, cos(π/2)=0\cos(\pi/2) = 0
  • x=πx = \pi (180°): sinπ=0\sin\pi = 0, cosπ=1\cos\pi = -1
  • x=3π/2x = 3\pi/2 (270°): sin(3π/2)=1\sin(3\pi/2) = -1, cos(3π/2)=0\cos(3\pi/2) = 0
  • x=2πx = 2\pi (360°): sin2π=0\sin 2\pi = 0, cos2π=1\cos 2\pi = 1

Notice the pattern: when one is at a peak (±1\pm 1), the other is at a zero. They alternate.

Step 2 — Find where the two curves intersect.

We want sinx=cosx\sin x = \cos x. Dividing both sides by cosx\cos x (assuming it's nonzero):

sinxcosx=1    tanx=1\dfrac{\sin x}{\cos x} = 1 \;\Longrightarrow\; \tan x = 1

Solving on [0,2π][0, 2\pi]:

x=π4    or    x=π+π4=5π4x = \dfrac{\pi}{4} \;\;\text{or}\;\; x = \pi + \dfrac{\pi}{4} = \dfrac{5\pi}{4}

Step 3 — Find the values at the intersection points.

At x=π/4x = \pi/4: sin(π/4)=cos(π/4)=220.707\sin(\pi/4) = \cos(\pi/4) = \dfrac{\sqrt{2}}{2} \approx 0.707. So they cross at (π/4,2/2)(\pi/4,\, \sqrt{2}/2).

At x=5π/4x = 5\pi/4: sin(5π/4)=cos(5π/4)=220.707\sin(5\pi/4) = \cos(5\pi/4) = -\dfrac{\sqrt{2}}{2} \approx -0.707. They cross at (5π/4,2/2)(5\pi/4,\, -\sqrt{2}/2).

Step 4 — Verify the phase shift formula at one point.

At x=0x = 0: sin(0+π/2)=sin(π/2)=1=cos0\sin(0 + \pi/2) = \sin(\pi/2) = 1 = \cos 0. ✓

At x=π/2x = \pi/2: sin(π/2+π/2)=sinπ=0=cos(π/2)\sin(\pi/2 + \pi/2) = \sin\pi = 0 = \cos(\pi/2). ✓

The identity cosx=sin(x+π/2)\cos x = \sin(x + \pi/2) holds at every xx.


Answer: Sine and cosine are identical curves shifted by π/2\pi/2. On [0,2π][0, 2\pi], they intersect at:

  • (π4,  22)(0.785,  0.707)\left(\dfrac{\pi}{4},\; \dfrac{\sqrt{2}}{2}\right) \approx (0.785,\; 0.707)
  • (5π4,  22)(3.927,  0.707)\left(\dfrac{5\pi}{4},\; -\dfrac{\sqrt{2}}{2}\right) \approx (3.927,\; -0.707)

Both have period 2π2\pi, range [1,1][-1, 1], and amplitude 1. Cosine "leads" sine by π/2\pi/2 — wherever sine is, cosine was a quarter-period ago.

Try It

  • Slide the point widget — watch both functions read out simultaneously.
  • The two yellow dots mark intersection points sinx=cosx\sin x = \cos x at x=π/4x = \pi/4 and x=5π/4x = 5\pi/4.
  • Notice how one is at a peak whenever the other crosses zero.

Interactive Visualization

Parameters

0.79
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Sine and Cosine on the Same Axes | MathSpin