Math Core

Lesson 4.2 · Graphs of Trigonometric Functions

Amplitude, period and phase shift

Real waves are rarely exactly y=sin⁡xy = \sin x. A tide might swing 44 feet, repeat every 1212 hours and sit 66 feet above the sea floor on average. Four numbers in the equation stretch, squeeze and slide the basic wave to match any of these situations.

Amplitude: how tall the wave is

Multiplying the output by a number AA stretches the graph vertically. In y=3sin⁡xy = 3\sin x, every height of the sine curve is tripled, so the peaks rise to 33 and the valleys drop to −3-3. The zeros stay where they were, because 3⋅0=03 \cdot 0 = 0.

y = sin x and y = 3 sin x. Same zeros, three times the height.Open in grapher →

The amplitude is half the distance from a peak to a valley. For y=Asin⁡xy = A\sin x or y=Acos⁡xy = A\cos x it equals ∣A∣|A|. If AA is negative, the graph is also reflected across the midline: y=−2cos⁡xy = -2\cos x starts at a valley (0,−2)(0, -2) instead of a peak.

Period: how long one cycle takes

Multiplying the input by a number BB squeezes or stretches the graph horizontally. In y=cos⁡(2x)y = \cos(2x), the inside 2x2x runs from 00 to 2π2\pi while xx only runs from 00 to π\pi. So one full cycle fits in a length of π\pi: the wave repeats twice as fast.

y = cos x completes one cycle on [0, 2π]; y = cos 2x completes two.Open in grapher →

In general, one cycle happens as BxBx goes from 00 to 2π2\pi, that is, as xx goes from 00 to 2πB\dfrac{2\pi}{B}. So the period is 2π∣B∣\dfrac{2\pi}{|B|}. A large BB gives a short period (a fast wave); a BB between 00 and 11 gives a long period. For example, y=sin⁡(x4)y = \sin\left(\dfrac{x}{4}\right) has period 2π1/4=8π\dfrac{2\pi}{1/4} = 8\pi.

Vertical shift: where the middle is

Adding a constant DD to the output slides the whole graph up or down. The midline moves from y=0y = 0 to y=Dy = D. The wave now oscillates between

maximum=D+∣A∣andminimum=D−∣A∣.\text{maximum} = D + |A| \qquad \text{and} \qquad \text{minimum} = D - |A|.

For y=3cos⁡x−2y = 3\cos x - 2, the midline is y=−2y = -2, the maximum is −2+3=1-2 + 3 = 1 and the minimum is −2−3=−5-2 - 3 = -5.

Phase shift: sliding left or right

Replacing xx with x−Cx - C slides the graph CC units to the right (to the left if CC is negative), just as with any function. This horizontal shift is called the phase shift. For example, y=sin⁡(x−π4)y = \sin\left(x - \dfrac{\pi}{4}\right) is the sine wave moved π4\dfrac{\pi}{4} to the right: its cycle starts at x=π4x = \dfrac{\pi}{4} instead of x=0x = 0.

The general sinusoid

y=Asin⁡(B(x−C))+Dy=Acos⁡(B(x−C))+Dy = A\sin\big(B(x - C)\big) + D \qquad\qquad y = A\cos\big(B(x - C)\big) + D
FeatureFormula
Amplitude∣A∣\lvert A \rvert (a negative AA also reflects the graph)
Period2π∣B∣\dfrac{2\pi}{\lvert B \rvert}
Phase shiftCC (right if positive, left if negative)
Midliney=Dy = D
Range[D−∣A∣, D+∣A∣][D - \lvert A \rvert,\ D + \lvert A \rvert]

Common mistake

Factor out BB before reading the phase shift. In y=sin⁡(2x−π)y = \sin(2x - \pi) the shift is not π\pi. Rewrite the inside as 2x−π=2(x−π2)2x - \pi = 2\left(x - \dfrac{\pi}{2}\right); the phase shift is π2\dfrac{\pi}{2} to the right. Likewise, y=cos⁡(3x+π)=cos⁡(3(x+π3))y = \cos(3x + \pi) = \cos\left(3\left(x + \dfrac{\pi}{3}\right)\right) is shifted π3\dfrac{\pi}{3} to the left.

Graphing with the five key points

  1. Find the start of a cycle, x=Cx = C, and the end, x=C+periodx = C + \text{period}.
  2. Split that interval into four equal steps of period4\dfrac{\text{period}}{4}. These are the xx-values of the five key points.
  3. Take the basic yy-values (0,1,0,−1,00, 1, 0, -1, 0 for sine or 1,0,−1,0,11, 0, -1, 0, 1 for cosine), multiply them by AA, then add DD.
  4. Plot, connect smoothly, and repeat.

Worked example: A stretch and a squeeze

Graph one cycle of y=3sin⁡(2x)y = 3\sin(2x).

Solution. Amplitude 33, period 2π2=π\dfrac{2\pi}{2} = \pi, no phase shift, midline y=0y = 0. The quarter step is π4\dfrac{\pi}{4}, so the key xx-values are 0,π4,π2,3π4,π0, \dfrac{\pi}{4}, \dfrac{\pi}{2}, \dfrac{3\pi}{4}, \pi. Multiply the sine pattern by 33:

(0,0), (π4,3), (π2,0), (3π4,−3), (π,0).(0, 0),\ \left(\tfrac{\pi}{4}, 3\right),\ \left(\tfrac{\pi}{2}, 0\right),\ \left(\tfrac{3\pi}{4}, -3\right),\ (\pi, 0).

Worked example: All four changes at once

Graph one cycle of y=−2cos⁡(x−π3)+1y = -2\cos\left(x - \dfrac{\pi}{3}\right) + 1.

Solution. A=−2A = -2 (amplitude 22, reflected), B=1B = 1 (period 2π2\pi), C=π3C = \dfrac{\pi}{3}, D=1D = 1. The cycle runs from π3\dfrac{\pi}{3} to π3+2π=7π3\dfrac{\pi}{3} + 2\pi = \dfrac{7\pi}{3} in steps of π2\dfrac{\pi}{2}:

xxπ3\frac{\pi}{3}5π6\frac{5\pi}{6}4π3\frac{4\pi}{3}11π6\frac{11\pi}{6}7π3\frac{7\pi}{3}
basic cos⁡\cos1100−1-10011
×(−2)\times(-2)−2-2002200−2-2
+1+1−1-1113311−1-1

The graph starts at a minimum of −1-1, crosses the midline y=1y = 1, peaks at 33 and returns.

y = -2cos(x - π/3) + 1 with its midline y = 1 dashed.Open in grapher →

Worked example: Factoring first

State the amplitude, period, phase shift and range of y=4sin⁡(3x+π)−2y = 4\sin(3x + \pi) - 2.

Solution. Factor the inside: 3x+π=3(x+π3)3x + \pi = 3\left(x + \dfrac{\pi}{3}\right), so C=−π3C = -\dfrac{\pi}{3}.

  • Amplitude: 44
  • Period: 2π3\dfrac{2\pi}{3}
  • Phase shift: π3\dfrac{\pi}{3} to the left
  • Midline y=−2y = -2, so the range is [−2−4,−2+4]=[−6,2][-2 - 4, -2 + 4] = [-6, 2].

Worked example: Writing the equation from a graph

A sinusoid with a peak at (0, 5) and a valley at (π/2, 1).Open in grapher →

Write an equation for this graph.

Solution. Read off the maximum 55 and minimum 11.

  • Midline: D=5+12=3D = \dfrac{5 + 1}{2} = 3. Amplitude: A=5−12=2A = \dfrac{5 - 1}{2} = 2.
  • A peak to the next valley is half a cycle: from 00 to π2\dfrac{\pi}{2}. So the period is π\pi and B=2ππ=2B = \dfrac{2\pi}{\pi} = 2.
  • The graph starts at a peak when x=0x = 0, which is how cosine starts, so use cosine with C=0C = 0.

The equation is y=2cos⁡(2x)+3y = 2\cos(2x) + 3. (A sine equation with a phase shift would also work, such as y=2sin⁡(2(x+π4))+3y = 2\sin\left(2\left(x + \dfrac{\pi}{4}\right)\right) + 3.)

Tip

Check an equation by plugging in one key point. For y=2cos⁡(2x)+3y = 2\cos(2x) + 3 at x=π2x = \dfrac{\pi}{2}: 2cos⁡(π)+3=−2+3=12\cos(\pi) + 3 = -2 + 3 = 1, the valley. It matches.

Practice

Practice 1

What is the amplitude of y=−4sin⁡(2x)y = -4\sin(2x)?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

What is the period of y=cos⁡(3x)y = \cos(3x)? (You can type pi.)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

What is the period of y=5sin⁡(x4)y = 5\sin\left(\dfrac{x}{4}\right)?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

What is the maximum value of y=3cos⁡x−2y = 3\cos x - 2?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

What is the phase shift of y=sin⁡(2x−π2)y = \sin\left(2x - \dfrac{\pi}{2}\right)? Give a positive number for a shift to the right and a negative number for a shift to the left.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

What is the phase shift of y=−3sin⁡(4x+π)+2y = -3\sin(4x + \pi) + 2? Give a positive number for a shift to the right and a negative number for a shift to the left.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7
The graph passes through (0, 1), rises to a peak of 3 at x = π/4 and reaches a valley of -1 at x = 3π/4.Open in grapher →

Which equation matches the graph?

Practice 8

What is the period of y=5−2cos⁡(πx3)y = 5 - 2\cos\left(\dfrac{\pi x}{3}\right)?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.