Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 38 Β· Graphs of Trigonometric Functions

Graphs of Sine and Cosine

Draw the graphs of y = sin x and y = cos x from the unit circle, learn their period, range, zeros and symmetry, and see why they are shifted copies of each other.

Imagine a point moving steadily around the unit circle. Its height (the y-coordinate) goes up and down, up and down, forever. If you record that height against the angle, you get the sine wave. Do the same for the x-coordinate and you get the cosine wave. These waves describe tides, sound, alternating current, and the swing of a pendulum.

Building the graph from the circle

Use the horizontal axis for the angle x in radians and the vertical axis for sin x. Read the heights from the unit circle:

x 0 Ο€/2 Ο€ 3Ο€/2 2Ο€
sin x 0 1 0 βˆ’1 0
cos x 1 0 βˆ’1 0 1

Connect the points with a smooth curve and repeat it in both directions.

Python Plot sine and cosine

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.

Features of y = sin x

  • Domain: all real numbers.
  • Range: from βˆ’1 to 1.
  • Period: 2Ο€. The pattern repeats every 2Ο€, i.e., sin(x + 2Ο€) = sin x.
  • Zeros: at x = 0, Β±Ο€, Β±2Ο€, … (multiples of Ο€).
  • Maximum 1 at x = Ο€/2 + 2Ο€k; minimum βˆ’1 at x = 3Ο€/2 + 2Ο€k (where k is any integer).
  • Symmetry: odd, sin(βˆ’x) = βˆ’sin x, so the graph looks the same after a 180Β° rotation about the origin.

Features of y = cos x

  • Domain: all real numbers; range: βˆ’1 to 1; period: 2Ο€.
  • Zeros: at x = Ο€/2 + Ο€k.
  • Maximum 1 at x = 2Ο€k; minimum βˆ’1 at x = Ο€ + 2Ο€k.
  • Symmetry: even, cos(βˆ’x) = cos x, so the graph is symmetric across the y-axis.

The graphs are shifted copies

The cosine wave is the sine wave moved to the left by Ο€/2:

cos x = sin(x + Ο€/2)

This also follows from the cofunction rule: cos x = sin(Ο€/2 βˆ’ x), and sine's oddness plus periodicity give the same result. Check by substituting x = 0: cos 0 = 1 and sin(Ο€/2) = 1.

Python Cosine is shifted sine

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.

Five key points per period

To sketch one cycle quickly, divide the period into four equal parts. This gives five key points: start, quarter, half, three-quarter, and end.

For y = sin x from 0 to 2Ο€, the pattern is zero, max, zero, min, zero. For y = cos x it is max, zero, min, zero, max.

flowchart LR
    A["x = 0<br/>sin 0, cos 1"] --> B["x = Ο€/2<br/>sin 1, cos 0"]
    B --> C["x = Ο€<br/>sin 0, cos -1"]
    C --> D["x = 3Ο€/2<br/>sin -1, cos 0"]
    D --> E["x = 2Ο€<br/>sin 0, cos 1"]

Key points of one period.

A closer look at a spinning point

The next program generates the sine curve step by step by sampling the unit circle. Each y-value is the height of the point at that angle.

Python From circle to wave

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.

On the site, matplotlib figures appear as images below the code after you press Run.

Why waves?

Many natural motions repeat smoothly: a mass on a spring, a swing, a vibrating string. Their position over time is a sine or cosine curve. That is why sine and cosine are called sinusoidal functions, and why this chapter matters beyond triangles.

Degrees on the x-axis

You can also label the x-axis in degrees: one period is 360Β°, and the key points sit at 0Β°, 90Β°, 180Β°, 270Β°, 360Β°. In calculus and physics, radians are the standard.

Worked example

Find all x in [0, 2Ο€] where sin x = 0. From the graph, zeros are at x = 0, Ο€, 2Ο€. For cos x = 0 they are at Ο€/2 and 3Ο€/2.

Check your understanding

Quick check Β· 4 questions

of 4 answered You scored / 4 Β· perfect!

  1. 1. What is the period of y = sin x?

    The sine wave repeats every 2Ο€ radians (360 degrees).
  2. 2. Which function has a maximum value at x = 0?

    cos 0 = 1, the maximum. sin 0 = 0.
  3. 3. What is the range of y = cos x?

    Cosine is the x-coordinate on the unit circle, which stays between -1 and 1.
  4. 4. The graph of y = cos x is symmetric about...

    Cosine is an even function: cos(-x) = cos x.

Summary

  • The sine and cosine graphs come from the height and width of a point on the unit circle.
  • Both have period 2Ο€, range [βˆ’1, 1], and domain all real numbers.
  • Sine is odd; cosine is even; cos x = sin(x + Ο€/2).
  • Five key points per period make quick sketches easy.

Next: Amplitude and Period