\documentclass[leqno,11pt]{article}
 \setlength{\textheight}{10.4in}
 \setlength{\topmargin}{-1in}
 \setlength{\headheight}{0in}
 \setlength{\topsep}{0in}
 \setlength{\marginparwidth}{0in}
 \setlength{\marginparsep}{0in}
 \setlength{\oddsidemargin}{0in}
 \setlength{\evensidemargin}{0in}
 \setlength{\textwidth}{6.4in}
 \setlength{\parskip}{4pt}
 \setlength{\parindent}{0pt}
\usepackage{quiz}
\usepackage{alltt}
\usepackage{../../email}
\usepackage{hyperref}
\usepackage{url}
\usepackage{graphicx}
\begin{document}
\section*{Sample Quiz 5}
\rule{\textwidth}{0.5ex}
{\bf Sample Quiz 5, Problem 1}.{\bf Harmonic Vibration}

A mass of $m=250$ grams attached to a spring of Hooke's constant $k$ undergoes free undamped vibration. At equilibrium, the spring is stretched $25$ cm by a force of $8$ Newtons. At time $t=0$, the spring is stretched $0.5$ m and the mass is set in motion with initial velocity $5$ m/s directed away from equilibrium. Find:
\begin{itemize}
\item[\BF{(a)}] The numerical value of Hooke's constant $k$.
\item[\BF{(b)}] The initial value problem for vibration $x(t)$.
\end{itemize}

{\bf Solution}~\newline
\BF{(a)}: Hooke's law Force=k(elongation) is applied with force $8$ Newtons and elongation $25/100=1/4$ meter. Equation $8=k(1/4)$ implies $k=32$ N/m.

\BF{(b)}: Given $m=250/1000$ kg and $k=32$ N/m from part (a), then the free vibration model $mx''+kx=0$ becomes $\frac14 x'' + 32x=0$. Initial conditions are $x(0)=0.5$ m and $x'(0)=5$ m/s. The initial value problem is
$$
\left\{\begin{array}{rcl}
\dd\frac{d^2x}{dt^2} + 128 x &=&0, \\
x(0) &=& 0.5, \\
x'(0) &=& 5.
\end{array}\right.
$$



\rule{\textwidth}{0.5ex}

\vfill\newpage


{\bf Sample Quiz 5, Problem 2}. {\bf Phase-Amplitude Conversion}\newline
Write the vibration equation
$$
x(t)=2\cos(3t)+5\sin(3t)$$
in phase-amplitude form $x=A\cos(\omega t-\alpha)$.
Create a graphic of $x(t)$ with labels for period, amplitude and phase shift.

{\bf Solution} ~\newline
The answer and the graphic appear below.
$$x(t)=\sqrt{29}\cos(3t - 1.190289950)=\sqrt{29}\cos(3(t-0.3967633167)).$$

\begin{tabular}{@{}lcr@{}}
\includegraphics[scale=1.0]{figures/phase-amplitude-period.png}
&
\mbox{~}
&
\begin{minipage}[b]{0.5\textwidth}
\begin{center}{\bf Harmonic Oscillation}\end{center}

\bigskip

{\rm The graph of $2\cos(3t)+5\sin(3t)$. It has amplitude $A=\sqrt{29}$ = $5.385$,  period $P=2\pi/3$ and phase shift $F=0.3967633167$. The graph is on $0\le t \le P+F$.\newline ~
}
\vspace*{2pc}
\end{minipage}
\end{tabular}

%evalf(arctan(5/2.));
%evalf(arctan(5/2.)*180/Pi);
%
%evalf(arctan(5/2.)/3);
%Fs:=evalf(arctan(5/2)/3); P:=2*Pi/3;A:=sqrt(29);
%X:=t->2*cos(3*t)+5*sin(3*t);
%opts:=xtickmarks=[0,Fs,P/2+Fs,P+Fs],ytickmarks=[-A,0,A],axes=boxed,thickness=3,labels=["",""],font=[COURIER,BOLD,18];
%plot(X(t),t=0..P+Fs,opts);

\BF{Algebra Details}. The plan is to re-write $x(t)$ in the form $x(t)=A\cos(\omega t - \alpha)$, called the phase-amplitude form of the harmonic oscillation.

Start with $x(t)=2\cos(3t)+5\sin(3t)$. Trig identity $x(t)=A\cos(\omega t-\alpha)=A\cos(\alpha)\cos(\omega t) + A\sin(\alpha)\sin(\omega t)$ causes the definitions
$$ \omega=3,\quad A\cos(\alpha)=2,\quad A\sin(\alpha)=5.$$
The Pythagorean identity
$\cos^2\alpha+\sin^2\alpha=1$ implies $A^2=2^2+5^2=29$ and then the amplitude is $A=\sqrt{29}$. Because $\cos\alpha=2/A$, $\sin\alpha=5/A$, then both the sine and cosine are positive, placing angle $\alpha$ in quadrant I. Divide equations $\cos\alpha=2/A$, $\sin\alpha=5/A$ to obtain $\tan(\alpha)=5/2$, which by calculator implies $\alpha=\arctan(5/2)=1.190289950$ radians or $68.19859051$ degrees. Then $x(t)=A\cos(\omega t - \alpha)=\sqrt{29}\cos(3t - 1.190289950)$.

\BF{Computer Details}. Either equation for $x(t)$ can be used to produce a computer graphic. A hand-drawn graphic would use only the phase-amplitude form. The period is $P=2\pi/\omega=2\pi/3$. The amplitude is $A=\sqrt{29}=5.385164807$ and the phase shift is $F=\alpha/\omega=0.3967633167$. The graph is on $0\le t \le P+F$.
\begin{verbatim}
# Maple
F:=evalf(arctan(5/2)/3); P:=2*Pi/3;A:=sqrt(29);
X:=t->2*cos(3*t)+5*sin(3*t);
opts:=xtickmarks=[0,F,P/2+F,P+F],ytickmarks=[-A,0,A],
      axes=boxed,thickness=3,labels=["",""];
plot(X(t),t=0..P+F,opts);
\end{verbatim}




\rule{\textwidth}{0.5ex}
\vfill\newpage

{\bf Sample Quiz 5, Problem 3}. {\bf Undamped Spring-Mass System}\newline
 A mass of $6$ Kg is attached to a
spring that elongates $20$ centimeters due to a force of $12$ Newtons.
The motion starts at equilibrium with velocity $-5$ m/s.
Find an equation for $x(t)$ using the free undamped vibration model $mx''+kx=0$.

{\bf Solution}

The answer is
$x(t) = -\sqrt{\frac{5}{2}} \sin(\sqrt{10} t).$

The mass is $m=6$ kg. Hooke's law $F=kx$ is applied with $F=12$ N and $x=20/100$ m. Then Hooke's constant is $k=60$ N/m. Initial conditions are $x(0)=0$ m (equilibrium) and $x'(0)=-5$ m/s. 

{\bf The Model}.
$$
\left\{\begin{array}{rcr}
\dd 6\frac{d^2x}{dt^2} + 60 x &=&0, \\
x(0) &=& 0, \\
x'(0) &=& -5.
\end{array}\right.
$$
\BF{Solving the Model}. 

The characteristic equation $6r^2+60=0$ is solved for $r=\pm i\sqrt{10}$, then the Euler solution atoms are $\cos(\sqrt{10}t)$, $\sin(\sqrt{10}t)$ and we write the general solution as
$$ x(t)=c_1 \cos(\sqrt{10}t)+c_2 \sin(\sqrt{10}t).$$
The task remaining is determination of constants $c_1,c_2$ subject to initial conditions $x(0)=0$, $x'(0)=-5$. The linear algebra problem uses the derivative formula
$$ x'(t)=-\sqrt{10}c_1 \sin(\sqrt{10}t)+\sqrt{10}c_2 \cos(\sqrt{10}t).$$
The $2\times 2$ system of linear algebraic equations for $c_1,c_2$ is obtained from the two equations $x(0)=0$, $x'(0)=-5$ as follows.
$$
\left\{\begin{array}{rcrcrl}
\cos(0) c_1 &+& \sin(0) c_2 &=& 0, & \mbox{~~Equation $x(0)=0$} \\
-\sqrt{10}\sin(0) c_1 &+& \sqrt{10}\cos(0) c_2 &=& -5, & \mbox{~~Equation $x'(0)=-5$}
\end{array}\right.
$$
Because $\cos(0)=1$, $\sin(0)=0$, then $c_1=0$ and $c_2= -5/\sqrt{10}=-\sqrt{5/2}$. Insert answers $c_1,c_2$ into the general solution to find the answer to the initial value problem
$$x(t) = -\sqrt{\frac{5}{2}} \sin(\sqrt{10} t).$$

\rule{\textwidth}{0.5ex}

\vfill\newpage

{\bf Sample Quiz 5, Problem 4}. {\bf Beats}\par
The physical phenomenon of \BF{beats} refers to the periodic
interference of two sound waves of slightly different frequencies.
A {destructive interference} occurs during a
very brief interval, so our impression is that the sound periodically
stops, only briefly, and then starts again with a {beat}, a section of sound
that is instantaneously loud again. 
Human heartbeat uses the same terminology. Our pulse rate is  $40-100$ \BF{beats} per minute at rest.
 An illustration of the
graphical meaning appears in the figure below.



\begin{tabular}[b]{@{}lcr@{}}
\includegraphics[scale=1.0]{figures/beats-envelope.png}
&
\mbox{~~~}
&
\begin{minipage}[b]{0.5\textwidth}
\begin{center}{\large\bf Beats}\end{center}
\rm Shown in red is a
periodic oscillation
$x(t)=2\sin 4t \sin 40t$
with rapidly--varying factor $\sin 40t$ and the two slowly--varying envelope curves
 $x_1(t)=2\sin 4t$ (black), $x_2(t)=-2\sin 4t$ (grey).
 
\bigskip
 
The undamped, forced spring-mass problem\newline
$x''+1296x=640\cos(44t)$, $x(0)=x'(0)=0$\newline
has by trig identities the solution\newline
 $x(t)=\cos(36t)-\cos(44t)=2\sin 4t\sin 40t$.
% de:=diff(x(t),t,t)*1+x(t)*36^2=cos(44*t);dsolve([de,x(0)=0,D(x)(0)=0],x(t));

 \vspace*{2pc}
 \end{minipage}
\end{tabular} 
% source was book figure, {fig4.7.14}
%a:=4:b:=10*a:
% opts:=scaling=constrained,axes=boxed,axesfont=[Courier,bold,16],labelfont=[Courier,bold,16],thickness=4,color=[red,gray,black]:
% plot({sin(a*t),sin(a*t)*sin(b*t),-sin(a*t)},t=0..2*(2*Pi/a),opts);
%# 4-7beats.eps

A key example is piano tuning. A tuning fork is struck, then the piano string is tuned until the beats are not heard.
The number of beats per second (unit Hz) is approximately the frequency difference between the two sources, e.g., two tuning forks of frequencies $440$ Hz and $437$ Hz would produce $3$ beats per second.

The average human ear can detect beats only if the two interfering sound waves have a frequency difference of about $7$ Hz or less. Ear-tuned pianos are subject to the same human ear limitations. Two piano keys are more than $7$ Hz apart, even for a badly tuned piano, which is why simultaneously struck piano keys are heard as just one sound (no beats).

 The beat we hear corresponds to maxima in the figure.
We see not the two individual sound waves, but their \BF{superposition}. When
the tuning fork and the piano string have the same exact frequency $\omega$, then the figure would show a simple harmonic wave,
because the two sounds would \BF{superimpose} to a graph that looks like  $\cos(\omega t-\alpha)$.

% http://www.physicsclassroom.com/class/sound/u11l3a.cfm
%A piano tuner frequently utilizes the phenomenon of beats to tune a piano string. She will pluck the string and tap a tuning fork at the same time. If the two sound sources - the piano string and the tuning fork - produce detectable beats then their frequencies are not identical. She will then adjust the tension of the piano string and repeat the process until the beats can no longer be heard. As the piano string becomes more in tune with the tuning fork, the beat frequency will be reduced and approach 0 Hz. When beats are no longer heard, the piano string is tuned to the tuning fork; that is, they play the same frequency. The process allows a piano tuner to match the strings' frequency to the frequency of a standardized set of tuning forks.
%Human ears can only detect beats if the two interfering sound waves have a difference in frequency of 7 Hz or less. No two keys on the piano are that similar in frequency.


The origin of the phenomenon of \BF{beats} can be seen from the formula
$$x(t)=2\sin at\sin b t.$$
There is no sound when $x(t)\approx 0$: this is when destructive
interference occurs. When $a$ is small compared to $b$, e.g., $a=4$ and $b=40$, then there
are long intervals between the zeros of $A(t)=2\sin a t$, at which destructive
interference occurs. Otherwise, the amplitude of
the sound wave is the average value of $A(t)$, which is $1$. The sound stops
at a zero of $A(t)$ and then it is rapidly loud again, causing the
beat.


{\large{\bf The Problem}. Solve the initial value problem
$$x''+1296x=640\cos(44t),\quad x(0)=x'(0)=0$$ 
by undetermined coefficients and linear algebra, obtaining the solution
$x(t)=\cos(36t)-\cos(44t)$. Then show the trig details for $x(t)=2\sin(4t)\sin(40t)$. Finally, graph $x(t)$ and its slowly varying envelope curves on $0 \le t \le \pi$.}

\rule{\textwidth}{0.5ex}

\vfill\newpage
{\bf Solution to Problem 4}.

The trial solution for undetermined coefficients has the form $x=d_1\cos(44t)+d_2\sin(44t)$. This is the Rule I trial solution. But Rule II does not modify the trial solution, because the Euler solution atoms $\cos(44t),\sin(44t)$ are not solutions of the homogeneous equation $x''+1296x=0$.

Insert the trial solution into $x''+1296x=640\cos(44t)$ to obtain the equation
$$(1296-44^2)d_1\cos(44t)+(1296-44^2)d_2\sin(44t)=640\cos(44t).$$
Then matching atoms across the equal sign implies $d_1=640/(1296-44^2)=-1$, $d_2=0$.
The particular solution is the trial solution with $d_1=-1$, $d_2=0$. The formula obtained so far is
$$x_p(t)=-\cos(44t).$$
The homogeneous solution $x_h(t)$ is found from the characteristic equation $r^2+1296=0$, with complex conjugate roots $r = \pm 36i$. Then
$$x_h(t) = c_1\cos(36t)+c_2\sin(36t).$$
The initial conditions $x(0)=x'(0)=0$ are used together with the general solution and its derivative
$$
\begin{array}{lcccl}
x(t)&=&x_h(t)+x_p(t)&=&c_1\cos(36t)+c_2\sin(36t)-\cos(44t) \\
x'(t)&=&x_h'(t)+x_p'(t)&=&-36c_1\sin(36t)+36c_2\cos(36t)+44\sin(44t)
\end{array}
$$
to obtain the $2\times 2$ linear algebraic system of equations
$$
\left\{\begin{array}{rcrcrl}
\cos(0) c_1 &+& \sin(0) c_2 &=& \cos(0), & \mbox{~~Equation $x(0)=0$} \\
-36\sin(0) c_1 &+& 36\cos(0) c_2 &=& -44\sin(0). & \mbox{~~Equation $x'(0)=0$}
\end{array}\right.
$$
Then $c_1=1,c_2=0$ and $x(t)=\cos(36t)-\cos(44t)$.

The trig identities $\cos(a-b)=\cos(a)\cos(b)+\sin(a)\sin(b)$, $\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$ are subtracted to give
$\cos(a-b)-\cos(a+b)=2\sin(a)\sin(b)$. Let $a-b=36t,a+b=44t$ and solve for $a=40t,b=4t$. Then
$$
\begin{array}{lcl}
x(t) &=& \cos(36t)-\cos(44t) \\
     &=& \cos(a-b)-\cos(a+b) \\
     &=& 2\sin a \sin b \\
     &=& 2\sin 4t \sin 40t.
\end{array}
$$
The graphic of the problem was obtained from {\tt MAPLE}.
\begin{verbatim}
a:=4:b:=10*a:
opts:=scaling=constrained,axes=boxed,axesfont=[Courier,bold,16],
labelfont=[Courier,bold,16],thickness=4,color=[red,gray,black]:
 plot([sin(a*t)*sin(b*t),-sin(a*t),sin(a*t)],t=0..2*(2*Pi/a),opts);
 \end{verbatim}
\end{document}
\endinput 
