Tutorial: Trigonometric functions, models, and regression
Adaptive game version
This tutorial: Part A: Modeling with the sine function
(This topic is also in Section 16.1 in Finite Mathematics and Applied Calculus)
What is the sine function?
Take a look at the following graph, which shows the month-by-month average temperature in Germany over a period of two years.
The sine function
Bicycle wheel definition
If a wheel of radius 1 unit rotates counterclockwise at a speed of 1 unit of length per second, and at time $t=0$ is in the position shown in the figures above, then its height after $t$ seconds is given by
The sine of a real number $t$ is given by the $y$−coordinate (height above the $x$-axis) of the point $P$ in the following diagram, in which $t$ is the length of the arc shown.
#[Notes][Notas]#:
y = #[sin][sen]#(t)
Notice how the graph of $y = \sin(t)$ oscillates between a high value of $1$ and a low value of $-1$; we say that its oscillation has a amplitude of 1.
If a wheel of radius 1 unit rotates counterclockwise at a speed of 1 unit of length per second, and at time $t=0$ is in the position shown in the figures above, then its height after $t$ seconds is given by
#[$h(t) = \sin(t).$][$h(t) = \text{sen}(t).$]#
Geometric definition
The sine of a real number $t$ is given by the $y$−coordinate (height above the $x$-axis) of the point $P$ in the following diagram, in which $t$ is the length of the arc shown.
- The diagram shows how to find the sine of $t$ for positive $t$. For negative $t$, we rotate the wheel counterclockwise, so the point $P$ initially moves downward, and the $y$-coordinate $\sin(t)$ is the negative of the value for positive $t$ (move the point on the interactive wheel clockwise to see how). So, $\sin(-t) = -\sin(t)$.
- We can also think of the quantity $t$ as measuring the angle $QOP$ it spans; the quantity $t$ it is then the radian measure of the angle $Q0P$, and $\sin(t)$ is also called the sine of the angle $t$ radians.
y = #[sin][sen]#(t)
#[Examples][Ejemplos]#
As the circumference of the entire circle is $2\pi$, when $t = 2\pi$, the point $P$ has moved around the entire circle, bringing it back tp its initial position on the $x$-axis at a height of $0$. Thus,
#[$\sin(2\pi) = 0$][$\text{sen}(2\pi) = 0$]# \gap[20] \t $2\pi$ #[constitutes a complete revolution, or 360°.][constituye una completa revolución, o 360°.]#
Similarly, when the point $P$ has moved a quarter of the way around the circle, a distance of $\dfrac{2\pi}{4} = \dfrac{\pi}{2}$, it makes an angle of 90° with the positive $x$-axis and it is at its highest position, so
#[$\sin\left(\dfrac{\pi}{2}\right) = 1$][$\text{sen}\left(\dfrac{\pi}{2}\right) = 1$]# \gap[20] \t $\dfrac{\pi}{2}$ #[constitutes a quarter of a revolution, or 90°.][constituye un cuarto de revolución, o 90°.]#
A negative value of $t$ would correspond to moving the point $P$ clockwise through a distance of $|t|$. So, for instance, $t = -\dfrac{\pi}{2}$ would move it down to the right, quarter way around the circle to the lowest point, so
#[$\sin\left(-\dfrac{\pi}{2}\right) = -1$][$\text{sen}\left(-\dfrac{\pi}{2}\right) = -1$]# \gap[20] \t $-\dfrac{\pi}{2}$ #[is the radian measure of the angle −90°.][es la medida en radianes del ángulo −90°.]#
Note It is common to write $\sin(x)$ without parentheses as $\sin x$ in the same way as we write $\log(x)$ as $\log x$ (and we will often do that here). However, when entering $\sin(x)$ as a formula in spreadsheets and calculators (and also this tutorial!) one should always use the parentheses.
Some for you
Transforming the sine function
To use the sine function to model real world phenomena like monthly temperatures or propagating light waves, we need to manipulate the sine curve along the lines of what we do with general functions in New functions from old: Scaled and shifted functions
Transformations of the sine function
Amplitude
Multiplying $\sin(x)$ by a positive constant $A$ causes its graph to oscillate between $A$ and $-A$ instead of between $1$ and $-1$. For instance, the following graph shows $2\sin(x)$ (plotted in red).
For this reason we say that the function $2\sin(x)$ of $x$ has amplitude $2$.
Vertical shift
Adding a quantity $C$ to $\sin(x)$ causes its graph to shift upwards by $C$. (If $C$ is negative, this is understood to mean shifting downward by $|C|$.) For instance, the following graph shows $1/2 + \sin(x)$ (plotted in red).
Horizontal shift
If $a$ is positive, then replacing $x$ by $x-a$ causes the graph of $\sin(x)$ to shift right by $a$ units, and replacing $x$ by $x+a$ causes the graph to shift left by $a$ units. For instance, the following graph shows $\sin(x-\pi/4)$ (plotted in red).
Angular frequency
If $\omega$ is positive, then replacing $x$ by $\omega x$ results in $\sin(\omega x)$, which oscillates $\omega$ times as fast as $\sin(x)$. For instance, the following graph shows $\sin(2x)$ (plotted in red).
For this reason we say that the function $\sin(2x)$ of $x$ has angular frequency $2$.
Multiplying $\sin(x)$ by a positive constant $A$ causes its graph to oscillate between $A$ and $-A$ instead of between $1$ and $-1$. For instance, the following graph shows $2\sin(x)$ (plotted in red).
$y = \sin(x) \qquad \qquad \qquad$$y = 2\sin(x)$
Adding a quantity $C$ to $\sin(x)$ causes its graph to shift upwards by $C$. (If $C$ is negative, this is understood to mean shifting downward by $|C|$.) For instance, the following graph shows $1/2 + \sin(x)$ (plotted in red).
$y = \sin(x) \qquad \qquad \qquad$$y = 1/2 + \sin(x)$
If $a$ is positive, then replacing $x$ by $x-a$ causes the graph of $\sin(x)$ to shift right by $a$ units, and replacing $x$ by $x+a$ causes the graph to shift left by $a$ units. For instance, the following graph shows $\sin(x-\pi/4)$ (plotted in red).
$y = \sin(x) \qquad \qquad \qquad$$y = \sin (x-\pi/4)$
If $\omega$ is positive, then replacing $x$ by $\omega x$ results in $\sin(\omega x)$, which oscillates $\omega$ times as fast as $\sin(x)$. For instance, the following graph shows $\sin(2x)$ (plotted in red).
$y = \sin(x) \qquad \qquad \qquad$$y = \sin(2x)$
Angular frequency and period
We saw above that the graph of the sine function repeats every $2\pi$ units. This means that increasing or decreasing $x$ by $2\pi$ results in the same $y$-coordinate:
$\sin(x \pm 2\pi) = \sin(x)$
Period $P=\pi:$
$\sin(2(x \pm \pi)) = \sin(2x)$
$\sin(2(x \pm \pi)) = \sin(2x)$
Relationship between angular frequency and period
#[The period $P$ and angular frequency $\omega$ of oscillation are related by][El periodo $P$ y la frecuencia angular $\omega$ de oscilación están relacionados por]#
$P = \dfrac{2\pi}{\omega}$.
#[For instance, the function $\sin(3x)$ has period of oscillation][Por ejemplo, la función $\text{sen}(3x)$ tiene periodo de oscilación]# $P = \dfrac{2\pi}{3}$.
#[We can rewrite the above formula by solving for $\omega$ to get][Podemos reescribir la fórmula anterior resolviendo $\omega$ para obtener]#
$\omega = \dfrac{2\pi}{P}$.
#[For instance, if we want a function with period 1, we need to multiply $x$ by][Por ejemplo, si queremos una función con período 1, necesitamos multiplicar $x$ por]# $\omega = \dfrac{2\pi}{1} = 2\pi$ #[to get][para obtener]#
#[$\sin(\omega x) = \sin(2\pi x). \qquad$][$\text{sen}(\omega x) = \text{sen}(2\pi x). \qquad$]# #[The function $\sin(2\pi x)$ has period 1.][La función $\text{sen}(2\pi x)$ has periodo 1.]#
#[Examples][Ejemplos]#
Some for you
1. $f(x) = \sin\left(\dfrac{x}{4}\right)$ #[has period][tiene periodo]# $P = \dfrac{2\pi}{\omega} = \dfrac{2\pi}{1/4} = 8\pi.$
\\2. $g(x) = \sin\left(\dfrac{x}{4} + 9\right)$ #[also has period][también tiene periodo]# $8\pi.$ \t
#[(2) is a horizontally shifted form of (1).][(2) es una forma desplazada horizontalmente de (1).]#
\\ 3. $f(t) = 8\sin\left(\dfrac{\pi t}{6}\right)$ #[has period][tiene periodo]# $P = \dfrac{2\pi}{\omega} = \dfrac{2\pi}{\pi/6} = 12$. \t #[The amplitude does not affect the period.][La amplitud no afecta el periodo.]#
\\ 4. $f(t) = 8\sin\left(\dfrac{\pi}{6}(t-4)\right)$ #[also has period 12.][también tiene periodo 12.]# \t #[(4) obtained from (3) by shifting it to the right by 4 units.][(4) se obtiene de (3) desplazándolo hacia la derecha en 4 unidades.]#
Some for you
Modeling with the sine function
Take another look at the graph showing the average temperature in Germany over two years:
Generalized sine function
#[A generalized sine function has the following form.][Una función seno generalizada tiene la siguiente forma.]#
Note Increasing or decreasing $\alpha$ (or $\beta$) by the period $P$ or multiples of $P$ has no effect on the graph (and will be permitted in the interactive exercises) as we would be moving it horizontally that distance. For convenience we are using the lowest nonnegative value for $\alpha$ as shown in the graph.
$f(x) = A\sin\left[\omega(x-\alpha)\right] + C$
#[Thus,][Por lo tanto,]#
- $A = {}$ #[amplitude][amplitud]#
- $\omega = {}$ #[angular frequency][frecuencia angular]#
- $\alpha = {}$ #[phase shift (horizontal offset; the graph first crosses the baseline $\alpha$ units to the right of the $y$-axis).][cambio de fase (desplazamiento horizontal; la gráfica primero cruza la línea base $\alpha$ unidades a la derecha del eje $y$).]#
- $C = {}$ #[vertical offset (the graph is moved $C$ units up).][desplazamiento vertical (la gráfica se mueve $C$ unidades hacia arriba).]#
#[Graph of ][Gráfica de ]# $\bold{f(x) = A\sin\left[\omega(x-\alpha)\right] + C}$
$\displaystyle A = \frac{\text{highest value} - \text{lowest value}}{2} \qquad \omega = \frac{2\pi}{P} \qquad \alpha = \beta - \frac{P}{4}$
#[$C = {}$ height of baseline: Average of highest and lowest values][$C = {}$ altura de la línea base: promedio de los valores alto y bajo]#
#[$C = {}$ height of baseline: Average of highest and lowest values][$C = {}$ altura de la línea base: promedio de los valores alto y bajo]#
#[Example][Ejemplo]#
To model the average temperature in Germany, we use the formulas above.
$\displaystyle A = \frac{\text{highest value} - \text{lowest value}}{2} \approx \frac{20 - 0}{2} = 10$
\\ $P = 12$
\\ $\displaystyle \omega = \frac{2\pi}{P} = \frac{2\pi}{12} = \frac{\pi}{6}$
\\ $\displaystyle \alpha = \beta - \frac{P}{4} \approx 6 - \frac{12}{4} = 3$
\\ $C = {}$ #[Average of highest and lowest values][promedio de los valores alto y bajo]# $\displaystyle \approx \frac{20+0}{2} = 10$.
#[Thus, our approximate model is][Por lo tanto, nuestro modelo aproximado es]#
$f(t)$ \t $\displaystyle {} = A\sin\left[\omega(t-\alpha)\right] + C$
\\ \t $\displaystyle {} =10\sin\left[\frac{\pi}{6}(t-3)\right] + 10$.
Now try the exercises in Section 16.1 in Finite Mathematics and Applied Calculus.
or move ahead to the next tutorial by pressing "Next tutorial" on the sidebar.
Copyright © 2022 Stefan Waner and Steven R. Costenoble