[8.2] Fitting data with sinusoids

Any function that can be written as:

$f(x) = A \sin(B(x-h)) + k$

(where $A \ne 0$ and $B \ne 0$) is a sinusoid

If it's not said otherwise, assume that $\sin(x)$ means sine of some angle, $x$, in radians.

Mathematica:
Sin[3.6]$\equiv$ sin(3.6 Radians).
Sin[3.6 Degree]$\equiv$ sin(3.6${}^o$).

Offset

$\color{blue}{g(x) = \sin(x) + k = \sin(x) + 5 }$

$\color{gray}{f(x) = \sin(x) }$


$k$ is a vertical shift factor. Think of the midline shifting vertically.

Amplitude

$\color{blue}{g(x) = A\sin(x) = 3*\sin(x) }$

$\color{gray}{f(x) = \sin(x) }$


$A$ is a vertical magnification factor, and stretches/compresses the sin function vertically.

$|A| = \frac{g_{\rm max} - g_{\rm min}}{2} $


Period

$\color{blue}{g(x) = \sin(Bx) = \sin(\frac{2\pi}{1.5}x) }$

$\color{green}{f(x) = \sin(x) =\sin(1x)}$


$B$ is a horizontal magnification factor, and stretches ($|B| < 1$) or compresses ($|B| > 1$) the sin function horizontally.

$B=\frac{2\pi}{P}$ where $P$ is the period for the sinusoid to go through one cycle. Solving for $P$ gives us: $P=2\pi/B$

The frequency $f = 1/P = B/(2\pi)$ is the number of cycles per [$x$-axis units]

Horizontal shift

$\color{blue}{g(x) = A \sin(B*(x-h)) + k = 3\sin(2.2*(x+0.7))+5}$
$\color{gray}{f(x) = A \sin(B*(x)) + k = 3\sin(2.2*(x))+5}$


There is a horizontal shift of the function by $h$ units to the right.

$$m(x)=\sin(3x-0.6)$$ This function is not a sin shifted to the right by 0.6 units. You first have to write it in factored form: $$m(x)=\sin(3x-0.6)=\sin(3(x-0.2)).$$ It's a sin function shifted right by 0.2 units.

A note about the reference point

The reference point on the gray sin function that we're using is where the graph intersects the $y$-axis. A this point, the graph of the unshifted sine function is crossing its midline and rising.

Use the point where the graph is rising (not the one further to the right where the graph crosses the midline while falling).

Problem 1

Consider... $$y=3\sin(4\pi(t-0.2))+2.$$ What is this function's...

  • amplitude=?3
  • horizontal shift=?right, by 0.2 units
  • vertical shift=?+2 (2 units up)
  • period=? $P=2\pi/(4\pi)=1/2$
  • frequency=?f=1/P=2 cycles per $x$ unit.

Now sketch it.

Find equations

Find an equation for this graph:

Find an equation for this graph:


  • Amplitude, $A = \frac{22-4}{2}=9$
  • Midline, $k=\frac{22+4}{2}=13$
  • Period, $P=17-7=10$ and therefore $B=\frac{2\pi}{10}=\frac\pi 5$.
  • Horizontal shift, $h=9.5$ The "sin starting point" on the midline has been shifted about 9.5 units to the right from 0.

Putting all this together: $$f(x)=9\sin\left(\frac{\pi}{5}(x-9.5)\right)+13$$

Problem

A ferris wheel has a diameter of 150 ft. It's bottom is 10 ft above the ground, and one complete revolution takes 3 minutes. Find a formula for the height of a car above the ground as a function of time.