Trigonometric Functions and Graphs

Sine, cosine, amplitude, period, midline, phase shift, and transformations.

As an angle moves around the unit circle, the sine and cosine coordinates move up and down in a repeating pattern. When we graph those coordinates against the angle, we get waves. These waves model sound, tides, seasons, alternating current, vibrations, and many other periodic phenomena.

Learning objectives

After this lesson you should be able to:

  • identify amplitude, period, and midline;
  • sketch the basic sine and cosine graphs;
  • describe vertical shifts and horizontal shifts;
  • interpret the parameters in y = A sin(B(x-C)) + D;
  • connect graph features to real periodic situations;
  • use Python and SymPy to inspect trig graphs.

The basic sine graph

The graph of y = sin(x) repeats every 2pi radians.

Important points over one period are:

x 0 pi/2 pi 3pi/2 2pi
sin(x) 0 1 0 -1 0

It starts at the midline, rises to a maximum, returns to the midline, falls to a minimum, and returns to the midline.

The basic cosine graph

The graph of y = cos(x) also repeats every 2pi radians.

Important points are:

x 0 pi/2 pi 3pi/2 2pi
cos(x) 1 0 -1 0 1

Cosine starts at a maximum.

Amplitude

Amplitude is the distance from the midline to a maximum or minimum. For

y = A sin(x)

amplitude is |A|.

Examples:

y = 3 sin(x)       amplitude 3
y = -2 cos(x)      amplitude 2

A negative coefficient reflects the graph across the midline; amplitude remains positive.

Period

The period is the horizontal length of one complete cycle.

For

y = sin(Bx) or y = cos(Bx)

the period is:

period = 2pi / |B|

Example:

y = sin(2x) has period pi

because 2pi/2 = pi.

Midline and vertical shift

For

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

the midline is:

y = D

The graph oscillates above and below that line.

Phase shift

The value C in

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

shifts the graph horizontally. The expression x-C shifts right by C.

Worked example: read a graph formula

Analyze:

y = 4 sin(2(x - pi/3)) + 1
  1. Amplitude: |4| = 4.
  2. Period: 2pi / 2 = pi.
  3. Midline: y = 1.
  4. Phase shift: right pi/3.

The graph ranges from 1-4=-3 to 1+4=5.

Common pitfalls

  • Calling the maximum value the amplitude.
  • Forgetting amplitude is always nonnegative.
  • Using 2pi * B instead of 2pi / |B| for period.
  • Missing the midline shift.
  • Confusing a right shift with a left shift.

Practice exercises

  1. What is the amplitude of y = -5 cos(x)?
  2. What is the period of y = sin(3x)?
  3. What is the midline of y = 2 sin(x) - 4?
  4. Does y = sin(x - pi/2) shift left or right?
  5. What are the maximum and minimum of y = 3 cos(x) + 2?
  1. 5.
  2. 2pi/3.
  3. y = -4.
  4. Right by pi/2.
  5. Maximum 2+3=5; minimum 2-3=-1.

Subtopic guided practice and checkpoints

Graph questions become easier when you identify one feature at a time.

Lab 1: find amplitude

Guess first. Is the amplitude of y=-7sin(x) equal to -7 or 7?

Guided exercise.

Amplitude is distance from the midline, so it cannot be negative:

amplitude = |-7| = 7

Checkpoint. Find the amplitude of y = 0.5 cos(x).

Lab 2: find period

Guess first. Does sin(4x) repeat faster or slower than sin(x)?

Guided exercise.

Use the formula:

period = 2pi / |4| = pi/2

The graph repeats faster because the period is shorter.

Checkpoint. Find the period of y = cos(x/2).

Lab 3: find midline and range

Guess first. For y=2sin(x)+3, is the midline y=2 or y=3?

Guided exercise.

The vertical shift is +3, so the midline is y=3. The amplitude is 2, so the range is:

3 - 2 = 1
3 + 2 = 5

Checkpoint. Find the midline and range of y = 4 cos(x) - 1.

Lab 4: phase shift

Guess first. Does x - pi shift right or left?

Guided exercise.

Inside subtraction shifts right:

y = sin(x - pi) shifts right pi

Checkpoint. Describe the shift of y = cos(x + pi/4).

  1. 0.5.
  2. 2pi / |1/2| = 4pi.
  3. Midline y=-1; range [-5,3].
  4. Left by pi/4.

Trig-graph guessing game

Using this lesson with edumath and SymPy

Use Python to sample a sine graph.

import math

xs = [0, math.pi / 2, math.pi, 3 * math.pi / 2, 2 * math.pi]
[(x, math.sin(x)) for x in xs]
[(0, 0.0),
 (1.5707963267948966, 1.0),
 (3.141592653589793, 1.2246467991473532e-16),
 (4.71238898038469, -1.0),
 (6.283185307179586, -2.4492935982947064e-16)]

Use SymPy to inspect symbolic period.

import sympy as sp

x = sp.symbols("x")
sp.periodicity(sp.sin(3 * x), x)

\(\displaystyle \frac{2 \pi}{3}\)