Sine/Cosine Wave Explorer

parameterized trig waves, visualized live

Loading interactive simulation...

Lesson

The theory — Sine/Cosine Wave Explorer

Every sine wave you will meet is the same curve with four numbers applied to it: y = A·sin(Bx + C) + D. A stretches it vertically, B squeezes it horizontally, C slides it sideways and D lifts it. Nothing else about the shape can change.

What each symbol means

A
the amplitude — half the distance from trough to crest. The readout gives |A| because a negative A flips the wave without changing its height.
B
the frequency factor, and note the wording: it is not the frequency. It counts how many radians the argument advances per unit of x.
C
the phase term, in radians. It is inside the bracket, which is why it is not the shift itself.
D
the vertical shift — the midline the wave oscillates about.

Where the formula comes from

  1. Sine repeats when its argument advances by . So the wave repeats when Bx + C increases by .
  2. C is constant, so all of that increase must come from Bx: you need B·Δx = 2π.
  3. Therefore the period is T = 2π/|B|6.2832 when B = 1, and halved when B = 2. The absolute value is there because a negative B reverses the wave but cannot give it a negative length.

How to read what you see

Drag B and watch the phase-shift line: it is the fastest way to see that the shift depends on both numbers. The panel echoes the equation back with your four numbers in it, then derives each property rather than merely stating it — |A|, the period as 2π/|B|, the phase shift as −C/B, and D.

Assumes
The angle is in radians, which is why appears rather than 360. The four parameters are also independent — this form cannot produce a wave whose amplitude decays, however you set them.
Breaks when
The trap is the phase shift, and the readout is deliberately explicit about it: the wave moves by −C/B, not by −C. With B = 2 and C = π the shift is −π/2, half of what the bracket seems to promise, because C is measured in the squeezed coordinate rather than in x. Read sin(Bx + C) as sin(B(x + C/B)) and the factor of B stops being a surprise.

how a spinning wheel creates sine/cosine 🖖

Sine and cosine aren't really about triangles — they're the horizontal and vertical shadow of a point moving at constant speed around a circle. As the point sweeps through angle θ = Bx + C, its vertical position traces sin(θ) while its horizontal position traces cos(θ), which is exactly why the two curves are identical except for a quarter-turn (π/2) phase offset. This is also why B controls frequency but never amplitude: B only changes how fast the point goes around the wheel, not how far its shadow swings. The same rotating-vector idea — a spinning wheel in disguise — is how engineers describe AC electricity, sound, and radio signals as phasors.

'sine' comes from a mistranslation 🖖

The word sine is an accident of history. Indian mathematicians called it jyā (bowstring); Arabic scholars borrowed it as jayb, which also happened to mean 'bay' or 'fold'. When Latin translators read the word, they rendered that unrelated meaning literally as sinus — Latin for a bay or the fold of a garment. So every time you write sin, you are using a 12th-century mistranslation of 'bowstring' into 'fold'.

Practice

Check yourself

Predict the answer first, then use the controls above to find out. Reveal only after you have committed to a guess — that is what makes it practice.

  1. The phase π/2 preset sets C = 1.5708 and the phase shift row reads −1.5708 — the wave slides left even though C is positive. Now change B to 2 and leave C alone. Predict the phase shift before you look.

    Show answer
    −0.7854, exactly half; at B = 4 it is −0.3927. The row computes −C/B, not −C, so raising the frequency shrinks the shift in the same proportion. C is measured in radians of the argument while the shift is measured along x, and B is the exchange rate between the two. The minus sign is the other half of the surprise: sin(x + C) does at x = −C what plain sine does at 0, so adding to the argument moves the picture backwards. This particular case also has a name — with B = 1 and C = π/2, sin(x + π/2) is cos x. Switch the function to cos and put C back to 0 to see the same curve arrive from the other direction.
  2. The combined shift preset draws 1.5·cos(x − 0.7854) + 1, and the amplitude row reads 1.5. What are the highest and lowest values this wave actually reaches, and why does no row print them?

    Show answer
    2.5 and −0.5. Amplitude is a half-height measured from the wave’s centre line, and here the centre line is not y = 0: the vertical shift row says D = 1. So the extremes are D + |A| and D − |A|. No row prints them because these four rows are the four *parameters* of the standard form A·sin(Bx + C) + D, not its outputs. Reading |A| as the maximum is the standard slip, and the vertical shift row sitting directly beneath it is what stops you making it.

Problem solved in full

  1. A shifted cosine shown as a plain sine plus a plain cosine 6 steps

    y = 1.5 cos(x − 0.7854) + 1. Read off the amplitude, period and shifts — then show the shifted cosine is a plain sine plus a plain cosine. This is the combined shift state.

    1. Four parameters, and each one moves the curve in a different way. Only two of them interact.

    2. The amplitude is the half-height, so the curve lives in a band of width 2|A| centred on D. Nothing else affects the range.

    3. The period depends on B alone. Larger B means the argument runs faster, so the period shortens.

    4. The horizontal shift is where the argument is zero, which is −C/B. Dividing by B is the step people skip, and it is the step that matters as soon as B is not 1.

    5. Now expand. The cosine of a difference splits into two terms, and cos(π/4) and sin(π/4) are both 1/√2.

    6. Go back the other way to check. The two coefficients recombine to the original amplitude, and their ratio recovers the phase.

    Answer

    1.0607 cos x + 1.0607 sin x + 1, and the two coefficients are 1.5/√2. Expanding the shift with the addition formula turns one phase-shifted wave into a weighted sum of an unshifted sine and cosine at the same frequency — and the process reverses, so any a cos x + b sin x collapses back to a single wave of amplitude √(a² + b²) and phase arctan(b/a). That equivalence is the reason Fourier series need only sines and cosines and never a third parameter per term: the phase is already carried, hidden in the ratio of the two coefficients. The other thing worth taking from this panel is the minus sign — the horizontal shift is −C/B, not C, and with B ≠ 1 the two are not even the same size.

Learning path

Circles and waves are the same motion

Leads to Circular motion the four numbers that describe any sinusoid, and the period as T = 2π/|B|.

References (2)

Example problems

  • basic sine - y=sin(x) — amplitude 1, period 2p≈6.28
  • double frequency - y=sin(2x) — double frequency, period halved to p≈3.14
  • phase shift by p/2 - y=sin(x+p/2) — phase shift left by p/2, equals cos(x)
  • combined shift - y=1.5·cos(x-p/4)+1 — combined amplitude, phase, and vertical shift