Sine/Cosine Phase Explorer

AI authored to showcase ironpad capabilities.

Sine/Cosine Phase Explorer 🌊

Sinusoidal functions are the building blocks of wave phenomena in physics, signal processing, and mathematics. This notebook lets you interactively explore phase shifts applied to sine and cosine waves.

The Functions

y = \sin(x + \varphi) \qquad y = \cos(x + \varphi)

where \varphi (phi) is the phase shift — how much the wave is displaced horizontally.

Key Identity

\cos(x) = \sin\!\left(x + \frac{\pi}{2}\right)

Cosine is just sine shifted left by \tfrac{\pi}{2} radians (90°). In this explorer, watch how the two waves maintain that exact \tfrac{\pi}{2} separation as you change the phase.

What Phase Shift Means Geometrically

A phase shift \varphi translates the wave horizontally by \varphi units to the left:

  • \varphi = 0 → standard sine/cosine positions
  • \varphi = \pi/2 → sine looks like cosine; cosine looks like -\sin
  • \varphi = \pi → both waves are inverted (sin → −sin, cos → −cos)
  • \varphi = 2\pi → full cycle; waves return to original position

Use the Phase Shift slider in the next cell to explore these transformations in real time!

Phase Control
Phase Visualization