Skip to main content
Search IntMath
Close

2. Graphs of y = a sin bx and y = a cos bx

by M. Bourne

Interactive applet

Don't miss later on this page:
Spring period interactive

The variable b in both of the following graph types affects the period (or wavelength) of the graph.

  • y = a sin bx
  • y = a cos bx

The period is the distance (or time) that it takes for the sine or cosine curve to begin repeating again.

Graph Interactive - Period of a Sine Curve

Here's an applet that you can use to explore the concept of period and frequency of a sine curve.

Frequency is defined as `"frequency" = 1/"period"`. We'll see more on this below.

In this applet, a point on a circle rotates at a constant rate, and its height at time `t` traces out a sine curve.

Things to Do

  1. Clik the Start button
  2. At first you'll see a sine curve traced out as the circle rotates.
  3. Now, change the value of b using the slider. If you increase b, the period for each cycle will go down and the frequency will increase. Observe the dot on the circle also goes around more quickly.
  4. Observe the number of cycles that you see between t = 0 and t = 2π (= 6.28). For b = 1 you see one cycle, for b = 2, you see 2 cycles, and so on.
  5. The period of the curve is marked with a red vertical line.

The units along the horizontal (time) axis are in radians. So π = 3.14 radians and 2π = 6.28 radians.

Graph: y = sin(t)

b

Copyright © www.intmath.com Frame rate: 0

Did you notice?

  1. The variable `b` gives the number of cycles between `0` and `2pi`.
  2. Higher `b` gives higher frequency (and lower period).

Formula for Period

The relationship between `b` and the period is given by:

`"Period"=(2pi)/b`

Note: As b gets larger, the period decreases.

Changing the Period

Now let's look at some still graphs to see what's going on.

The graph of y = 10 cos x, which we learned about in the last section, sine and cosine curves, is as follows.

The graph of `y=10cos(x)` for `0 ≤ x ≤ 2pi`

As we learned, the period is `2pi`.

Next we see y = 10 cos 3x. Note the `3` inside the cosine term.

0.5π π 1.5π 5 10 -5 -10 x y
`(2pi)/3`

The graph of `y=10cos(3x)` for `0 ≤ x ≤ 2pi`

Notice that the period is different. (However, the amplitude is `10` in each example.)

This time the curve starts to repeat itself at `x=(2pi)/3`, which is marked with a red vertical line. This is consistent with the formula we met above, which siad:

`"Period"=(2pi)/b`

Now let's view the 2 curves on the same set of axes. Note that both graphs have an amplitude of `10` units, but their period is different.

0.5π π 1.5π 5 10 -5 -10 x y
`y = 10 cos(x)`
`y = 10 cos(3x)`

The graphs of `y=10cos(x)` and `y=10cos(3x)` for `0 ≤ x ≤ 2pi`

Interactive: Spring with mass

When you stretch (or compress) a spring then let go, it will vibrate back and forward. It will continue to do so if there are no other forces acting on it. (In reality, the spring slows down due to friction and the force of gravity.)

The vibration is periodic, and we can describe it using a sine or cosine curve.

The period of a spring's motion is affected by the stiffness of the spring (usually denoted by the variable k), and the mass on the end of the spring (m). You can investigate this property in the following interactive graph.

Things to do

  • Observe the curve we get as the spring vibrates. It's a cosine curve.
  • Observe the period of the cosine curve.
  • Vary the stiffness of the spring (`k`) and see the effect on the period.
  • Vary the mass (`m`) and observe the effect on the period.
  • What is the period when mass = stiffness (`m=k`)? Why?

Background information: The period of a vibrating spring with stiffness k and with mass m on the end, is given by: `T=2 pi sqrt(m/k)`.

The equation of the cosine curve you'll see is `h = h_1 + a cos sqrt(k/m)t`, where `h=` height at time `t`, `a = ` amplitude of the motion, and `h_1` is an offset from the `t`-axis due to the spring stiffness and/or mass of the object.

In this applet, the position of `2pi` is fixed.

Graph: h = cos(t)

Period: P = 2π/ = Amplitude = h-offset =

k
m

Copyright © www.intmath.com Frame rate: 0

Once again, a real spring would actually slow down as time goes on. Also, if we increase the mass, the spring will stretch out more, and if it's stiffer, it will stretch less. However, to keep things simple, the situation is idealized.

In this example, the spring is actually moving sideways on a table and we are looking from above. (We assume gravity is not a factor.)

Good to Know...

Tip 1: The number b tells us the number of cycles in each 2π.

For y = 10 cos x, there is one cycle between `0` and 2π (because b = 1).

For y = 10 cos 3x, there are 3 cycles between `0` and 2π (because b = 3).

Tip 2: Remember, we are now operating using RADIANS. Recall that:

2π = 6.283185...

and that

2π = 360°

We only use radians in this chapter.

For a reminder, go to: Radians

Exercises

1. Sketch 2 cycles of y = 3 cos 8x.

Answer

Here, `b = 8`, so the period is `(2π)/8 = π/4.` To draw 2 cycles, we will need to graph from `0` to ` π/2` along the x-axis.

The graph of `y=3cos(8x)` for `0 ≤ x ≤ pi/2`

Note that we started the graph at `x = 0`, but we could have started anywhere. As long as we draw exactly 2 cycles, we are answering the question.

Now for interest, let's see what it looks like from `0` to 2π.

The graph of `y=3cos(8x)` for `0 ≤ x ≤ 2pi`

Note that there are 8 cycles between `0` and 2π.

2. Sketch 2 cycles of y = cos 10x.

Answer

In this example, `b = 10`, so the period is `(2π)/10 = π/5`. To draw 2 cycles, we will need to go from `0` to `(2π)/5` along the x-axis.

The graph of `y=cos(10x)` for `0 ≤ x ≤ (2pi)/5`

Note that one cycle has period `(2pi)/10 = 0.2pi = 0.628` and there will be `10` cycles between `0` and 2π.

3. Sketch 2 cycles of y = 5 sin 2πx.

Answer

In this example, b = 2π. So the period is `(2π)/(2π) = 1.`

The graph of `y=5sin(2pix)` for `0 ≤ x ≤ 2`

This time, we do not have any multiple of π in our horizontal scale.

4. Sketch 2 cycles of `y = 4\ sin\ x/3`

Answer

In this example, `b = 1/3`, so the period is 6π = 18.85.

The graph of `y=4sin(x/3)` for `0 ≤ x ≤ 12pi`

Pistons don't exactly follow a sine path

The movement of a piston in an engine is often quoted as an example of a sine curve. It almost is, but only under certain conditions. See Curve Shape for the Movement of a Piston to investigate this further, using an interactive animation.

Defining Sine Curves using Frequency

It is common in electronics to express the sin graph in terms of the frequency f as follows:

y = sin 2πft

This is very convenient, since we don't have to do any calculation to find the frequency (like we were doing above). The frequency, f, is normally measured in cycles/second, which is the same as Hertz (Hz).

The period of the curve (the time it takes to go from one crest to the next crest) can be found easily once we know the frequency:

`T=1/f`

The units for period are normally seconds.

Example

Household voltage in the UK is alternating current, `240\ "V"` with frequency `50\ "Hz"`. What is the equation describing this voltage?

Answer

The voltage could be described as: `V = 240\ sin\ 2π(50)t`.

The period of the voltage is `(2pi)/b =(2pi)/(2pi(50))=1/50 = 0.02\ "seconds".`

We saw the graph of this in the Introduction to this chapter.

NOTE 1:

`240\ "V"` is actually the root-mean-square (RMS) value of the voltage. The peak voltage value is `sqrt(2)=1.414` times this value, or about `340\ "V"`. We'll learn more about this concept later in RMS as a calculus application.

NOTE 2:

The UK now follows the EU standard and household voltage is actually rated `230\ "V"`.

Coming Next

In the next section we learn about phase shift.

See Graphs of y = a sin (bx + c).

Later, we learn some Applications of Trigonometric Graphs.

But first, let's see another application of frequency.

Music Example

The frequency of a note in music depends on the period of the wave. If the frequency is high, the period is short; if the frequency is low, the period is longer.

Music keyboard - application of trig graphs

A student recently asked me an interesting question. She wanted to know the frequencies of all the notes on a piano.

A piano is tuned to A = 440 Hz (cycles/second) and the other notes are evenly spaced, 12 notes to each octave. A note an octave higher than A = 440 Hz has twice the frequency (880 Hz) and an octave lower than A = 440 Hz has half the frequency (`220\ "Hz"`).

Click here to find out the frequencies of notes on a piano.

Tips, tricks, lessons, and tutoring to help reduce test anxiety and move to the top of the class.