Understanding $\sin(\omega t + \phi_0)$ and other aspects of trig function

Joseph E. McEwen, (c) 2020

version 0.01

This is a first draft (errors likely). Please report any typos or errors.

These notes are not to be shared or distributed outside class.

Students should ignore code and pay attention to animations, plots, and text.

In [41]:
import numpy as np
import sympy as sym
from numpy import pi
%matplotlib inline
import matplotlib.pyplot as plt
from matplotlib import animation
from IPython.display import HTML

from numpy import cos, sin, pi

%load_ext autoreload
%autoreload 2

from sine_tutorial import sine_wheel, phase_shift_wheel, shift_wheel, small_angle
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload

Sine and rotations on the unit circle

A very good way to intuit $\sin(\omega t)$ is to think of rotations on a unit circle. A unit circle is a circle with radius 1. Imagine an object rotating around the circle with a constant angular velocity $\omega$. A triangle formed by the angle $\theta = \omega t$ has $\sin(\omega t) = opp/hyp=opp$, since the $hyp=r=1$. The function $\sin(\omega t)$ can be mapped out by drawing a line from the top of the triangle to a graph on the right. See the animation.

In [42]:
anim=sine_wheel(1,0)
HTML(anim.to_html5_video())
Out[42]:

In the above animation. The green dot rotates around the unit circle at a consant $\omega$. The initial position of the green dot is marked by a lightly shaded/transparent green dot. The values of the opposite side are projected onto the graph on the right as a function of the angle $\theta=\omega t $ mapping out the sine function.

problem 1

The time it takes the green dot to go around the cirlce once is called the period $T$, measured in seconds. Suppose that the period is $0.01~s$. How many revolutions will the green dot make in one second?

The frequency is the number of times the green dot would make a complete revolution in one second. The frequency, $f$, is $1/T$ and is measured in Hertz (Hz).

problem 2

In this notebook we consider $\omega$ to be a constant value related to the frequency by $\omega= 2 \pi f$. Why does it make sense that $\theta=\omega t$? I can have an explanation that does not require using the definition $\omega= d\theta/dt$ or $\theta=\omega t$. Try to come up with an explanation that does not use these defintions either.

The phase shift $\phi_0$

We can understand the phase shift by plotting two rotating dots on the unit circle that start out at different locations. The phase shift sets the starting value of sine function. The argument of the sine function is $\phi=\omega t + \phi_0$ is called the phase. When $t=0$ the phase is $\phi=\phi_0$. Below are two sine functions. The blue dot has a phase shift of $\phi_0=\pi/2$, while the green dot has no phase shift. You should observe that the blue dot is tracing out the function $\cos(\omega t)$. Now, hopefully, it is easier for you to understand the identity $\cos(\theta)= \sin(\theta + \pi/t)$.

In [36]:
anim=phase_shift_wheel(1,0,pi/2)
HTML(anim.to_html5_video())
Out[36]:

Below is another example of a phase shift. This time I have plotted the blue dot with a phase shift of $\pi$. If you are taking the third quarter of the physics sequence, you might associate this annimation with destructive interference.

In [4]:
anim=phase_shift_wheel(1,0,pi)
HTML(anim.to_html5_video())
Out[4]:

problem 3

Is cosine an even or an odd function? Is sine an even or an odd function? Would the rotating wheel animaition be able to help you answer these questions? If so, how?

We can also plot the sine function in time. Below is a plot of a blue and green dot rotating around the unit circle. We play the same game. The top the triangle is projected to a graph on the right. However, this time the horizontal axis on the right graph is time not $\theta$.

In [37]:
anim=shift_wheel(1,4,0,0)
HTML(anim.to_html5_video())
Out[37]:

Motion diagram method

We don't have to make animations. We can turn to our motion diagram method. In the motion diagram method draw a sequence of points on the unit cirlce labeled 1,2,3,4,... Each point represents the position of the moving dot at time $t_1,~ t_2,~ t_3, ~t_4, ...$. We want the time interval between time positions to be even, so the points on your unit cicle should be the evenly spaced on the unit cirlce. For each point draw a line to the graph on the right that traces out the sine function. We have done this in class, so you can rewatch the lecture for more clarification.

problem 4 Draw a motion diagram for cosine. In this case you likely will have to draw cosine function down and on its side instead of to the right. Using this method show that $\cos(\theta - \pi/2)= \sin(\theta)$ and $\cos(\theta + \pi/2) = -\sin(\theta)$.

Small angles

What are the values for $\sin(\theta)$ and $\cos(\theta)$ when $\theta$ is small?

Cosine is defined as the length of the adjacent side divided by the length of the hypotenuse. In the animation below the adjacent side is colored in blue, while the hypotenuse is colored in black. The animation shows a triangle as the angle $\theta$ is continously decreased. You should observe that as the angle is decreased the hypotenuse (black line of the triangle) approachs the same value as the adjacent side (blue line of the triangle). Therefore, we can say that as $\theta$ becomes small, the ratio of the adjacent length to the length of the hypotenuse approches one or $\cos (\theta) \approx 1$.

Sine is defined as the length of the opposite side divided by the length of the hypotenuse. In the animation below the opposite side is colored in green. Additionally, I have marked a segment of arc-length colored in red. Recall that the arc-length is given by $s=r \theta$. As the angle is decreased the opposite side (green line) approaches the same value as the arc-length (red line). Therefore the value of sine can be approximated as $\sin(\theta) \approx r\theta/r = \theta$ or for small angles $\sin(\theta) \approx \theta$.

If you have taken calculus III then you should be familiar with the expansions of sine and cosine \begin{align} \begin{split} & \sin(\theta) = \theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \frac{\theta^7}{7!} + ... \\ & \cos(\theta) = 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \frac{\theta^6}{6!} + ... \end{split} \end{align} If $\theta$ is small, then any power of $\theta$ is even smaller, so we can just ignore those terms in the expansion. Hence, for small $\theta$, $\sin(\theta) \approx \theta$ and $\cos (\theta) \approx 1$, just from knowing the expansions.

moral of the story So, we see that we can arrive at the small angle aproximation expression using geometry or calculus. The moral of the story is that math is not just about memorizing the rules to manipulate symbols. Math has real meaning that is often connected to physical phenomena.

problem 5

Use a calculator to run some experiments and determine a cutoff for small $\theta$. That is, find out when the small angle approximation becomes valid. This of course depends on how accurate you want the approximation to be - discuss this accuracy.

In [30]:
anim=small_sine()
HTML(anim.to_html5_video())
Out[30]:

problem 6

From the pythagorean theorem $a^2 + b^2 = c^2$, prove that $\sin^2(\theta) + \cos^2(\theta) =1$.

problem 7

Using a triangle diagram to show that $\tan(\theta)=\sin(\theta)/\cos(\theta)$.

problem 8

Plot $\tan(\theta)$, but don't look up the answer. You have enough information by now to make the plot. So, if you don't know how to do it, stop, rest, and think on it.