\documentclass{article} 
\input{linalg.sty}
\def\MAPLE{{\tt Maple}}
\def\rf#1{(\ref{#1})}
\def\Prob#1#2{\par\bigskip\par\noindent
{\Large\sf Problem #1}. {\bf #2}\par}
\parskip=3pt
\def\MAPLE{{\tt maple}}
\def\RHS{\mbox{RHS}}
\def\LHS{\mbox{LHS}}
% \begin{topics}{template} ... \end{topics}
% used like enumerate, itemize, description environments
% The item[] is never optional!
%
%\newcommand{\topicslabel}[1]{\mbox{#1}\hfil}
%\newenvironment{topics}[1]{
%    \begin{list}{}{%
%      \let\makelabel\topicslabel
%      \settowidth{\labelwidth}{\topicslabel{#1}}
%      \setlength{\leftmargin}{\labelwidth}
%      \advance\leftmargin by 1.5em}
%}{\end{list}}
 \pagestyle{plain}
 \setlength{\textheight}{10in}
\begin{document}
\thispagestyle{empty} {\bf
Name~}\underline{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}\hfill
% {Class Time~}\underline{~~~~~~~~}\newline

\begin{center}
\bf Math 2280
\bf Extra Credit Maple Lab 4, Mechanical Oscillations. \\
\bf Due at the end of the semester, Spring 2017
\end{center}


{\bf Due date}: See the internet due dates. Maple lab 4 has four
problems: L4-1, L4-2, L4-3. 
  Please answer the
 questions A, B, C , \ldots associated with each problem. 
%The original worksheet "2250mapleL4-resonance-S2017.mws" is a template for the solution; you
% must fill in the code and all comments. Sample code can be copied with
% the mouse. Use pencil freely to annotate the worksheet and to clarify
% the code and figures.
                                 
\small
 Problem scores for the Spring 2017 version of 
  Extra Credit Maple Lab 4, Mechanical Vibrations:
 
\begin{quote}
 \underline{~~~~~~~~~~~~} L4-1. [100] Under-Damped Free Vibration.\\
 \underline{~~~~~~~~~~~~} L4-2. [100] Undamped Forced Vibration.\\
 \underline{~~~~~~~~~~~~} L4-3. [100] Practical Resonance.
\end{quote} 
\subsubsection*{L4-1. Under-Damped Free Vibration}
 
{\bf Free Vibrations}. Consider the problem of free linear vibrations of
a damped spring-mass system
$$  \begin{array}{l}
           m x'' + c x' + k x=0,\\
           x(0)=0,\quad  x'(0)=1, \\
           m=4,\quad c=3.
\end{array}
$$                                                   
 Symbols $m$, $c$ and $k$ are non-negative constants, representing the
 mass, viscous damping constant and Hooke's constant, respectively. The
 under-damped case is studied here, $c^2 < 4km$, as explained in section
 5.4 the Edwards-Penney textbook {\em Differential Equations and Linear
        Algebra, 3/E}. Inserting $m=4$, $c=3$ gives the requirement
$9<16k$ on Hooke's constant $k$.

{\bf Problem L4-1}.
\begin{itemize}
    \item[{\bf A}.] Select and display a positive Hooke's constant $k$
    so that the solution x(t) is under-damped. Choose the specific value
    of $k$ so that the graphic in part $B$ below displays well. Check
    that $x(t)=0$ for infinitely many t>0 (the solution oscillates).
    Display the exact solution $x(t)$ obtained by Maple methods as in
    the example below.
 
    \item[{\bf B}.] Plot the exact symbolic solution $x(t)$ on a suitable
    $t$-interval. Check the graphic against Figure 5.4.9 in Edwards-Penney.
 
    \item[{\bf C}.] Estimate from the graph the decimal value of the
    pseudo-period. Display the graphical estimate and also the exact
    pseudo-period $2\pi/w$, where $w$ is the natural frequency of the
    trigonometric term in the solution $x(t)$ found above in item L4.1-A.
\end{itemize} 
\begin{verbatim}
 # EXAMPLE(Wrong parameters! Change it!)             
 # Use semicolons to see what you have done.
 # Define the differential equation
 de:=3*diff(x(t),t,t)+1.5*diff(x(t),t)+4*x(t)=0:   
 # Solve the characteristic equation.
 solve(3*r^2+1.5*r+4=0,r);                         
 # Define the initial conditions
 ic:=x(0)=0,D(x)(0)= 1:                            
 # Symbolically solve for x(t)
 p:=dsolve({de,ic},x(t),method=laplace):           
 # Capture the dsolve symbolic solution as a function X(t)
 X:=unapply(rhs(p),t):                             
 # Plot the solution
 plot(X(t),t=0..5);                                
\end{verbatim} 
{\bf Maple tip}: Click with the mouse on the graphic to print the cursor
location (left upper corner of the maple window). The coordinates
printed are of the form $(x,y)$. From this coordinate information, a
subtraction estimates the period.
 
\subsubsection*{L4-2. Undamped Forced Vibration}
 
{\bf Forced Linear Vibrations}.  Consider the undamped ($c=0$) forced
 vibration problem for a spring-mass system:
$$\begin{array}{l} 
      mx'' +  k x = 5 \cos(wt),\\
      x(0)=0,\quad  x'(0)=0, \\
      m=5,\quad k=3.5
\end{array} 
$$
Symbol $w$ is a positive constant, the input natural frequency.
Symbols $m,k$ are respectively mass and Hooke's constant.
\begin{itemize} 
    \item[{\bf A}.]  Divide the differential equation by $m=5$ to obtain
     $x'' + w_0^2 x = \cos(wt)$ where $w_0^2=k/m=3.5/5$ defines the
     natural angular frequency $w_0=\sqrt{35/50}=0.8366600265$.
     Choose the input natural frequency $w$ to be $3$ times larger
        than the natural angular frequency $w_0$.
        Solve for $x(t)$ using Maple's {\tt dsolve()}. 
 
    \item[{\bf B}.] Because $w=3w_0$, then $w\ne w_0$. The solution
        $x(t)$ is the sum of two functions, one of period $2\pi/w$ and
        the other of period $2\pi/w_0$ (phenomenon of Beats). Graph the
        slowly-varying envelope curves and the rapidly-varying solution
        curve $x(t)$ on a suitable interval. See Figure 3.6.3 in
        Edwards-Penney.

    \item[{\bf C}.] Suggest a value for the forcing frequency $w$ so that the
       vibration exhibits resonance.  Show the resonant behavior in a
       graphic. Check against Figure 3.6.4 in Edwards-Penney.
\end{itemize} 
 
\subsubsection*{L4-3. Practical Resonance}
   Consider the damped forced vibration problem
$$\begin{array}{l} 
      mx'' + c x' + k x = 5 \cos(w t),\\
      x(0)=0,\quad  x'(0)=0, \\
      m=4, \quad k=41.
\end{array} 
$$
Symbol $w$ is a positive constant, the input natural frequency.
Symbols $m,c,k$ are respectively mass, viscous damping constant and
Hooke's constant.
\begin{itemize} 
\item[{\bf A}.] Consider the damping constants $c=2$, $c=1$ and $c=1/2$.
       Compute the amplitude function $C(w)$ [section 5.6] for these
       three equations, then plot for $w=0$ to $w=20$ the three
       amplitude graphs on a single set of axes. Compare against Figure
       3.6.9 in Edwards-Penney (it has one curve, yours has 3 curves).
 
\item[{\bf B}.] For each case $c=2$, $c=1$, $c=1/2$, print the values
       $w^*$, $C^*$ where $C^*=C(w^*)=\max \{C(w) ~:~ 0 \le w \le 20\}$.
       The three data pairs should show that C* becomes larger as c
       tends to zero. 
 
{\bf Maple Hint}: Use Maple's mouse interface on the graphic of Part A.
    Specifically, click on a possible maximum (horizontal tangent) in
    the graph to display the values $w^*$, $C^*$ on the screen. Look around
    the screen to see where maple printed the $x,y$-coordinates! Copy the
    values into your maple worksheet report.
\end{itemize} 
\begin{verbatim}
 #EXAMPLE(Beware! Wrong values!)
 F:=15: m:=1: k:=25: 
 c:='c': w:='w':
 C:=(w,c)->F/sqrt((k-m*w*w)^2+(c*w)^2):
 plot({C(w,4),C(w,3),C(w,2)},w=0..15,color=black);
\end{verbatim}
\end{document}
