You already know the shape of the three trig graphs: the smooth waves of
\sin(x) and \cos(x), and the
repeating spikes of \tan(x). Now we learn to
reshape them — make a wave taller, squash it up so more of it fits,
slide it sideways, or lift the whole thing up — all by changing four numbers.
Every one of these moves lives in a single master formula. Take
\sin as our example:
y = a\,\sin(bx + c) + d
Each letter controls one transformation, and only one:
-
a — the amplitude. It stretches the wave
vertically, so the peaks reach a and the troughs
reach -a. Bigger a, taller wave.
-
b — changes the period. One full wave now
takes \dfrac{360^\circ}{b}, so a bigger
b squashes the wave horizontally and fits more
cycles into the same space.
-
c — a horizontal phase shift. It slides the
whole wave sideways. Because c is inside the
bracket with x, a positive c
slides the wave to the left.
-
d — a vertical shift. It lifts the whole
wave up by d (or down, if
d is negative), so it now waves about the line
y = d instead of about zero.
The same four numbers work for y = a\,\cos(bx + c) + d and
y = a\,\tan(bx + c) + d in exactly the same way. We work in
degrees here; in radians the only change is that a plain period of
360^\circ becomes 2\pi, so the
period is \dfrac{2\pi}{b}.
Think of the hours of daylight where you live, plotted across a whole year. Deep
winter is short and dark, midsummer is long and bright, and it swings smoothly
between the two — a perfect sine wave. The amplitude
a is how extreme your seasons are (huge near the poles,
tiny at the equator), the period is one year, and the
vertical shift d is your average day
length, about 12 hours. Nature is transforming a trig graph
for you every single day.
Stretch and shift it yourself
The faint dashed curve is the plain \sin(x) for comparison; the
bold curve is y = a\,\sin(bx) + d. Drag the sliders below and
watch it respond: a makes it taller,
b squashes it so more waves fit, and
d lifts the whole thing up or down. The angle
x runs along the bottom in degrees.
When a bird sings, it pushes the air into a trig wave. The
amplitude a is how loud the note
is — a big amplitude is a big sound. The frequency
b is how high the pitch is — squash the wave so it
repeats faster and the pitch rises; stretch it out and the pitch drops. Every note you
have ever heard is a\,\sin(bx) with the knobs set to
different values.