Quarry School

Build an equation from a graph

Explain it like I am five

Think of rebuilding a Ferris wheel from a photo and a stopwatch: top and bottom seats give its size and hub height, the time from top to top gives one turn, and you pick a start.

A graph peaks at y = 10, bottoms at y = 2, and has neighboring peaks at x = 1 and x = 7. Size: A = 10−22 = 4. Center: B = 10+22 = 6. Period: T = 7 − 1 = 6, so ω = 2π6 = π3. A positive cosine starts at a peak, so the start is h = 1 and φ = ω × h = π3. Equation: y = 4 cos(π3x − π3) + 6.

Check x = 4, halfway between the peaks: the inside is π3 × 4 − π3 = 4π3 − π3 = π, cos π = −1, and y = −4 + 6 = 2, the bottom. Why φ = ω × h: at the start x = h the inside ω × h − φ must be 0.

In plain words

Think of rebuilding a Ferris wheel from a picture and a timing record. The highest and lowest positions tell you the center and size. Two neighboring peaks tell you how long one trip takes. Then you choose where to call the start. A positive Cosine model begins at a peak. A positive Sine model begins where the wave crosses its center going up. Either can describe the same picture. You must match the direction at that point, not only its height. Once you have those measurements, writing the equation is filling four labeled slots. You can then predict points and compare them with the graph.

π2π3π4π5π2345678910midline y = 6amplitude 3one periodcycle startspeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
Reminder
  • Average and half-difference. Maximum 9 and minimum 3 give B = 6 and A = 3.
  • Horizontal distance. From x = 1 to x = 9 the distance is 8.
  • Recover input speed. T = 8 gives ω = π4; multiplying by 8 gives 2π.
  • Solving for φ. At h = 1, ωh − φ = 0 gives φ = ωh; substituting gives ωh − ωh = 0.
  • Quarter-turn values. cos 0 = 1, cos(π2) = 0, cos π = −1.
Why it works. The extreme-height formulas determine |A| and B. Adjacent matching graph features determine T, which determines ω = 2πT. Choosing positive A fixes the meaning of the start: an upward midline crossing for sine or a maximum for cosine. At x = h, the inside ωx − φ must equal 0, so φ = ωh. One quarter period changes the inside by π2, giving the intermediate graph stages and a direct check of the equation.
RuleRule: A = ymax−ymin2 > 0, B = ymax+ymin2, ω = 2πT, φ = ωh. Choose h at an upward middle crossing for sine or a peak for cosine.
The same idea, five ways
Say it

Build a sine or cosine rule that matches the pictured wave.

Write it

A graph determines height, center, repeat width and a suitable cycle start.

In math
  • y = A sin(ω(x − h)) + B
  • y = A cos(ω(x − h)) + B
  • φ = ωh
  • Quarter period = T4
  • Graph words: use a peak or an upward midline crossing.
Like

Rebuild a wheel's size and timing from a picture of its motion.

See it
π2π3π4π5π246810amplitude 3one periodpeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
The same idea, other ways
As four measurements

Height span, center height, repeat width and chosen starting position fill four formula slots.

π2π3π4π5π246810amplitude 3one periodpeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
As reverse engineering

Reading a formula predicts a graph. Reading the graph recovers the same numbers by undoing those predictions.

.1Positive sine at an upward middle crossing

A Midline crossing is where the wave passes through its center height. An upward crossing passes from below the center to above it. Positive sine has exactly that direction at inside input 0.

  • Rule: choose h at an upward crossing when A > 0.
π2π3π4π5π6π7π−22468amplitude 5one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
The same idea, five ways
Say it

Positive sine at an upward middle crossing

Write it

An upward crossing means the graph passes from below the center to above it. Positive sine has exactly that direction at inside input 0.

In math
  • Rule: choose h at an upward crossing when A > 0.
Like

Start timing the wheel when the seat passes its center while rising.

See it
π2π3π4π5π6π7π−22468amplitude 5one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
Worked exampleRung 4: an upward middle crossing

A graph has maximum 8, minimum −2, period 10 and an upward midline crossing at x = 2. Write a positive sine equation. Upward means the height passes through the middle from below to above.

π2π3π4π5π6π7π−22468amplitude 5one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. A = 8−(−2)2 = 5 and B = 8+(−2)2 = 3.Half the span gives the amplitude; average gives the center.
  2. ω = 2π10 = π5.The inside must advance one full turn during 10 horizontal units.
  3. Choose positive sine with h = 2, the upward middle crossing.Sine begins at 0 and rises, so after adding 3 it starts at the center and rises.
  4. φ = ωh = π5 × 2 = 2π5.Convert horizontal position into inside offset.
  5. Plug back: π5 × 2 − 2π5 = 0.The crossing is at the intended inside start.
  6. Write y = 5 sin(π5x − 2π5) + 3.The positive A preserves the upward direction.
Answer
y = 5 sin(π5x − 2π5) + 3
Check A quarter period later, x = 2 + 104 = 92, the inside is π2 and y = 8. Three quarters later, x = 192, the inside is 3π2 and y = −2.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: Counterexample: Any middle crossing can be used with positive sine.
Every cycle also has a downward crossing, whose direction is opposite.
✓ Instead: Check that the graph rises through the selected crossing.
Tips and tricks
  • Tip: Check that the graph rises through the selected crossing.
.2Positive cosine at a peak

Positive cosine gives its top height at inside 0, so a peak supplies h directly.

  • Rule: choose h at a maximum when A > 0.
π2π3π4π5π246810amplitude 3one periodpeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
The same idea, five ways
Say it

Positive cosine at a peak

Write it

Positive cosine gives its top height at inside 0, so a peak supplies h directly.

In math
  • Rule: choose h at a maximum when A > 0.
Like

Start timing the wheel when the seat reaches its top.

See it
π2π3π4π5π246810amplitude 3one periodpeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
Worked exampleRung 3: a shifted cosine graph

A smooth sinusoidal graph has maximum 9, minimum 3 and consecutive peaks at x = 1 and x = 9. Write a positive cosine equation. This asks you to turn its heights, width and peak position into a formula.

π2π3π4π5π246810amplitude 3one periodpeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. A = 9−32 = 3 and B = 9+32 = 6.The two extreme heights determine size and center.
  2. T = 9 − 1 = 8; ω = 2π8 = π4.Adjacent peaks are the same stage one cycle apart.
  3. Choose cosine with positive A and h = 1.At the chosen start, positive cosine sits at a peak.
  4. φ = ωh = π4 × 1 = π4.φ is an inside offset, so multiply the x-distance by the inside coefficient.
  5. Plug h back: π4 × 1 − π4 = 0.The chosen peak position feeds cosine its starting input.
  6. Write y = 3 cos(π4x − π4) + 6, or y = 3 cos(π4(x − 1)) + 6.Factoring displays the horizontal distance without changing the function.
Answer
y = 3 cos(π4x − π4) + 6
Check At x = 1 and 9, the inside is 0 and 2π, giving 9. At x = 5, halfway between, the inside is π, giving 3.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: Counterexample: Use a trough as h and keep A positive.
At inside 0, positive cosine is at its maximum, not its minimum.
✓ Instead: Use a peak, or choose negative A for a trough.
Tips and tricks
  • Tip: Use a peak, or choose negative A for a trough.
.3Different equivalent equations

A selected phase shift belongs to the chosen sine or cosine representation. The same wave can have a different start in another representation. Moving h by a whole T also keeps the same repeating graph. On the unit circle, a clockwise quarter turn sends a point's vertical coordinate to its horizontal coordinate. Therefore sin u = cos(u − π2) for every angle u, which explains the quarter-period difference between matching positive sine and cosine starts.

  • Rule: replacing h with h + T advances the inside by −2π, a full turn.
  • Rule: sine and cosine starts are a quarter period apart for the same positive-A wave.
  • Rule: sin u = cos(u − π2) and cos u = sin(u + π2). The quarter turn exchanges the coordinate read without changing its value.
π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
The same idea, five ways
Say it

The same wave can be described from a middle crossing or from a peak.

Write it

A selected phase shift belongs to the chosen sine or cosine representation. The same wave can have a different start in another representation. Moving h by a whole T also keeps the same repeating graph.

In math
  • 3 cos(π4(x − 1)) + 6 = 3 sin(π4(x + 1)) + 6
  • ω(x − (h + T)) = ω(x − h) − 2π
  • hcos = hsin + T4 for matching positive-A starts
  • sin u = cos(u − π2)
  • cos u = sin(u + π2)
Like

Start describing the same wheel ride at a different moment.

See it
π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
Worked exampleA sine equation for the same cosine picture

Use the same graph with peaks at x = 1 and 9, maximum 9 and minimum 3. Write a positive sine equation instead of cosine. This asks for a sine start that produces the same highs and lows as the cosine picture.

π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. A = 3, B = 6, T = 8, ω = π4.Changing the wave name does not change the graph's size, center or period.
  2. An upward middle crossing occurs one quarter period before the peak at 1: h = 1 − 2 = −1.Positive sine rises from its middle to its peak during the first quarter cycle.
  3. φ = ωh = −π4.The selected sine start lies one unit left of 0.
  4. Plug back: π4(−1) + π4 = 0.That crossing is the inside sine start.
  5. Write y = 3 sin(π4x + π4) + 6.A negative φ produces a plus in the standard sine input.
Answer
y = 3 sin(π4x + π4) + 6
Check At x = 1 the inside is π2 and y = 9; at x = 5 the inside is 3π2 and y = 3. The quarter-period points follow the same rise and fall as the cosine picture.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: Counterexample: Different h means the two formulas cannot describe the same wave.
The name sine or cosine chooses a different stage as its start, and complete-cycle shifts repeat.
✓ Instead: Compare the predicted graph stages and their directions.
Tips and tricks
  • Tip: Compare the predicted graph stages and their directions.
.4Quarter-period key points

Key points mark the four quarter-turn stages and the return to the start. Add T4 repeatedly from h, then read the sine or cosine heights.

  • Rule: inputs h, h + T4, h + T2, h + 3T4, h + T.
π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
The same idea, five ways
Say it

Quarter-period key points

Write it

Key points mark the four quarter-turn stages and the return to the start. Add T4 repeatedly from h, then read the sine or cosine heights.

In math
  • Rule: inputs h, h + T4, h + T2, h + 3T4, h + T.
Like

Place four equal time marks along a one-revolution timetable.

See it
π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
Worked exampleUse quarter periods to draw a cycle

For y = 3 cos(π4(x − 1)) + 6, locate the five Key points of one cycle. This asks for the peak, middle, trough, middle and next peak.

π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
input xoutput y1936537699↓ evaluate: input given, read the output below it
Equal horizontal steps of 2 move through the five cosine stages.
  1. The start is h = 1 and T = 8, so Quarter period = T ÷ 4 = 2.A full turn has four quarter-turn steps.
  2. Use x = h + k(T4) with k = 0, 1, 2, 3, 4; the table shows these inputs.Each step advances the inside by (π4) × 2 = π2.
  3. In the table, the column under 1 has inside 0, so y = 3(1) + 6 = 9.Positive cosine starts at a peak.
  4. The columns under 3 and 7 have inside π2 and 3π2, so y = 6.Cosine gives 0 at the two middle stages.
  5. The column under 5 has inside π, so y = 3(−1) + 6 = 3; the column under 9 returns to inside 2π and output 9.The half-turn gives the trough and the full turn gives the next peak.
Answer
  • Five points:
  • (1, 9)
  • (3, 6)
  • (5, 3)
  • (7, 6)
  • (9, 9)
Check The endpoints are 8 apart, the center is 6, and the two extremes are 3 above and below it.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: Counterexample: Plot five points equally spaced in height.
Quarter periods are equal horizontal steps. Heights follow the sine or cosine values.
✓ Instead: Add T4 along the input axis, then compute each output.
Tips and tricks
  • Tip: Add T4 along the input axis, then compute each output.
Strategy: step by step
  1. Read the maximum and minimum, then find positive A and B.
  2. Read T between adjacent matching stages.
  3. Compute ω = 2π ÷ T.
  4. Choose sine at an upward middle crossing or cosine at a peak; read h.
  5. Compute φ = ωh and substitute h back into the inside.
  6. Check points one quarter period apart.
Strategy
Strategy: turn a graph into an equation
1
Is a peak's x-coordinate clearly labeled?
YesUse positive cosine starting at that peak.
NoLook for a labeled upward middle crossing and use positive sine.
↓
2
Is the middle crossing downward?
YesChoose another upward crossing, or use negative A and account for reflection.
NoPositive sine can use the upward crossing.
↓
3
Do the proposed extrema and repeated stage match?
YesThe model passes these graph checks.
NoRecheck the half-span, center, T and start direction.
  1. Recover height and center from the extrema.
  2. Recover timing from two adjacent matching points.
  3. Pick a convenient positive-A start.
  4. Convert h to φ and check the five cycle stages.
Worked exampleRung 1: a centered cosine graph

A smooth cosine-shaped graph has maximum 1, minimum −1 and adjacent peaks at x = 0 and x = 2π. Write one equation. You are converting the pictured heights and repeat width into a rule.

π/2π3π/22π5π/2−2−112amplitude 1one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. Amplitude = 1−(−1)2 = 1; B = 1+(−1)2 = 0.Half-difference gives size, and average gives center.
  2. T = 2π − 0 = 2π, so ω = 2π ÷ 2π = 1.Adjacent peaks mark one full cycle.
  3. Choose positive cosine with h = 0, the first peak.Positive cosine reaches its maximum when its inside is 0.
  4. φ = ωh = 1 × 0 = 0; plug back: 1 × 0 − 0 = 0.The peak's x-coordinate gives the inside start after converting h to φ.
  5. Write y = cos x.All four parameters are now fixed.
Answer
y = cos x
Check At x = π, halfway between the peaks, cos π = −1, the pictured minimum.
Ladder: from easy to exam-hard. Press Try it first on any rung to hide its steps and use them as hints.
Rung 1Rung 1: a centered cosine graph

A smooth cosine-shaped graph has maximum 1, minimum −1 and adjacent peaks at x = 0 and x = 2π. Write one equation. You are converting the pictured heights and repeat width into a rule.

π/2π3π/22π5π/2−2−112amplitude 1one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. Amplitude = 1−(−1)2 = 1; B = 1+(−1)2 = 0.Half-difference gives size, and average gives center.
  2. T = 2π − 0 = 2π, so ω = 2π ÷ 2π = 1.Adjacent peaks mark one full cycle.
  3. Choose positive cosine with h = 0, the first peak.Positive cosine reaches its maximum when its inside is 0.
  4. φ = ωh = 1 × 0 = 0; plug back: 1 × 0 − 0 = 0.The peak's x-coordinate gives the inside start after converting h to φ.
  5. Write y = cos x.All four parameters are now fixed.
Answer
y = cos x
Check At x = π, halfway between the peaks, cos π = −1, the pictured minimum.
Rung 2Rung 2: raised cosine graph

A graph has maximum 9, minimum 3, and adjacent peaks at x = 0 and x = 8. Write a positive cosine equation. This asks for the wave's size, center and repeat width, with its peak placed at input 0.

π2π3π4π5π246810amplitude 3one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. A = 9−32 = 3 and B = 9+32 = 6.Choose positive A so a peak is the cosine start.
  2. T = 8 − 0 = 8, so ω = 2π8 = π4.The two peaks enclose one full inside turn.
  3. h = 0, so φ = ωh = 0. At x = 0, the inside is 0.The first peak is at the standard cosine start.
  4. Write y = 3 cos(π4x) + 6.Combine size, speed, position and center.
Answer
y = 3 cos(π4x) + 6
Check At x = 4 the inside is π, giving 3(−1) + 6 = 3. At x = 8 the inside is 2π, giving 9 again.
Rung 3Rung 3: a shifted cosine graph

A smooth sinusoidal graph has maximum 9, minimum 3 and consecutive peaks at x = 1 and x = 9. Write a positive cosine equation. This asks you to turn its heights, width and peak position into a formula.

π2π3π4π5π246810amplitude 3one periodpeaktroughnext peak
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. A = 9−32 = 3 and B = 9+32 = 6.The two extreme heights determine size and center.
  2. T = 9 − 1 = 8; ω = 2π8 = π4.Adjacent peaks are the same stage one cycle apart.
  3. Choose cosine with positive A and h = 1.At the chosen start, positive cosine sits at a peak.
  4. φ = ωh = π4 × 1 = π4.φ is an inside offset, so multiply the x-distance by the inside coefficient.
  5. Plug h back: π4 × 1 − π4 = 0.The chosen peak position feeds cosine its starting input.
  6. Write y = 3 cos(π4x − π4) + 6, or y = 3 cos(π4(x − 1)) + 6.Factoring displays the horizontal distance without changing the function.
Answer
y = 3 cos(π4x − π4) + 6
Check At x = 1 and 9, the inside is 0 and 2π, giving 9. At x = 5, halfway between, the inside is π, giving 3.
Rung 4Rung 4: an upward middle crossing

A graph has maximum 8, minimum −2, period 10 and an upward midline crossing at x = 2. Write a positive sine equation. Upward means the height passes through the middle from below to above.

π2π3π4π5π6π7π−22468amplitude 5one period
Read two adjacent matching points for the width and the two extreme heights for the center and size.
  1. A = 8−(−2)2 = 5 and B = 8+(−2)2 = 3.Half the span gives the amplitude; average gives the center.
  2. ω = 2π10 = π5.The inside must advance one full turn during 10 horizontal units.
  3. Choose positive sine with h = 2, the upward middle crossing.Sine begins at 0 and rises, so after adding 3 it starts at the center and rises.
  4. φ = ωh = π5 × 2 = 2π5.Convert horizontal position into inside offset.
  5. Plug back: π5 × 2 − 2π5 = 0.The crossing is at the intended inside start.
  6. Write y = 5 sin(π5x − 2π5) + 3.The positive A preserves the upward direction.
Answer
y = 5 sin(π5x − 2π5) + 3
Check A quarter period later, x = 2 + 104 = 92, the inside is π2 and y = 8. Three quarters later, x = 192, the inside is 3π2 and y = −2.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: Counterexample: use φ = 1 because the peak is at x = 1.
1 is h, a horizontal position. φ is an inside offset and must be multiplied by ω.
✓ Instead: Here φ = π4 × 1 = π4.
✗ Not this: Counterexample: peaks at 1 and 9 give period 9.
A period is the distance between matching points, not the coordinate of the second point.
✓ Instead: T = 9 − 1 = 8.
Tips and tricks
  • Tip: Choose the starting point with the clearest graph label.
  • Tip: If asked for one equation, equivalent sine and cosine answers may both fit.
Trap. A graph alone does not force a unique phase shift. State which sine or cosine start you chose and check that the equation reproduces the pictured stages.
Keep in mind
  • A positive cosine starts at a peak and a positive sine starts where the wave crosses its midline going up, so read h at the feature that matches your choice.
  • The period runs peak to next peak: peaks at x = 1 and x = 7 give T = 6, not 3, since peak to trough is half a cycle.
  • Multiply to get φ: φ = ω × h, so ω = π3 and h = 1 give φ = π3, not 1.
  • More than one equation is correct: starting at the next peak, h = 7, gives y = 4 cos(π3x − 7π3) + 6, the same graph.
Memory hookTop and bottom give A and B, peak to peak gives T, then ω = 2πT. Cosine starts at a peak, sine at a rising middle crossing.
Flash cards: say the answer out loud, then flip
From a graph, how do you get A and B?
  • A = max−min2
  • B = max+min2
Where does a positive cosine model start? Where does a positive sine model start?
  • Cosine: at a peak
  • Sine: where the wave crosses its midline going up
Neighboring peaks sit at x = 2 and x = 14. Find T and ω.
  • T = 12
  • ω = 2π12 = π6
Max 13, min 1, a peak at x = 2, period 12. Write a cosine equation.
y = 6 cos(π6x − π3) + 7
Why is φ = ω × h?
At the chosen start x = h the inside ω × h − φ must be 0, so φ = ω × h.
Peaks at x = 0 and x = 10, with a trough at x = 5. Is the period 5?
No. Peak to trough is half a cycle. The period is 10 − 0 = 10.