AP subjects/AP Precalculus/Sinusoidal Function Model Builder
CED 3.6AP Precalculus

Sinusoidal Function Model Builder

Use this free sinusoidal function model builder to shape y=asin⁡(b(x−c))+dy = a\sin\big(b(x - c)\big) + d by its features: drag the amplitude, period, phase shift and midline, and the equation, including b=2πPb = \frac{2\pi}{P}, updates as the wave moves.

Controls
aPcd

How to use the simulator

The window runs from about −1 to 13 horizontally and −7 to 7 vertically. The wave is coral. A dashed teal line marks the midline y=dy = d, two lighter dashed lines mark the maximum and minimum d±∣a∣d \pm |a|, and a white dot marks the point (c,d)(c, d), where this sine wave crosses its midline going up.
  • amplitude a: from 0.5 to 4 in steps of 0.25 (default 2). Only positive values are offered, so there is no reflection here.
  • period P: from 1 to 12 in steps of 0.25 (default 6.25, close to 2π2\pi). You set the period directly; the simulator computes b.
  • phase shift c: from −6 to 6 in steps of 0.25 (default 0). The dot is shown only when c is −1 or greater, because the window starts at −1.
  • midline d: from −3 to 3 in steps of 0.5 (default 0).
The panel writes the equation with b rounded to two decimals, for example y = 3·sin(0.79·(x − 1.50)) + 1, then lists the amplitude, the period with its b value, the phase shift with "right" or "left", and the midline. Because b is rounded, use the period, not the printed b, when you need an exact value such as π4\frac{\pi}{4}.

The equations

For y=asin⁡(b(x−c))+dy = a\sin\big(b(x - c)\big) + d with b>0b > 0: amplitude=∣a∣,period P=2πb ⟺ b=2πP,midline y=d.\text{amplitude} = |a|, \qquad \text{period } P = \frac{2\pi}{b} \ \Longleftrightarrow\ b = \frac{2\pi}{P}, \qquad \text{midline } y = d.
The phase shift is c units to the right: the graph of sin⁡x\sin x is translated so that its rising midline crossing moves from x=0x = 0 to x=cx = c. The AP Precalculus course description writes the general form as asin⁡(b(θ+c))+da\sin\big(b(\theta + c)\big) + d; with a plus sign inside, the shift is cc units to the left. Either way, factor b out first and read the shift from what is subtracted from x.
From features to an equation:
  • d=max⁡+min⁡2d = \dfrac{\max + \min}{2} and ∣a∣=max⁡−min⁡2|a| = \dfrac{\max - \min}{2}.
  • P is the horizontal distance between two consecutive maxima (or twice the distance from a maximum to the next minimum).
  • For a sine model, c is an x-value where the graph crosses the midline going up. A maximum occurs a quarter period later, at c+P4c + \frac{P}{4}.
The same wave can be written with cosine, starting at a maximum instead: acos⁡(b(x−xmax⁡))+da\cos\big(b(x - x_{\max})\big) + d.

Worked example

A quantity oscillates between a maximum of 4 and a minimum of −2. It reaches the maximum at x=3.5x = 3.5 and the next minimum at x=7.5x = 7.5. Write a sine model.
Step 1: midline and amplitude. d=4+(−2)2=1d = \frac{4 + (-2)}{2} = 1 and a=4−(−2)2=3a = \frac{4 - (-2)}{2} = 3.
Step 2: period. Maximum to the next minimum is half a period: 7.5−3.5=47.5 - 3.5 = 4, so P=8P = 8 and b=2π8=π4≈0.785b = \frac{2\pi}{8} = \frac{\pi}{4} \approx 0.785.
Step 3: phase shift. The rising midline crossing comes a quarter period (2 units) before the maximum: c=3.5−2=1.5c = 3.5 - 2 = 1.5.
Model: y=3sin⁡ ⁣(π4(x−1.5))+1,or equivalentlyy=3cos⁡ ⁣(π4(x−3.5))+1.y = 3\sin\!\Big(\frac{\pi}{4}(x - 1.5)\Big) + 1, \qquad \text{or equivalently}\qquad y = 3\cos\!\Big(\frac{\pi}{4}(x - 3.5)\Big) + 1.
Check a value: at x=5x = 5, y=3sin⁡(π4⋅3.5)+1=3sin⁡(2.749)+1≈3(0.383)+1≈2.15y = 3\sin\big(\frac{\pi}{4}\cdot 3.5\big) + 1 = 3\sin(2.749) + 1 \approx 3(0.383) + 1 \approx 2.15, which sits between the midline and the maximum, as it should just after the peak.
Check it in the simulator: set a = 3, P = 8, c = 1.5, d = 1. The equation reads y = 3·sin(0.79·(x − 1.50)) + 1, the dot sits at (1.5, 1), the peak touches the upper dashed line y = 4 at x = 3.5 and the trough touches y = −2 at x = 7.5.

Common mistakes on the AP exam

  • Using P as b. A period of 8 means b=π4b = \frac{\pi}{4}, not 8. Larger b means a shorter period.
  • Not factoring out b. In sin⁡(2x−6)\sin(2x - 6), the shift is 3, because 2x−6=2(x−3)2x - 6 = 2(x - 3).
  • Getting the shift direction backward. sin⁡(b(x−c))\sin(b(x - c)) moves right by c; sin⁡(b(x+c))\sin(b(x + c)) moves left by c.
  • Amplitude equal to the maximum. Amplitude is half the distance from maximum to minimum. With max 4 and min −2, it is 3, not 4.
  • Using a maximum as the sine starting point. A sine model starts at a rising midline crossing; if you anchor on a maximum, use cosine.
  • Taking the period from max to min. That distance is half a period.
  • Calculator in degree mode. These models use radians; π4\frac{\pi}{4} is not 45 in degree mode.

When the AP exam uses this

Sinusoidal modeling (Topics 3.6 and 3.7) is a favorite for free-response questions built on a context such as tides, temperatures or a Ferris wheel. You may be given a table of values or a graph and asked to find a, b, c and d, then use the model to estimate a value or identify where the function is increasing, decreasing, concave up or concave down.
Embed this simulator on your class page

Free for classroom use. Paste this into your site, LMS page or blog; keep the credit link under it.