Перейти к содержимому

Урок 17 · Graphs of Trigonometric Functions

Phase Shift and Vertical Shift

Move a sine or cosine wave left, right, up or down. Learn the general form y = A sin(B(x - C)) + D, find the midline, and model tides and daylight hours.

You can now stretch a wave in height and width. Two more adjustments slide it around the plane: a phase shift moves it left or right, and a vertical shift moves it up or down. With all four numbers you can model almost any smooth repeating pattern, from ocean tides to daylight hours.

The general form

y = A sin(B(x − C)) + D

Letter Effect Reading
A Vertical stretch Amplitude is the absolute value of A
B Horizontal squeeze Period is 2π divided by the absolute value of B
C Horizontal shift Phase shift: C units to the right (negative C means left)
D Vertical shift Midline y = D

The same form works for cosine. The maximum of the wave is D + |A| and the minimum is D − |A|.

Phase shift

Replacing x with x − C slides the graph right by C. So y = sin(x − π/3) is the sine wave moved π/3 to the right, and y = sin(x + π/4) is moved π/4 to the left.

A common trap: when the equation is written as y = sin(Bx − E), factor out B first. For y = sin(2x − π/2), write it as sin(2(x − π/4)). The shift is π/4, not π/2. Remember the phase shift is E / B.

Vertical shift

Adding D lifts the whole graph. y = sin x + 2 oscillates between 1 and 3, around the midline y = 2.

Python Shifts in action

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Reading a full equation

Example. y = 3 sin(2(x − π/4)) + 1.

  • Amplitude 3.
  • Period 2π/2 = π.
  • Phase shift π/4 to the right.
  • Midline y = 1; maximum 4, minimum −2.

Example with a hidden factor. y = −2 cos(3x + π) − 4. Write 3x + π = 3(x + π/3), so the phase shift is π/3 to the left. Amplitude 2, period 2π/3, midline y = −4, reflected because of the minus sign. Maximum −2, minimum −6.

Python Wave analyzer

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Modeling a real situation

Suppose the depth of water in a harbor follows a cosine pattern. At high tide the depth is 9 m and at low tide it is 3 m. One full cycle takes 12 hours, and high tide happens at t = 2 hours.

  • Midline: (9 + 3) / 2 = 6.
  • Amplitude: (9 − 3) / 2 = 3.
  • Period 12, so B = 2π/12 = π/6.
  • Cosine starts at its maximum, so shift it right by 2: C = 2.

d(t) = 3 cos(π/6 × (t − 2)) + 6

This is a model: real tides are messier and combine several waves, so the formula is only an approximation.

Python A simple tide model

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

To turn data into a model: midline = (max + min)/2, amplitude = (max − min)/2, then find B from the period and C from where a maximum (for cosine) or a midline crossing going up (for sine) occurs.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. y = sin(x - π/2) is the graph of sin x shifted...

    Replacing x with x - C shifts the graph C units to the right.
  2. 2. What is the midline of y = 2 cos x - 3?

    The vertical shift D = -3 gives the midline.
  3. 3. What are the maximum and minimum of y = 4 sin x + 1?

    Max = D + |A| = 5 and min = D - |A| = -3.
  4. 4. For y = sin(2x - π), what is the phase shift?

    Factor: sin(2(x - π/2)), so the shift is π/2 to the right.

Summary

  • General form: y = A sin(B(x − C)) + D; cosine uses the same four numbers.
  • |A| is the amplitude, 2π/|B| the period, C the horizontal shift, D the midline.
  • Always factor B out of the bracket before reading the phase shift.
  • Max D + |A|, min D − |A|.

Next: The Graph of Tangent

Отслеживайте прогресс

Создайте бесплатный аккаунт, чтобы отмечать пройденные уроки и продолжать с того места, где остановились, на любом устройстве.