\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{graphicx}
\begin{document}
\section*{Quiz 8}
\rule{\textwidth}{0.5ex}
{\bf Quiz 8, Problem 1}. {\bf $RLC$-Circuit}\newline
\begin{center}
\includegraphics[scale=1.0]{figures/rlc-circuit.png}
\end{center}
{\large\bf The Problem}.
\begin{large}
Suppose $E=5\sin(10t)$, $L=5$ H, $R = 25\,\Omega$ and $C=0.002$ F. The model for the charge $Q(t)$ is $LQ''+RQ'+\frac{1}{C}Q=E(t)$.
\begin{itemize}
\item[{\bf (a)}] Differentiate the charge model and substitute $I=\frac{dQ}{dt}$ to obtain the current model $5I''+250I'+500I=2000\cos(20t)$.

\item[{\bf (b)}] Find the {\bf reactance} $S=\omega L - \frac{1}{\omega C}$, where $\omega=20$ is the input frequency, the natural frequency of $E=5\sin(10t)$ and $E'=50\cos(10t)$.

\item[{\bf (c)}]  The steady-state current is
 $I(t)=A\cos(10t)+B\sin(10t)$ for some constants $A,B$.
 Substitute $I=A\cos(10t)+B\sin(10t)$ into the current model (a) and solve for $A,B$.


\item[{\bf (d)}] Write the answer in (c) in phase-amplitude form $I=I_0\sin(10t-\delta)$ with $I_0>0$ and $\delta \ge 0$. Then compute the {\bf time lag} $\delta/\omega$.

    Answers: $I_0=\frac{4}{\sqrt{109}}$, $\delta=\arctan(3/10)$, $\delta/\omega=0.01457$.

% arctan(x)+arctan(1/x)=Pi/2
\end{itemize}
\end{large}

\rule{\textwidth}{0.5ex}
\subsection*{References}
Course slides on \href{http://www.math.utah.edu/~gustafso/s2014/2250/electricalCircuits.pdf}{Electric Circuits}. Edwards-Penney {\em Differential Equations and Boundary Value Problems}, section 3.7, course supplement. EP or EPH sections 5.4, 5.5, 5.6.
\vfill\newpage
\section*{Solutions to Problem 1}

{\large\bf Problem 1(a)} Start with $5Q''+250Q'+500Q=100\sin(20t)$. Differentiate across to get
$5Q'''+250Q''+500Q'=2000\cos(20t)$. Change $Q'$ to $I$.

\bigskip

{\large\bf Problem 1(b)} $S=(20)(5)-1/(20*0.002)=75$

\bigskip

{\large\bf Problem 1(c)} It helps to use the differential equation $u''+400u=0$ satisfied by both $u_1=\cos(20t)$ and $u_2=\sin(20t)$. Functions $u_1,u_2$ are Euler solution atoms, hence independent. Along the solution path, we'll use $u_1'=-20\sin(20t)=-20u_2$ and $u_2'=20\cos(20t)=20u_1$.
The arithmetic is simplified by dividing the equation first by $5$. We then substitute $I=Au_1+Bu_2$.

$$\begin{array}{l}
I'' + 50I' + 100I = 400\sin(20t)
\\
A(u_1'' + 50u_1' + 100u_1)+B(u_2'' + 50u_2' + 100u_2)=400\sin(20t)
\\
A(-400u_1 + 50(-20u_2) + 100u_1)+B(-400u_2 + 50(20u_1) + 100u_2)=400\sin(20t)
\\
(-400A +100A+ 1000B )u_1 + (-1000A -400B + 100B)u_2=400u_2
\end{array}
$$
By independence of $u_1,u_2$, coefficients of $u_1,u_2$ on each side of the equation must match. The linear algebra property is called {\em unique representation of linear combinations}. This implies the $2\times 2$ system of equations
$$
\begin{array}{rcrcl}
-300A &+& 1000B &=& 0, \\
-1000A &-& 300B &=& 400.
\end{array}
$$
%solve({-300*A + 1000*B = 400,
%-1000*A - 300*B = 0},{A,B});
%
%                       /    -12      40 \
%                      { A = ---, B = --- }
%                       \    109      109/
%

The solution by Cramer's rule (the easiest method) is $A=-12/109,B=40/109$. Then the steady-state current is
$$I(t)=A\cos(20t)+B\sin(20t)=\frac{-12\cos(20t)+40\sin(20t)}{109}.$$
The {\bf steady-state current} is defined to be the sum of those terms in the general solution of the differential equation that remain after all terms that limit to zero at $t=\infty$ have been removed. The logic is that only these terms contribute to a graphic or to a numerical calculation after enough time has passed (as $t\to\infty$).

\bigskip

{\large\bf Problem 1(d)} Let $\cos(\delta)=B/I_0, \sin(\delta)=-A/I_0, I_0=\sqrt{A^2+B^2}$. Use the trig identity
$$\sin(a-b)=\sin(a)\cos(b)-\cos(a)\sin(b)$$
to rearrange the current formula as follows:
$$I(t)=A\cos(20t)+B\sin(20t)=I_0(\sin(20t)\cos(\delta)-\sin(\delta)\cos(20t))=I_0\sin(20t-\delta).$$
Compute $I_0=\sqrt{A^2+B^2}=\frac{4}{\sqrt{109}}$. Compute $\tan(\delta)=\frac{\sin\delta}{\cos\delta}=-A/B=12/40$. Then $\delta=\arctan(12/40)$ and finally $\delta/\omega=\arctan(3/10)/20=0.01457$.

{\bf Another method}, using Edwards-Penney {Differential Equations and Boundary Value Problems}, section 3.7: Compute the {\bf impedance} $Z=\sqrt{R^2+S^2}=\sqrt{250^2+75^2}=\sqrt{68125}=25\sqrt{109}$ and then $I_0=E_0/Z=4/\sqrt{109}$. The phase $\delta = \arctan(S/R)=\arctan(75/250)=\arctan(3/10)$. Then the time lag is $\delta/\omega=\frac{\arctan(0.3)}{20}=0.01457$.

% evalf(arctan(3/10)/20.);  0.01457283972

\rule{\textwidth}{0.5ex}

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

{\bf Sample Quiz 8, Problem 2}. {\bf Picard's Theorem and $RLC$-Circuit Models}

\bigskip
\begin{tabular}{@{}lcc@{}}
\begin{minipage}[b]{0.6\textwidth}
{\large\bf Picard-Lindel\"of Theorem}.\sf{} Let $\vec{f}(x,\vec{y})$ be defined for $|x-x_0|\le h$, $\|\vec{y}-\vec{y}_0\| \le k$, with $\vec{f}$ and $\frac{\partial \vec{f}}{\partial \vec{y}}$ continuous. Then for some constant $H$, $0<H<h$, the problem
$$\left\{ \begin{array}{lcll}
\vec{y}\,'(x) &=& \vec{f}(x,\vec{y}(x)), & |x-x_0| < H, \\
\vec{y}(x_0) &=& \vec{y}_0
\end{array}\right.
$$
has a unique solution $\vec{y}(x)$ defined on the smaller interval $|x-x_0| < H$.
\end{minipage}
&
%\begin{center}
\begin{tabular}[b]{@{}c@{}}
\includegraphics[scale=0.3]{figures/emilePicard.jpeg}
\\
{\footnotesize\sf Emile Picard}
\end{tabular}
&
\includegraphics[scale=0.3]{figures/ernstLindelof.jpeg}
%\end{center}
\end{tabular}

\rm
{\large\bf The Problem}.
\begin{large}
The second order problem
\begin{equation}\label{rlc-charge-model}
\left\{\begin{array}{l}
u'' + 2u' + 5u = 60\sin(20x),\\
u(0)=1,\\
u'(0)=0
\end{array}\right.
\end{equation}
is an $RLC$-circuit charge model, in which the variables have been changed. The variables are time $x$ in seconds and charge $u(x)$ in coulombs. Coefficients in the equation represent an inductor $L=1$ H, a resistor $R=2\, \Omega$, a capacitor $C=0.2$ F and a voltage input $E(x)=60\sin(20x)$.

The several parts below detail how to convert the scalar initial value problem into a vector problem, to which Picard's vector theorem applies. Please fill in the missing details.
\end{large}

\begin{itemize}
\item[{\bf (a)}]
The conversion uses the {\bf position-velocity substitution} $y_1=u(x), y_2=u'(x)$, where $y_1,y_2$ are the invented components of vector $\vec{y}$. Then the initial data $u(0)=1,u'(0)=0$ converts to the vector initial data
$$\vec{y}(0) = \colvector{1\\ 0}.$$

\item[{\bf (b)}]
Differentiate the equations  $y_1=u(x), y_2=u'(x)$ in order to find the scalar system of two differential equations, known as a {\bf dynamical system}:
$$y_1' = y_2,\quad y_2' = -5y_1-2y_2 +60\sin(20x).$$

\item[{\bf (c)}]
The derivative of vector function $\vec{y}(x)$ is written $\vec{y}\,'(x)$ or $\frac{d\vec{y}}{dx}(x)$. It is obtained by componentwise differentiation: $\vec{y}\,'(x)=\colvector{y_1'\\ y_2'}$. The vector differential equation model of scalar system (\ref{rlc-charge-model}) is
\begin{equation}\label{rlc-vector-model}
\left\{\begin{array}{lcl}
\vec{y}\,'(x) &=& \twobytwo{0 & 1}{-5 & -2}\vec{y}(x) + \colvectorC{0\\ 60\sin(20x)},\\[2ex]
\vec{y}(0) &=& \colvectorC{1\\ 0}.
\end{array}\right.
\end{equation}

\item[{\bf (d)}]
System (\ref{rlc-vector-model}) fits the hypothesis of Picard's theorem, using symbols
$$\vec{f}(x,\vec{y}) = \twobytwo{0 & 1}{-5 & -2}\vec{y}(x) + \colvectorC{0\\ 60\sin(20x)},
\quad \vec{y}_0 = \colvector{1\\ 0}.
$$
The components of vector function $\vec{f}$ are continuously differentiable in variables $x,y_1,y_2$, therefore $\vec{f}$ and $\frac{\partial \vec{f}}{\partial \vec{y}}$ are continuous.


\end{itemize}

\rule{\textwidth}{0.5ex}
\vfill\newpage
\section*{Solutions to Problem 2}

{\large\bf (a)}\quad $\vec{y}(0)=\colvector{y_1(0)\\ y_2(0)}=\colvector{u(0)\\ u'(0)} = \colvector{1\\ 0}$.

\bigskip

{\large\bf (b)}\quad Differentiate, $y_1' = u'(x) = y_2$ and $y_2' = u''(x)$ . Isolate $u''$ left in the equation $u''+2u'+5u=60\sin(20x)$, then reduce $y_2' = u''(x)$ into $y_2' = -2u'-5u+60\sin(20x)=-2y_2-5y_1+60\sin(20x)$.

\bigskip

{\large\bf (c)}\quad Initial data $\vec{y}(0)=\colvector{1\\ 0}$ was derived in part (a). The differential equation is derived from the scalar dynamical system in part (b), as follows.
$$
\begin{array}{lcl}
\vec{y}\,' &=& \colvector{y_1' \\ y_2'} \\[3ex]
           &=& \colvectorC{y_2 \\ -5y_1-2y_2+60\sin(20x)}\\[3ex]
           &=& \colvectorC{y_2 \\ -5y_1-2y_2} + \colvectorC{0\\ 60\sin(20x)}\\[3ex]
           &=& \twobytwo{0&1}{-5&-2}\colvector{y_1\\ y_2} + \colvectorC{0\\ 60\sin(20x)} \\[3ex]
           &=& \twobytwo{0&1}{-5&-2}\vec{y} + \colvectorC{0\\ 60\sin(20x)}
\end{array}
$$

\bigskip

{\large\bf (d)}\quad From calculus, polynomials and trigonometric function sine are infinitely differentiable. Therefore, in each of the variables $x,y_1,y_2$ the components of $\vec{f}$, which are just the right sides of the dynamical system equations of part (b), are also infinitely differentiable.
\vfill\newpage
\rule{\textwidth}{0.5ex}

{\bf Sample Quiz 8, Problem 3}. {\bf Solving Higher Order Constant-Coefficient Equations}

\begin{quote}\sf
{\bf The Algorithm} applies to constant-coefficient homogeneous linear differential equations of order $N$, for example equations like
$$ y'' + 16y=0, \quad y'''' + 4y'' = 0, \quad \frac{d^5y}{dx^5} + 2y''' + y'' = 0.$$
\begin{itemize}
\item[{\bf 1}.] Find the $N$th degree characteristic equation by Euler's substitution $y=e^{rx}$. For instance, $y'' + 16y=0$ has characteristic equation $r^2+16=0$, a polynomial equation of degree $N=2$.
\item[{\bf 2}.] Find all real roots and all complex conjugate pairs of roots satisfying the characteristic equation. List the $N$ roots according to multiplicity.
\item[{\bf 3}.] Construct $N$ distinct Euler solution atoms from the list of roots. Then the general solution of the differential equation is a linear combination of the Euler solution atoms with arbitrary coefficients $c_1,c_2,c_3,\ldots$.

    The solution space $S$ of the differential equation is given by
    $$S=\SPAN(\mbox{the $N$ Euler solution atoms}).$$
\end{itemize}

{\bf Examples}: Constructing Euler Solution Atoms from roots.

Three roots $0,0,0$ produce three atoms $e^{0x}, xe^{0x}, x^2e^{0x}$ or $1,x,x^2$.

Three roots $0,0,2$ produce three atoms $e^{0x},xe^{0x},e^{2x}$.

Two complex conjugate roots $2\pm3i$ produce two atoms $e^{2x}\cos(3x),e^{2x}\sin(3x)$.\footnote{The Reason: $\cos(3x)=\frac12e^{3xi}+\frac12e^{-3xi}$ by Euler's formula $e^{i\theta}=\cos\theta+i\sin\theta$. Then $e^{2x}\cos(3x)=\frac12e^{2x+3xi}+\frac12e^{2x-3xi}$ is a linear combination of exponentials $e^{rx}$ where $r$ is a root of the characteristic equation. Euler's substitution implies $e^{rx}$ is a solution, so by superposition, so also is $e^{2x}\cos(3x)$. Similar for $e^{2x}\sin(3x)$.}

Four complex conjugate roots listed according to multiplicity as $2\pm3i,2\pm3i$ produce four atoms $e^{2x}\cos(3x),e^{2x}\sin(3x)$, $xe^{2x}\cos(3x),xe^{2x}\sin(3x)$.

Seven roots $1,1,3,3,3,\pm3i$ produce seven atoms $e^x,xe^x,e^{3x},xe^{3x}, x^2e^{3x}, \cos(3x),\sin(3x)$.

Two conjugate complex roots $a\pm bi$ ($b>0$) arising from roots of $(r-a)^2+b^2=0$ produce two atoms $e^{ax}\cos(bx),e^{ax}\sin(bx)$.
\end{quote}

\section*{The Problem}
Solve for the general solution or the particular solution satisfying initial conditions.

(a) \quad $y'' + 16y' = 0$

(b) \quad $y'' + 16y=0$

(c) \quad $y'''' + 16y''=0$

(d) \quad $y'' + 16y=0$, $y(0)=1$, $y'(0)=-1$

(e) \quad $y'''' + 9y''=0$, $y(0)=y'(0)=0$, $y''(0)=y'''(0)=1$

(f) \quad The characteristic equation is $(r-2)^2(r^2-4)=0$.

(g) \quad The characteristic equation is $(r-1)^2(r^2-1)((r+2)^2+4)=0$.

(h) \quad The characteristic equation roots, listed according to multiplicity, are $0,0,0,-1,2,2,3+4i,3-4i$.

\rule{\textwidth}{0.5ex}
\vfill\newpage
\section*{Solutions to Problem 3}

(a) \quad $y'' + 16y' = 0$ upon substitution of $y=e^{rx}$ becomes $r^2+16r)e^{rx}=0$. Cancel $e^{rx}$ to find the {\bf characteristic equation} $r^2+16r=0$. It factors into $r(r+16)=0$, then the two roots $r$ make the list $r=0,-16$. The Euler solution atoms for these roots are $e^{0x},e^{-16x}$. Report the general solution $y=c_1 e^{0x} + c_2 e^{-16x} = c_1+c_2e^{-16x}$, where symbols $c_1,c_2$ stand for arbitrary constants.

(b) \quad $y'' + 16y=0$ has characteristic equation $r^2+16=0$. Because a quadratic equation $(r-a)^2+b^2=0$ has roots $r=a\pm bi$, then the root list for $r^2+16=0$ is $0+4i,0-4i$, or briefly $\pm 4i$. The Euler solution atoms are $e^{0x}\cos(4x),e^{0x}\sin(4x)$. The general solution is $y=c_1\cos(4x)+c_2\sin(4x)$, because $e^{0x}=1$.

(c) \quad $y'''' + 16y''=0$ has characteristic equation $r^4+4r^2=0$ which factors into $r^2(r^2+16)=0$ having root list $0,0,0\pm 4i$. The Euler solution atoms are $e^{0x},xe^{0x},e^{0x}\cos(4x),e^{0x}\sin(4x)$. Then the general solution is $y=c_1+c_2x + c_3\cos(4x)+c_4\sin(4x)$.

(d) \quad $y'' + 16y=0$, $y(0)=1$, $y'(0)=-1$ defines a particular solution $y$. The usual arbitrary constants $c_1,c_2$ are determined by the initial conditions. From part (b), $y=c_1\cos(4x)+c_2\sin(4x)$. Then $y'=-4c_1\sin(4x)+4c_2\cos(4x)$. Initial conditions $y(0)=1,y'(0)=-1$ imply the equations $c_1\cos(0)+c_2\sin(0)=1,-4c_1\sin(0)+4c_2\cos(0)=-1$. Using $\cos(0)=1$ and $\sin(0)=0$ simplifies the equations to $c_1=1$ and $4c_2=-1$. Then
the particular solution is $y=c_1\cos(4x)+c_2\sin(4x)=\cos(4x)-\frac14\sin(4x)$.

(e) \quad $y'''' + 9y''=0$, $y(0)=y'(0)=0$, $y''(0)=y'''(0)=1$ is solved l ike part (d). First, the characteristic equation $r^4+9r^2=0$ is factored into $r^2(r^2+9)=0$ to find the root list $0,0,0\pm 3i$. The Euler solution atoms are $e^{0x},xe^{0x},e^{0x}\cos(3x),e^{0x}\sin(3x)$, which implies the general solution $y=c_1+c_2x+c_3\cos(3x)+c_4\sin(3x)$. We have to find the derivatives of $y$:
$y'=c_2-3c_3\sin(3x)+3c_4\cos(3x)$, $y''=-9c_3\cos(3x)-9c_4\sin(3x)$, $y'''=27c_3\sin(3x)-27c_4\cos(3x)$. The initial conditions give four equations in four unknowns $c_1,c_2,c_3,c_4$:
$$\begin{array}{rcrcrcrcl}
c_1 &+& c_2(0) &+& c_3\cos(0) &+& c_4\sin(0)&=&0, \\
    & & c_2    &-& 3c_3\sin(0) &+& 3c_4\cos(0) &=&0,\\
    & &        &- & 9c_3\cos(0) &-& 9c_4\sin(0) &=& 1,\\
    & &        & & 27c_3\sin(0) &-& 27c_4\cos(0) &=& 1,
\end{array}
$$
which has invertible coefficient matrix
$\fourbyfour{1&0&1&0}{0&1&0&3}{0&0&-9&0}{0&0&0&-27}$ and right side vector $\colvector{0\\ 0\\ 1\\ 1}$. The solution is $c_1=c_2=1/9$, $c_3=-1/9,c_4=-1/27$. Then the particular solution is $y=c_1+c_2x+c_3\cos(3x)+c_4\sin(3x)=\frac19+\frac19x -\frac19\cos(3x) - \frac{1}{27}\sin(3x)$
% A:=<1,0,1,0|0,1,0,3|0,0,-9,0|0,0,0,-27>^+;b:=<0,0,1,1>;A^(-1).b;


(f) \quad The characteristic equation is $(r-2)^2(r^2-4)=0$. Then $(r-2)^3(r+2)=0$ with root list $2,2,2,-2$ and Euler atoms $e^{2x},xe^{2x},x^2e^{2x},e^{-2x}$. The general solution is a linear combination of these four atoms.

(g) \quad The characteristic equation is $(r-1)^2(r^2-1)((r+2)^2+4)=0$. The root list is $1,1,1,-1,-2\pm 2i$ with Euler atoms $e^x,xe^x,x^2e^x,e^{-x},e^{-2x}\cos(2x),e^{-2x}\sin(2x)$. The general solution is a linear combination of these six atoms.

(h) \quad The characteristic equation roots, listed according to multiplicity, are $0,0,0,-1,2,2,3+4i,3-4i$. Then the Euler solution atoms are $e^{0x},xe^{0x},x^2e^{0x}, e^{-x}, e^{2x},xe^{2x}, e^{3x}\cos(4x),e^{3x}\sin(4x)$. The general solution is a linear combination of these eight atoms.


\end{document}
\endinput 