Graphs of trig functions

Stage 7 · Trigonometry Free lesson ≈ 13 min read Intermediate

Take the unit circle and unroll it like a strip of tape, and the up-and-down dance of a point on the circle straightens out into a wave. Sine and cosine are nothing more exotic than that wave, seen from two starting points.

From circle to wave

On the unit circle, a point at angle \( x \) sits at the coordinates \( (\cos x, \sin x) \). The sine is its height — how far above or below the horizontal axis the point is. As the angle grows and the point travels around the circle, that height rises and falls in a perfectly regular rhythm. To graph \( y = \sin x \), we simply unroll the angle along a horizontal axis and let the height become the new vertical value.

Start at \( x = 0 \): the point sits on the right of the circle at height \( 0 \), so \( \sin 0 = 0 \). A quarter turn later, at \( x = \frac{\pi}{2} \), the point is at the very top and \( \sin \frac{\pi}{2} = 1 \). At the half turn \( x = \pi \) the height is back to \( 0 \); at \( x = \frac{3\pi}{2} \) the point is at the bottom and \( \sin \frac{3\pi}{2} = -1 \); and at a full turn \( x = 2\pi \) we are back where we started, with \( \sin 2\pi = 0 \).

\[ \sin 0 = 0, \quad \sin\tfrac{\pi}{2} = 1, \quad \sin\pi = 0, \quad \sin\tfrac{3\pi}{2} = -1, \quad \sin 2\pi = 0 \]

Because the point returns to its start after one full lap, the wave repeats forever with the same shape. The length of one full repetition is the period, and for plain \( y = \sin x \) that period is \( 2\pi \). Since the height of a point on the unit circle never exceeds the radius \( 1 \) in either direction, the output always lands between \( -1 \) and \( 1 \) — we say the range is \( [-1, 1] \). The graph is the smooth, endlessly repeating curve mathematicians call a sinusoid.

In words Sine is the height of a point going around the unit circle. Plot that height against the angle and you get a wave: it climbs to \( 1 \), falls to \( -1 \), and returns to start every \( 2\pi \) — forever.

Cosine is sine, shifted

Cosine is the horizontal coordinate of the same circling point, \( x \mapsto \cos x \). Plotted on its own, \( y = \cos x \) is the very same wave shape as sine — same period \( 2\pi \), same range \( [-1, 1] \) — but it starts at a different place. At \( x = 0 \) the point sits on the right of the circle, so its horizontal coordinate is at its maximum: \( \cos 0 = 1 \). The cosine wave begins at the crest, while the sine wave begins climbing through zero.

That single observation can be written exactly. The cosine curve is the sine curve slid \( \frac{\pi}{2} \) to the left:

\[ \cos x = \sin\!\left(x + \tfrac{\pi}{2}\right) \]

You can read this straight off the special angles. The sine curve reaches its peak of \( 1 \) at \( x = \frac{\pi}{2} \); the cosine curve reaches that same peak a quarter-turn earlier, at \( x = 0 \). Shifting sine to the left by \( \frac{\pi}{2} \) moves its peak from \( \frac{\pi}{2} \) back to \( 0 \), landing exactly on the cosine curve. Everything you learn about sine therefore transfers instantly to cosine — they are one wave wearing two names.

The four transformations

Real-world waves are rarely the bare \( y = \sin x \). They can be taller, faster, shifted sideways, and lifted up. All four adjustments live in one master form:

\[ y = A\sin\!\big(B(x - C)\big) + D \]

Each letter controls exactly one feature, and they do not interfere with one another.

Amplitude \( |A| \). The factor \( A \) stretches the wave vertically. Instead of reaching \( \pm 1 \), the curve now reaches \( \pm |A| \). The amplitude is the distance from the midline up to a crest, and we take the absolute value because a negative \( A \) flips the wave upside down without changing its height. For \( y = 2\sin x \), the amplitude is \( 2 \), so the wave swings between \( -2 \) and \( 2 \).

Period \( \dfrac{2\pi}{B} \). The factor \( B \) squeezes the wave horizontally — it counts how many cycles fit in the usual span of \( 2\pi \). A larger \( B \) packs in more cycles, so each one is shorter. One full repetition now takes

\[ \text{period} = \frac{2\pi}{B}. \]

For \( y = \sin(2x) \), we have \( B = 2 \), so the period is \( \frac{2\pi}{2} = \pi \): the wave repeats twice as fast.

Phase shift \( C \). Writing the inside as \( B(x - C) \) makes the horizontal slide easy to read. The whole wave moves right by \( C \) when \( C \) is positive, and left when \( C \) is negative — the curve does at \( x = C \) what the basic wave does at \( x = 0 \). The minus sign is the trap: \( \sin(x - \frac{\pi}{3}) \) shifts \( \frac{\pi}{3} \) to the right, not the left.

Midline \( D \). Finally \( D \) lifts the entire wave up by \( D \) (or down, if \( D \) is negative). The wave no longer oscillates around the \( x \)-axis but around the horizontal line \( y = D \), called the midline. Crests sit at \( y = D + |A| \) and troughs at \( y = D - |A| \).

Drag the sliders on the grapher below — it is set up for \( y = 2\sin x \) to start. Change the amplitude, period, phase and midline one at a time and watch which feature of the wave responds; isolating them is the fastest way to make the master form second nature.

Tip Read the master form in order: \( A \) controls how tall, \( B \) controls how fast (period \( \frac{2\pi}{B} \)), \( C \) controls how far sideways, \( D \) controls how high. The only sign to watch is the phase shift — \( x - C \) means shift right by \( C \).

Tangent and its asymptotes

Tangent is not a stretched sine; it is built as a ratio of the two we already know:

\[ \tan x = \frac{\sin x}{\cos x}. \]

This single definition explains everything about its strange-looking graph. Wherever \( \cos x = 0 \), the denominator vanishes and the ratio is undefined — the curve shoots off toward \( \pm\infty \) and the graph has a vertical asymptote. On the unit circle, the horizontal coordinate is zero at the top and bottom, that is at \( x = \frac{\pi}{2} \), \( x = \frac{3\pi}{2} \), and every half-turn beyond. So tangent has asymptotes at

\[ x = \frac{\pi}{2} + n\pi \quad\text{for every integer } n. \]

Between consecutive asymptotes the curve sweeps continuously from \( -\infty \) up to \( +\infty \), passing through zero wherever \( \sin x = 0 \) — at \( x = 0, \pi, 2\pi, \dots \). And because both sine and cosine flip sign together every half-turn, their ratio repeats not every \( 2\pi \) but every \( \pi \). The period of tangent is \( \pi \) — half that of sine and cosine. Tangent has no amplitude at all: with no largest value to reach, the idea of a maximum height simply does not apply.

Step the grapher below across a few periods and watch the curve race up to each asymptote, break, and reappear at the bottom of the next branch.

Reading a graph back into an equation

The real test is running the process backwards: you are handed a wave and must recover its equation. Four measurements, taken in order, pin it down.

First find the midline \( D \) — the horizontal line halfway between the crests and troughs. Then the amplitude \( |A| \) is the distance from that midline up to a crest, which also equals half the gap between the highest and lowest points. Next measure the period — the horizontal distance for one full cycle — and recover \( B \) from \( B = \frac{2\pi}{\text{period}} \). Finally the phase shift \( C \) is read from where a convenient landmark sits: for a sine curve, find an \( x \) where the wave crosses its midline heading upward, since the basic sine does exactly that at \( x = 0 \).

Example Find the amplitude, period and midline of \( y = 3\sin(2x) - 1 \).
  1. Match the master form \( y = A\sin(B(x - C)) + D \): here \( A = 3 \), \( B = 2 \), \( C = 0 \) and \( D = -1 \).
  2. Amplitude is \( |A| = |3| = 3 \), so the wave rises \( 3 \) above and falls \( 3 \) below its midline.
  3. Period is \( \dfrac{2\pi}{B} = \dfrac{2\pi}{2} = \pi \): one full cycle every \( \pi \) units.
  4. Midline is \( y = D = -1 \), so crests sit at \( y = -1 + 3 = 2 \) and troughs at \( y = -1 - 3 = -4 \).

Amplitude \( \mathbf{3} \), period \( \boldsymbol{\pi} \), midline \( \mathbf{y = -1} \).

Example Describe how \( y = \cos\!\left(x - \tfrac{\pi}{4}\right) \) sits relative to the basic cosine, and where its first crest lands for \( x \ge 0 \).
  1. Compare with \( y = A\cos(B(x - C)) + D \): here \( A = 1 \), \( B = 1 \), \( C = \frac{\pi}{4} \) and \( D = 0 \).
  2. Since \( C = \frac{\pi}{4} \) is positive, the wave shifts to the right by \( \frac{\pi}{4} \) — the minus sign inside means a rightward slide.
  3. Amplitude is \( 1 \) and the midline is \( y = 0 \), so the shape is unchanged; only the horizontal position moves.
  4. The basic cosine has its crest at \( x = 0 \). Shifting right by \( \frac{\pi}{4} \) moves that crest to \( x = 0 + \frac{\pi}{4} = \frac{\pi}{4} \).

It is the cosine wave shifted right by \( \frac{\pi}{4} \), with its first crest at \( \mathbf{x = \frac{\pi}{4}} \).

Practice

Try each one yourself, then reveal the full solution.

1. State the amplitude and period of \( y = 4\sin(3x) \).

Match the form \( y = A\sin(Bx) \): here \( A = 4 \) and \( B = 3 \).

The amplitude is \( |A| = |4| = 4 \).

The period is \( \dfrac{2\pi}{B} = \dfrac{2\pi}{3} \).

So the amplitude is \( \mathbf{4} \) and the period is \( \mathbf{\dfrac{2\pi}{3}} \).

2. Where are the vertical asymptotes of \( y = \tan x \) on the interval \( 0 \le x \le 2\pi \)?

Since \( \tan x = \dfrac{\sin x}{\cos x} \), an asymptote occurs wherever \( \cos x = 0 \).

On the unit circle, the horizontal coordinate is zero at the top and bottom of the circle.

Within \( 0 \le x \le 2\pi \) that happens at \( x = \dfrac{\pi}{2} \) and \( x = \dfrac{3\pi}{2} \).

So the asymptotes are at \( \mathbf{x = \dfrac{\pi}{2}} \) and \( \mathbf{x = \dfrac{3\pi}{2}} \).

3. A sine wave swings between a maximum of \( 5 \) and a minimum of \( 1 \). Find its amplitude and midline.

The midline sits halfway between the maximum and minimum: \( D = \dfrac{5 + 1}{2} = 3 \).

The amplitude is the distance from the midline to a crest, which is half the total swing: \( |A| = \dfrac{5 - 1}{2} = 2 \).

Check: midline \( 3 \) plus amplitude \( 2 \) gives a crest at \( 5 \); minus \( 2 \) gives a trough at \( 1 \). ✓

So the amplitude is \( \mathbf{2} \) and the midline is \( \mathbf{y = 3} \).

Keep building your foundation

This is one lesson of the EastMath path. Every idea is built on the one before it — keep climbing.