Modeling with sinusoids

Many things in nature repeat in cycles: a weight bouncing on a spring, a guitar string, the tides, and the hours of daylight through the year. Sine curves are the natural way to describe them. This page builds such models from a few facts and uses them to make predictions.

Simple harmonic motion

Hang a weight on a spring, pull it down, and let go. It bobs up and down. If we ignore friction, its position ${y}$ at time ${t}$ follows a sine curve. Motion like this is called simple harmonic motion. It is described by

${y=a\sin\omega t}$or${y=a\cos\omega t}$

where ${\omega}$ (omega) is a positive number. The parts of the formula have physical meanings:

When time is in seconds, frequency is measured in cycles per second, called hertz (Hz). For example, the note A above middle C is a sound wave with frequency ${440}$ Hz. Its period is ${\dfrac{1}{440}}$ of a second.

Use cosine when the motion starts at its highest or lowest point. Use sine when it starts at the rest position.

Example 1: A mass on a spring is pulled ${5}$ cm below its rest position and let go at time ${t=0}$. It bobs up and down ${2}$ times per second.

(a) Find an equation for its position ${y}$ (in cm, with up positive) at time ${t}$ (in seconds).

(b) Where is the mass at ${t=0.1}$ s?

Solution:

(a) The motion starts at its lowest point, ${y=-5}$. A cosine curve starts at its high point, so use ${y=a\cos\omega t}$ with ${a=-5}$.

The frequency is ${f=2}$ cycles per second. Since ${f=\dfrac{\omega}{2\pi}}$,

${\omega=2\pi f=2\pi\cdot 2=4\pi}$

So the position is

${y=-5\cos 4\pi t}$

0.250.50.751−55ty
The position ${y=-5\cos 4\pi t}$ of the mass, in centimeters, for the first second.

(b) Put ${t=0.1}$ into the equation, with a calculator in radian mode:

${y=-5\cos(0.4\pi)\approx -1.55}$

The mass is about ${1.55}$ cm below its rest position, on its way up.

Modeling data that repeats

Real data rarely swing around ${0}$. A model like

${y=a\sin k(t-b)+d}$

can match the highest and lowest values, the length of a cycle, and its starting time. The method from Amplitude, period, and phase shift finds the four numbers:

  1. Midline: ${d=\dfrac{\text{max}+\text{min}}{2}}$.
  2. Amplitude: ${a=\dfrac{\text{max}-\text{min}}{2}}$.
  3. Period ${P}$ from the data, then ${k=\dfrac{2\pi}{P}}$.
  4. Phase shift ${b}$: for sine, a time when the data cross the midline going up. (For a cosine model, use a time of a maximum.)

Example 2: In a northern US city, the longest day of the year is day ${172}$ (June 21), with ${15}$ hours of daylight. The shortest is day ${355}$ (December 21), with ${9}$ hours.

(a) Find a sine model for the hours of daylight ${y}$ on day ${t}$.

(b) Predict the hours of daylight on day ${120}$ (April 30).

Solution:

(a) Midline and amplitude:

${d=\dfrac{15+9}{2}=12}$${a=\dfrac{15-9}{2}=3}$

Period: The pattern repeats every year, so ${P=365}$ days and

${k=\dfrac{2\pi}{365}}$

Phase shift: A sine curve crosses its midline going up a quarter period before its maximum. A quarter period is ${\dfrac{365}{4}=91.25}$ days. So

${b=172-91.25\approx 81}$

Day ${81}$ is March 22, close to the spring equinox, when day and night are equal. The model is

$y=3\sin\left(\dfrac{2\pi}{365}(t-81)\right)+12$

8117226435591215(172, 15)(355, 9)thours
Hours of daylight ${y}$ on day ${t}$ of the year. The dashed line ${y=12}$ is the midline.

(b) Put ${t=120}$ into the model, with the calculator in radian mode:

$\begin{align*}y&=3\sin\left(\dfrac{2\pi\cdot 39}{365}\right)+12\\&\approx 3(0.622)+12\approx 13.9\end{align*}$

The model predicts about ${13.9}$ hours of daylight on April 30.

Example 3: At a harbor, high tide is ${9}$ ft deep at ${2{:}00}$ a.m. The next low tide is ${1}$ ft deep at ${8{:}15}$ a.m.

(a) Find a cosine model for the depth ${y}$ at ${t}$ hours after midnight.

(b) A boat needs at least ${7}$ ft of water. After high tide, when does the water first become too shallow?

Solution:

(a) The midline is ${d=\dfrac{9+1}{2}=5}$, and the amplitude is ${a=\dfrac{9-1}{2}=4}$.

From high tide to low tide is half a cycle. That takes ${8.25-2=6.25}$ hours. (${8{:}15}$ is ${8.25}$ hours after midnight.) So the period is ${P=12.5}$ hours, and

${k=\dfrac{2\pi}{12.5}}$

A cosine curve starts at its maximum, and the maximum is at ${t=2}$. So ${b=2}$, and

$y=4\cos\left(\dfrac{2\pi}{12.5}(t-2)\right)+5$

28.2514.51579highlow7 fttft
Water depth ${y}$ in feet, ${t}$ hours after midnight. The dashed line is ${y=7}$.

(b) Find when ${y=7}$ as the water falls after ${t=2}$. To keep the work short, call the inside ${\theta}$:

${\theta=\dfrac{2\pi}{12.5}(t-2)}$

Then the equation ${y=7}$ becomes

$\begin{align*}4\cos\theta+5&=7\\\cos\theta&=\dfrac{1}{2}\end{align*}$

The first positive angle with cosine ${\dfrac{1}{2}}$ is ${\theta=\dfrac{\pi}{3}}$. So

${\dfrac{2\pi}{12.5}(t-2)=\dfrac{\pi}{3}}$

Multiply both sides by ${\dfrac{12.5}{2\pi}}$:

${t-2=\dfrac{12.5}{6}\approx 2.08}$, so ${t\approx 4.08}$

${0.08}$ hours is about ${5}$ minutes. The water drops below ${7}$ ft at about ${4{:}05}$ a.m.

Solving equations like the one in part (b) is the topic of Chapter 4.

Damped harmonic motion

A real spring does not bob forever. Friction makes each swing a little smaller than the one before. This is damped harmonic motion. A common model multiplies a sine curve by a shrinking exponential function (see Exponential functions):

${y=a e^{-ct}\sin\omega t}$or${y=a e^{-ct}\cos\omega t}$

Here ${c>0}$ is the damping constant. A larger ${c}$ means the motion dies out faster. Since ${-1\le\cos\omega t\le 1}$, the curve stays between the curves ${y=ae^{-ct}}$ and ${y=-ae^{-ct}}$, which shrink toward ${0}$:

12345−44ty
Damped motion: ${y=4e^{-0.5t}\cos 2\pi t}$. The dashed curves ${y=\pm 4e^{-0.5t}}$ hold the wave between them.

Example 4: A damped spring has position ${y=4e^{-0.5t}\cos 2\pi t}$ (in cm, ${t}$ in seconds).

(a) Find the frequency.

(b) How far from rest does the mass reach at ${t=2}$, at the top of its swing?

Solution:

(a) Here ${\omega=2\pi}$, so ${f=\dfrac{2\pi}{2\pi}=1}$ cycle per second.

(b) At ${t=2}$, ${\cos(4\pi)=1}$, so the mass is at the top of a swing:

${y=4e^{-0.5\cdot 2}=4e^{-1}\approx 1.47}$ cm

The swing has shrunk from ${4}$ cm to under ${1.5}$ cm in two seconds.

Summary