Graphs of trig functions
Sine and cosine make smooth waves, while tangent repeats in steep branches split by asymptotes. Four numbers, in y = a sin(b(x − c)) + d, control the height, width and position of any trig graph.
Sin, cos and tan compared
| Function | Period | Range | Starts at | Asymptotes |
|---|---|---|---|---|
| sin x | 2π | −1 to 1 | 0, rising | None |
| cos x | 2π | −1 to 1 | 1, its peak | None |
| tan x | π | All real numbers | 0, rising | x = π/2 + nπ |
| sec x | 2π | |y| ≥ 1 | 1 | x = π/2 + nπ |
| csc x | 2π | |y| ≥ 1 | Undefined | x = nπ |
| cot x | π | All real numbers | Undefined | x = nπ |
Cosine is sine shifted left by π/2, so the two curves have exactly the same shape.
The general form
| Letter | Name | What it does |
|---|---|---|
| a | Amplitude | |a| is the height from the centre line to a peak. Negative a flips the wave. |
| b | Frequency | The period is 2π/|b|. A larger b squeezes the wave. |
| c | Phase shift | Moves the wave right by c. |
| d | Vertical shift | Moves the centre line to y = d. |
Everything here is also true for cosine. For tangent, the period is π/|b|.
A worked example
Find the features of y = 3 sin(2x − π) + 1.
- Factor out b, so it matches the general form: 3 sin(2(x − π/2)) + 1.
- Amplitude: 3, so the wave goes 3 above and below its centre.
- Period: 2π/2 = π.
- Phase shift: π/2 to the right.
- Centre line: y = 1. The maximum is 4, and the minimum is −2.
The most common mistake is reading the phase shift as π directly. Always factor out b first.
How to sketch a trig graph
- Draw the centre line y = d, and the lines for the maximum and minimum.
- Work out the period, and divide it into four equal parts along the x-axis, starting from the phase shift.
- For sine, plot in order: centre, maximum, centre, minimum, centre. For cosine: maximum, centre, minimum, centre, maximum.
- Join the points with a smooth wave, and repeat in each direction.
Where the waves come from
On the unit circle, the height of a point moving at a steady speed traces out a sine wave, and its horizontal position traces out a cosine wave. That is why trig functions model anything that repeats, like sound, light, tides and alternating current. Fourier’s remarkable discovery was that any repeating signal can be built by adding sine waves together.
Frequently asked questions
What is the period of sin x?
How do you find the amplitude?
What is the difference between the sin and cos graphs?
Does tan x have an amplitude?
What is a phase shift?
Keep going
Every figure on this page opens in ihateDesmos, where you can drag sliders and watch the graph respond.