To graph y = A sin(B(x − C)) + D or y = A cos(B(x − C)) + D, read four numbers off the equation: the amplitude is |A|, the period is 2π / |B|, the phase shift is C (to the right when C is positive), and the midline is y = D. Then split one period into four equal steps and plot five key points: sine runs midline, max, midline, min, midline, while cosine runs max, midline, min, midline, max.
Below, that one method handles a stretch, a flipped and shifted wave, a bracket you must factor first, an equation from a graph, and a Ferris wheel.
What the Parent Sine and Cosine Graphs Look Like
Both graphs come from the unit circle. As an angle x sweeps around it, sin x is the point's y-coordinate and cos x its x-coordinate. Each swings between 1 and −1, and after a full turn of 2π radians the pattern repeats. That repeat length is the period.
Five angles carry all the shape information: the start, the three quarter turns and the end.
x | 0 | π/2 | π | 3π/2 | 2π |
|---|---|---|---|---|---|
sin x | 0 (midline) | 1 (max) | 0 (midline) | −1 (min) | 0 (midline) |
cos x | 1 (max) | 0 (midline) | −1 (min) | 0 (midline) | 1 (max) |
So the two parent graphs have the same wave shape: amplitude 1, period 2π, midline y = 0, range [−1, 1]. The only difference is where the cycle starts. Sine starts on the midline heading up; cosine starts at its maximum.
In fact cos x = sin(x + π/2), so the cosine graph is the sine graph slid π/2 to the left. You can prove it with the sum formula for sin(a + b) from the trig identities cheat sheet: sin(x + π/2) = sin x · 0 + cos x · 1 = cos x.
Amplitude, Period, Phase Shift and Midline
y = A sin(B(x − C)) + D and y = A cos(B(x − C)) + D, with A ≠ 0 and B ≠ 0. Amplitude |A|. Period P = 2π / |B|. Phase shift C (right if C > 0, left if C < 0). Midline y = D. Maximum D + |A|, minimum D − |A|, so the range is [D − |A|, D + |A|].Each number is one of the function transformations you already know, applied to a wave:
| Number | Transformation | What it does to the wave |
|---|---|---|
A | vertical stretch by |A|, reflection if A < 0 | Peaks sit |A| above the midline. A negative A turns every max into a min. |
B | horizontal compression by a factor of 1/|B| | |B| cycles fit in a span of 2π, so the period is 2π / |B|. Bigger B, shorter waves. |
C | horizontal shift | The start of the cycle moves from x = 0 to x = C. |
D | vertical shift | The midline moves from y = 0 to y = D. |
Why is the period 2π / |B|? The parent wave finishes a cycle when its input runs from 0 to 2π. In sin(Bx) the input is Bx, and Bx reaches 2π when x = 2π / B. The OpenStax Precalculus 2e chapter 6 key concepts give the same period, 2π / |B|, with |A| as the amplitude.
You may also meet the frequency, the number of cycles per unit of x, which is 1 / P. If your class works in degrees, swap 2π for 360°: the period of y = sin(3x) is 360° / 3 = 120°.
The Five-Point Method for Sketching One Cycle
- Get the equation into factored form
Write it as
A sin(B(x − C)) + D. If the bracket readsBx − something, factorBout first (Example 3 shows why). - Read the four numbers
Amplitude
|A|, periodP = 2π / |B|, startx = C, midliney = D. Note the maxD + |A|and minD − |A|. - Make five x-values
Start at
Cand add a quarter periodP/4four times:C,C + P/4,C + P/2,C + 3P/4,C + P. - Attach the y-pattern
Sine with
A > 0: mid, max, mid, min, mid. Cosine withA > 0: max, mid, min, mid, max. IfA < 0, swap every max and min. - Plot and repeat
Draw a smooth curve through the points (round at the peaks, steepest at the midline), then copy the cycle as far as the question needs.
Graph one cycle of y = 2 cos(3x).
Read the numbers: A = 2, B = 3, C = 0, D = 0. Amplitude 2, midline y = 0, max 2, min −2.
Period P = 2π / 3, so a quarter period is P/4 = 2π / 12 = π/6.
x-values: 0, π/6, π/3, π/2, 2π/3. Cosine pattern (max, mid, min, mid, max) gives y-values 2, 0, −2, 0, 2.
Spot check: at x = π/3, 2 cos(3 · π/3) = 2 cos π = −2. That matches the minimum.
(0, 2), (π/6, 0), (π/3, −2), (π/2, 0), (2π/3, 2)Graph one cycle of y = −3 sin(x/2) + 1 and state its range.
Read the numbers: A = −3, B = 1/2, C = 0, D = 1. Amplitude |−3| = 3, midline y = 1, so the max is 1 + 3 = 4 and the min is 1 − 3 = −2.
Period P = 2π / (1/2) = 4π, quarter period π. x-values: 0, π, 2π, 3π, 4π.
A is negative, so the sine pattern flips to mid, min, mid, max, mid: y-values 1, −2, 1, 4, 1.
Spot check: at x = π, −3 sin(π/2) + 1 = −3 + 1 = −2. The wave really does dip first.
(0, 1), (π, −2), (2π, 1), (3π, 4), (4π, 1); range [−2, 4]How to Find the Phase Shift When B Is Not 1
Most textbook equations don't arrive factored. They look like y = A sin(Bx − c) + D, with B multiplying only the x. The shift is then c / B, not c.
The OpenStax key concepts write the general sinusoid this way, as A sin(Bx − C) + D with phase shift C/B. It is the same rule as ours; only the letter C means a different number.
Why divide by B? The cycle starts where the whole input equals zero. Setting Bx − c = 0 gives x = c / B. Factoring gets you there without memorising anything: Bx − c = B(x − c/B).
Graph one cycle of y = 4 sin(2x − π/3) − 1.
Factor the 2 out of the bracket: 2x − π/3 = 2(x − π/6). So y = 4 sin(2(x − π/6)) − 1 and the phase shift is π/6 to the right.
Amplitude 4, midline y = −1, max 3, min −5. Period 2π / 2 = π, quarter period π/4.
x-values from π/6 in steps of π/4 (use twelfths: π/6 = 2π/12, π/4 = 3π/12): π/6, 5π/12, 2π/3, 11π/12, 7π/6.
Sine pattern with A > 0: y-values −1, 3, −1, −5, −1.
Spot check: at x = 5π/12, the input is 2(5π/12) − π/3 = 5π/6 − 2π/6 = π/2, and 4 sin(π/2) − 1 = 3. That is the max.
(π/6, −1), (5π/12, 3), (2π/3, −1), (11π/12, −5), (7π/6, −1)Reading the shift in Example 3 as π/3. It looks right because the bracket says − π/3, but plug in x = π/3: the input is 2π/3 − π/3 = π/3, not 0, so the cycle hasn't started there. The opposite slip happens in factored form: in sin(2(x + π/4)) the shift is already π/4 left, and dividing by 2 again gives a wrong π/8. The fix for both is the same habit: factor first, then read the shift straight off x − C, with x + 1 meaning a shift of 1 to the left.
How to Write the Equation from a Graph
Run the method backwards. A maximum and the next minimum give all four numbers: the midline is halfway between them, the amplitude is half the gap, and the horizontal distance from max to min is half a period. Then choose the function that makes the shift easy. A cosine starts at a maximum, so it can start at any peak you can see.
A sinusoid has a maximum at (1, 5), and its next minimum is at (4, −1). Write an equation for it with cosine, then with sine.
Midline: D = (5 + (−1)) / 2 = 2. Amplitude: A = (5 − (−1)) / 2 = 3.
Max to next min is half a period: 4 − 1 = 3, so P = 6 and B = 2π / 6 = π/3.
Cosine starts at a max, and there is a max at x = 1, so C = 1: y = 3 cos((π/3)(x − 1)) + 2.
Sine starts on the midline a quarter period before the max: 1 − 6/4 = −1/2. So y = 3 sin((π/3)(x + 1/2)) + 2.
Spot check at x = 4: cosine gives 3 cos(π) + 2 = −1, sine gives 3 sin(3π/2) + 2 = −1. Both hit the minimum.
y = 3 cos((π/3)(x − 1)) + 2, or equally y = 3 sin((π/3)(x + 1/2)) + 2Neither answer is "the" answer. Any max gives a valid cosine shift (C = 1, 7 or −5, a whole period apart), and y = −3 cos((π/3)(x − 4)) + 2 traces the same curve. If yours differs from the book's, test two key points before calling it wrong.
Sine and Cosine in a Word Problem
Anything that turns or swings at a steady rate can be modelled by a sinusoid. The trick is matching the starting position to the right pattern.
A Ferris wheel is 40 m across, its center is 22 m above the ground, and it turns once every 8 minutes. You board at the bottom at t = 0. Write your height h (in m) after t minutes, find your height at t = 3 min, and find when you first reach 32 m.
Midline is the center height: D = 22 m. Amplitude is the radius: 40 / 2 = 20 m. So the lowest point is 22 − 20 = 2 m and the top is 42 m.
Period 8 min, so B = 2π / 8 = π/4 per minute.
You start at the minimum, which is the flipped-cosine pattern (min, mid, max, mid, min). So A = −20: h(t) = −20 cos(πt/4) + 22.
At t = 3: h = −20 cos(3π/4) + 22 = −20(−√2/2) + 22 = 10√2 + 22 ≈ 36.14 m.
For 32 m: −20 cos(πt/4) + 22 = 32, so cos(πt/4) = −1/2. The first angle with that cosine is 2π/3, so πt/4 = 2π/3 and t = 8/3 ≈ 2.67 min.
Size check: 32 m is above the 22 m center, so you should pass it after the 2-minute quarter turn but before the 4-minute top. 2.67 min fits.
h(t) = −20 cos(πt/4) + 22; about 36.14 m at 3 min; first at 32 m after 8/3 ≈ 2.67 min (about 2 min 40 s)How to Check Your Graph
A wrong sinusoid still looks like a nice wave, so check with numbers.
- Substitute two key points. Put your claimed max and one midline crossing back into the original equation (the unfactored one). This catches a shift read as
cinstead ofc / B. - Check the extremes. The highest and lowest y-values on your sketch must be
D + |A|andD − |A|, and they must sit symmetrically about the midline. - Check the spacing. Peak to peak along the x-axis must equal
2π / |B|, and max to next min must be half of it. - Test an in-between point. An eighth of a period after a sine starts,
y = D + A(√2/2), about 71% of the way to the peak. For Example 3,x = 7π/24givesy = 2√2 − 1 ≈ 1.83.
A graphing calculator in radian mode makes a good final comparison. For a homework problem you've already worked through, Solver AI can scan it and show the steps, so you can compare your amplitude, period and shift with its steps line by line.
Practice Problems
Sketch each one by hand with the five-point method, then check two points by substitution.
- Give the amplitude, period, phase shift, midline and range of
y = 5 cos(3x) − 2. - List the five key points of one cycle of
y = −sin(x − π/4), starting at the phase shift. - Rewrite
y = 2 cos(πx + π) + 3in factored form, then list five key points of one cycle. - A sinusoid has a maximum at
(2, 7), and its next minimum is at(6, 1). Write a cosine equation for it. - At a harbor, high tide of 4.8 m is at 3:00 a.m. and the next low tide of 0.6 m is at 9:12 a.m. Using
tin hours after midnight, write a cosine model for the water depth, find the depth at noon to the nearest 0.01 m, and find the first time after 3:00 a.m. that the water is at its average depth.
1. Amplitude 5, period 2π/3, no phase shift, midline y = −2, range [−7, 3]. 2. Period 2π, quarter π/2, flipped sine: (π/4, 0), (3π/4, −1), (5π/4, 0), (7π/4, 1), (9π/4, 0). 3. y = 2 cos(π(x + 1)) + 3: shift 1 left, period 2, amplitude 2, midline 3, points (−1, 5), (−1/2, 3), (0, 1), (1/2, 3), (1, 5). 4. Midline 4, amplitude 3, half period 4 so P = 8 and B = π/4: y = 3 cos((π/4)(x − 2)) + 4. 5. Midline (4.8 + 0.6)/2 = 2.7 m, amplitude 2.1 m, half period 6.2 h so P = 12.4 h: h(t) = 2.1 cos((2π/12.4)(t − 3)) + 2.7. At noon, h(12) ≈ 2.38 m. Average depth (the midline) comes a quarter period after high tide: 3 + 3.1 = 6.1 h, which is 6:06 a.m.