\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}
 \newif\ifsolutions
 \solutionsfalse
\usepackage{quiz}
\usepackage{alltt}
\usepackage{email}
\usepackage{hyperref}
\usepackage{graphicx}
\begin{document}
\section*{Quiz 5}
\rule{\textwidth}{0.5ex}
{\bf Quiz 5, Problem 1}. {\bf Harmonic Vibration}

A mass of $m=200$ grams attached to a spring of Hooke's constant $k$ undergoes free undamped vibration. At equilibrium, the spring is stretched $10$ cm by a force of $4$ Newtons. At time $t=0$, the spring is stretched $0.4$ m and the mass is set in motion with initial velocity $3$ 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)$.
\item[\BF{(c)}] Show details for solving the initial value problem for $x(t)$.\newline
The answer is $x(t) = \frac{2}{5}\cos(\sqrt{200}t) + \frac{3}{20}\sqrt{2}\sin(\sqrt{200}t)$, graphed below.
\end{itemize}

\includegraphics[scale=0.5]{figures/harmonic-vibration-problem1.png}
% X:=unapply((3/20)*sin(10*sqrt(2)*t)*sqrt(2)+(2/5)*cos(10*sqrt(2)*t),t);
% Fs:=evalf(arctan(3*sqrt(2)/8)/3); P:=2*Pi/sqrt(200);A:=sqrt(82)/20;
% 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);

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

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

\BF{(c)}: Let $\omega=\sqrt{200}$. Then the general solution is $x(t)=c_1\cos\omega t + c_2\sin\omega t$ and $x'(t)=-c_1\omega\sin\omega t + c_2\omega\cos\omega t$.
The $2\times 2$ system of linear algebraic equations for $c_1,c_2$ is obtained from the two equations $x(0)=0.4$, $x'(0)=3$ as follows.
$$
\left\{\begin{array}{rcrcrl}
\cos(0) c_1 &+& \sin(0) c_2 &=& 0.4, & \mbox{~~Equation $x(0)=0.4$} \\
-\omega\sin(0) c_1 &+& \omega\cos(0) c_2 &=& 3. & \mbox{~~Equation $x'(0)=3$}
\end{array}\right.
$$
Then $c_1=0.4$ and $c_2=2/\omega$. The solution is
$$x(t) = \frac{4}{10}\cos\sqrt{200}t + \frac{3}{\sqrt{200}}\sin(\sqrt{200}t.$$

Answer checks:
\begin{verbatim}
de:=diff(x(t),t,t)*1+x(t)*200=0;
dsolve([de,x(0)=0.4,D(x)(0)=3],x(t));
\end{verbatim}
\fi


\rule{\textwidth}{0.5ex}

\vfill\newpage
\rule{\textwidth}{0.5ex}
{\bf Quiz 5, Problem 2}.{\bf Harmonic Vibration, Continued}

Assume results (a), (b), (c) from Problem 1. In particular, assume
$$x(t) = \frac{2}{5}\cos(\sqrt{200}t) + \frac{3\sqrt2}{20}\sin(\sqrt{200}t).$$
Complete these parts.
\begin{itemize}

\item[\BF{(d)}] Plot the solution $x(t)$ using technology, approximately matching the graphic below.
\item[\BF{(e)}] Show trig details for conversion of $x(t)$ to phase-amplitude form $$x(t)=\frac{\sqrt{82}}{20}\cos(\sqrt{200}t-\arctan(3\sqrt2/8)).$$
\item[\BF{(f)}]
     Report from the answer in part (e) decimal values for the period, amplitude and phase angle. Two-place decimal accuracy is sufficient.
\end{itemize}

\includegraphics[scale=0.5]{figures/harmonic-vibration-problem1.png}
% X:=unapply((3/20)*sin(10*sqrt(2)*t)*sqrt(2)+(2/5)*cos(10*sqrt(2)*t),t);
% Fs:=evalf(arctan(3*sqrt(2)/8)/3); P:=2*Pi/sqrt(200);A:=sqrt(82)/20;
% 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);

\ifsolutions
{\bf Solution}~\newline
\BF{(d)}: Technology such as Matlab, Maple, Mathematica, Wolfram Alpha can be used.
\begin{verbatim}
 # Maple
 X:=unapply((3/20)*sin(10*sqrt(2)*t)*sqrt(2)+(2/5)*cos(10*sqrt(2)*t),t);
 Fs:=evalf(arctan(3*sqrt(2)/8)/3); P:=2*Pi/sqrt(200);A:=sqrt(82)/20;
 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);
\end{verbatim}

\BF{(e)}: The conversion of $x(t)$ to $x(t)=A\cos(\omega t - \alpha)$ uses the trig identity
$\cos(a-b)=\cos(a)\cos(b)+\sin(a)\sin(b)$ with $a=\omega t$ and $b=\alpha$. In addition, polar coordinates are used for the point $(c_1,c_2)$ in the form $c_1=A\cos\alpha,c_2=A\sin\alpha$,
where $c_1=\frac{2}{5}$, $c_2=\frac{3\sqrt2}{20}$. Then the expression for $x(t)$ is re-written as
$$\begin{array}{lcl}
x(t)&=&c_1\cos(\sqrt{200}t)+c_2\sin(\sqrt{200}t) \\
   &=& A\cos\alpha\cos\omega t + A\sin\alpha\sin\omega t \\
   &=& A\cos(\omega t - \alpha) \\
   &=& A\cos(\sqrt{200}t - \arctan(c_2/c_1)) \\
\end{array}$$
We compute $A=\sqrt{c_1^2+c_2^2}=\frac{\sqrt{82}}{20}$ from the Pythagorean theorem, using the right triangle formed from the radial vector from $(0,0)$ to $(c_1,c_2)$, making angle $\alpha$ with the $x$-axis.

Already known is $\omega=\sqrt{200}$.

The value of $\alpha$ is found from $\tan\alpha = c_2/c_1= \frac{3\sqrt2}{8}$ by taking arctan across the equation.

Answer check:
\begin{verbatim}
de:=diff(x(t),t,t)*1+x(t)*200=0;
dsolve([de,x(0)=0.4,D(x)(0)=3],x(t));
convert(rhs(%),phaseamp,t);
\end{verbatim}

\BF{(f)}: Answer: The calculator values of amplitude $A=\frac{\sqrt{82}}{20}$, period $\dd\frac{2\pi}{\omega}=\frac{2\pi}{\sqrt{200}}$ and phase angle $\alpha=\arctan(\frac{3\sqrt2}{8})$ equal approximately $0.45, 0.44, 0.49$.
% evalf([sqrt(82)/20,2*Pi/sqrt(200),arctan(3*sqrt(2)/8)]);
%           [0.4527692569, 0.4442882938, 0.4876162426]
\fi

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



{\bf Quiz 5, Problem 3}. {\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''+1444x=1056\cos(50t),\quad x(0)=x'(0)=0$$
% de:=diff(x(t),t,t)*1+x(t)*38^2=1056*cos(50*t);dsolve([de,x(0)=0,D(x)(0)=0],x(t));
by undetermined coefficients and linear algebra, obtaining the solution
$x(t)=\cos(38t)-\cos(50t)$. Then show the trig details for $x(t)=2\sin(6t)\sin(44t)$. Finally, graph $x(t)$ and its slowly varying envelope curves on $0 \le t \le \pi$.}

\rule{\textwidth}{0.5ex}

\vfill
\ifsolutions
\newpage
{\bf Solution to Problem 3}.

The trial solution for undetermined coefficients has the form $x=d_1\cos(50t)+d_2\sin(50t)$. 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''+1444x=0$.

Insert the trial solution into $x''+1444x=1056\cos(50t)$ to obtain the equation
$$(1444-50^2)d_1\cos(50t)+(1444-50^2)d_2\sin(50t)=1056\cos(50t).$$
Then matching atoms across the equal sign implies $d_1=1056/(1444-50^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(50t).$$
The homogeneous solution $x_h(t)$ is found from the characteristic equation $r^2+1444=0$, with complex conjugate roots $r = \pm 38i$. Then
$$x_h(t) = c_1\cos(38t)+c_2\sin(38t).$$
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(38t)+c_2\sin(38t)-\cos(50t) \\
x'(t)&=&x_h'(t)+x_p'(t)&=&-38c_1\sin(50t)+38c_2\cos(38t)+50\sin(50t)
\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$} \\
-38\sin(0) c_1 &+& 38\cos(0) c_2 &=& -50\sin(0). & \mbox{~~Equation $x'(0)=0$}
\end{array}\right.
$$
Then $c_1=1,c_2=0$ and $x(t)=\cos(38t)-\cos(50t)$.

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=38t,a+b=50t$ and solve for $a=44t,b=6t$. Then
$$
\begin{array}{lcl}
x(t) &=& \cos(38t)-\cos(50t) \\
     &=& \cos(a-b)-\cos(a+b) \\
     &=& 2\sin a \sin b \\
     &=& 2\sin 6t \sin 44t.
\end{array}
$$
The graphic of the problem was obtained from {\tt MAPLE}.
\begin{verbatim}
a:=6:b:=44:
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}
 \includegraphics[scale=0.5]{figures/beats-envelope-problem3-answer.png}
\fi
\end{document}
\endinput 
