%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %% Line Spacing (e.g., \ls{1} for single, \ls{2} for double, even \ls{1.5}) %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcommand{\ls}[1] {\dimen0=\fontdimen6\the\font \lineskip=#1\dimen0 \advance\lineskip.5\fontdimen5\the\font \advance\lineskip-\dimen0 \lineskiplimit=.9\lineskip \baselineskip=\lineskip \advance\baselineskip\dimen0 \normallineskip\lineskip \normallineskiplimit\lineskiplimit \normalbaselineskip\baselineskip \ignorespaces } \documentstyle[11pt]{article} \topmargin=-0.5in \textheight 9.0in \textwidth 7.25in \oddsidemargin -.39in \parindent 0in \newcommand{\be}{\begin{equation}} \newcommand{\ee}{\end{equation}} %\ls{1} \begin{document} \centerline{\Large {\bf Honors Ordinary Differential Equations}} \centerline{\Large Spring, 1998} \centerline{B. Bukiet} \begin{itemize} \item {\bf Text}: Differential Equations - A Modeling Perspective by Borrelli and Coleman \item {\bf Times}: Class meets Tuesday, Thursday and Friday 2:30-3:55PM \item {\bf Office Hours}: Tuesday, Thursday 1:30-2:30PM \item {\bf Office}: 518 Cullimore Hall \item {\bf Phone}: (973)-596-8392 \item {\bf e-mail}: {\it bukiet@shock.njit.edu} \item {\bf Grading}: There will be 3 in-class examinations occurring approximately during the 4th, 8th, and 12th weeks of the semester. Together, they will account for 60\% of your grade. There will be no make-up exams without prior approval or doctor's note. The final exam will account for 25\% of your grade. Fifteen percent of your grade will be based on class participation, homework and projects. \item {\bf Course perspective: Modeling and applications run through the course. We will also perform physical experiments and analyze whether our models and solutions are reasonable.} \end{itemize} \section*{Course Outline} \subsection*{Models and First Order ODE Solutions} \begin{itemize} \item Mathematical Modeling - Developing and Analysing Models \item Some basics: solution curves, direction fields, order, linear vs. non-linear, normal form, initial value problem \item Solution to First Order ODEs by integration and Integrating factors \item Response to Data (initial conditions) and Input (driving terms) \item Solution to First Order ODEs using separation of variables \item Solutions in the plane - Phase portraits \item Other methods for solving first order ODEs \begin{enumerate} \item Exact Equations (ODEs that are perfect derivatives) \item Reduction of Order for $y''~=~ F(t,y')$ \item Solving $y''~=~ F(y,y')$ \item Solving first order systems in a cascade \item Solving $y'~=~f(x,y)$ where $f(kx,ky)~=~f(x,y)$ \end{enumerate} \item Reducing the number of parameters \end{itemize} \subsection*{Theory and Numerical Methods for First Order ODEs} \begin{itemize} \item Existence and Uniqueness of solutions \item Analyzing solutions without computing them for $y'~=~f(y)$ \item Long-term behavior and steady states \item Numerical methods for ODEs, Euler and Runge-Kutta, when to trust your solver \end{itemize} \subsection*{Second Order Linear ODEs} \begin{itemize} \item The mass-spring system \item Second order ODEs and their properties \item {\bf Constant coefficient linear ODEs -Undriven} \item {\bf Constant coefficient linear ODEs -Driven} \item Method of Undetermined Coefficients \item Using Complex Functions \item General linear ODEs theory and the Wronskian \item Variation of Parameters \item Pendulum and Linearized pendulum, beats and resonance \item Electrical circuits \item Laplace Transforms for Solving ODEs \item Series solutions, Ordinary points and Regular Singular points \end{itemize} \newpage \centerline{\bf \LARGE Course Notes} \section*{Introduction to Modeling and Analyzing ODEs} \noindent What are Ordinary Differential Equations (ODEs): Equations relating quantities and rates of change of quantities. The rates of change are with respect to one quantity (e.g., time). Otherwise it's a PDE (partial differential equation). \\ \noindent Many real world applications in finance, biology, engineering, physics, etc. \\ \noindent Mathematical modeling: Taking the real-world and casting in mathematical terms. Real world $\to$ Simplifying Assumptions $\to$ Model Equations $\to$ Solutions and Analysis $\to$ Interpretation $\to$ Revision of Model. \\ \noindent How many tons of fish can be harvested each year without killing off the population? Factors: birth, death (overcrowding), harvesting. Let $y(t) ~=~$ tons of fish. Discuss $y'(t) ~=~ by(t) - (m+cy(t))y(t) -H$. \\ \noindent Solution = function that satisfies the ODE. \\ \noindent Initial condition $y(t_0)~=~y_0$ \\ \noindent ODE + IC = Initial Value Problem. \\ \noindent Consider special cases: $H$ constant and $y(0)=y_0$. \\ \begin{itemize} \item Solve $y' ~=~ ay - H$ with Let $a~=~ 1$ and $H~=~0$ \item Solve $y' ~=~ ay - H$ with Let $a~=~ 1$ and $H~=~5/3$\\ Equilibrium solution: Since $y'(t)$ means slope, $y'(t) ~=~ 0$, $y$ is constant. \item Analyze $y' ~=~ ay - cy^2$ We can't solve yet. Let $a=1$ and $c = 1/12$. Look at numerical solutions. Discuss advantages and disadvantages of numerics. Fig. 1.1.3. \item Analyze $y' ~=~ y - \frac{y^2}{12} - \frac{5}{3} ~=~ -\frac{1}{12}(y-2)(y-10)$ with $y(0)~=~y_0$. Fig. 1.1.4. \item Analyze $y' ~=~ y - \frac{y^2}{12} - 4 ~=~ -\frac{1}{12}(y^2 - 12y + 48) ~=~ -\frac{1}{12}((y - 6)^2 + 12) ~<~ 0$. Flattest at $y~=~6$. \item Read Ban on Fishing p. 7 at home. \end{itemize} \noindent Modeling allows testing effect of policies without trying out each one experimentally. \\ \noindent Discuss using runge-kutta code. Must be able to plot pairs of coordinates. \\ \section*{Solution curves and direction fields} \noindent Normal form $y'(t)~=~ f(t,y)$ \\ \noindent Solution: A function $y(t)$ defined on a $t$-interval $I$ is a solution of the ODE if $f(t,y(t))$ is defined and $y'(t)~=~ f(t,y(t))$ for all $t$ in $I$. (We'll find out later that a unique solution exists when $f$ and $f_y$ are continuous. No two solutions can cross in this circumstance.) \\ \noindent Direction field: drawing slopes tells how to sketch solution. Consider $y'~=~y-t^2$. Fig. 1.2.2. Consider $y'(t)~=~f(y)$. Consider $y'(t)~=~(y-1)(y-2)(y-3)$. \\ \noindent Discuss Fig 1.2.3 for $y'~=~ y - y^2 - 0.2 \sin t$. \\ \noindent Nullclines: where slope is zero \\ \noindent Discuss p. 15 6a in class $(y^2)'$. \section*{Finding Solutions by Integration and Integrating Factors} \noindent Guessing and using intuition is nice, but it is useful to have methods that can be used for general classes of ODEs \\ \noindent Order: highest derivative \\ \noindent Linear: linear in $y$, $y'$ etc. not multiplied by each other, only by $g(t)$. General first order linear ODE $y'~+~p(t)y~=~q(t)$ this is in {\bf normal linear form}. $t^2y' ~-~ e^t y -\sin 3t ~=~0$ becomes $y' ~-~ \frac{e^t}{t^2}y ~=~ \frac{\sin 3t}{t^2}$ \\ \noindent $y'(t)~=~f(t)$. Just integrate. Use FTC $y(t)~=~F(t)~+~C$. Consider $y' = \cos t$ \\ \noindent Integrating factor: Consider $y'~-~2y~=~2$. Then consider $y'~+~p(t)y~=~q(t)$. Use $P(t)~=~ \int ^t p(s)ds$. Solution is $y(t)~=~ e^{-P(t)} \int e^{P(s)} q(s) ds ~+~ Ce^{-P(t)}$ Check solutions with different $C$ values do not intersect. \\ \noindent For $y(t_0) ~=~ y_0$ solution is $y(t)~=~ e^{-P(t)} \int_{t_0} ^{t} e^{P(s)} q(s) ds ~+~ y_0 e^{P(t_0)} e^{-P(t)}$. \\ \noindent Solution is unique since for any $y_0$ this is it. OR: If $p(t)$($=-f_y$) and $q(t)$($=f$) are continuous, solution exists and is unique. Consider 2 solutions $y_y$ and $y_2$. Then $z=y_1-y_2$ satisfies $z'~+~p(t)z~=~0$ with $z(t_0)~=~0$ and plug into solution above $q(t)~=~y_0~=~0$ so $z$ must be zero. \\ \noindent Discuss influence of driving term (input) $q$ and initial condition $y_0$. Works this way only because the ODE is linear. \\ \noindent Consider $y'~+~2y~=~3 e^t$ with $y(0)~=~3$ and look at long-time behavior. \\ \noindent Discuss 2a and 4a in class. \noindent \section*{Modeling} \noindent Natural (physical) variables, Natural (physical) laws, Natural (physical) parameters. State variables, The natural process is a dynamical system. \\ \noindent Net rate of change = Rate in - Rate out \\ \noindent Pollutant problem: $y_0$ lbs of pollutant in 100 gal. H$_2$O. Input 10 gal./min. with concentration $c(t)$ and outflow 10 gal./min. Well-mixed. Set up and solve. \\ \noindent Let $c(t)~=~0.2~+~0.1 \sin t$. Discuss Fig. 1.4.1 \\ \noindent Let $c(t)~=~0.2~{\rm step}(20~-~t)$. Discuss Fig. 1.4.2 \\ \noindent Solution by method of undetermined coefficients $y(t)~=~y_u(t)~+~y_d(t)$ (undriven + any driven solution). Check this. E.g. $y' + y ~=~ 17 \sin 4t$. \\ \section*{Some other applications} \noindent Newton's Law of Cooling (p. 32 number 14) Rate of change of temperature of a small object is (minus) proportional to difference between object and surroundings. \\ \noindent Radioactive decay: rate of decrease of radioactive nuclei is proportional to number of radioactive nuclei. $N' = -kN$. Half-life. \\ \noindent Vertical motion: $ma~=~-mg$ without damping. \\ \noindent Viscous damping: $my''~=~ -mg -ky'$. Longer to rise or fall. Figs. 1.5.3, 1.5.4 Wiffle ball. $k/m$ is the parameter that really matters here, no use varying each one. \\ \section*{Separation of Variables and miscellaneous ``tricks''} \noindent If $y'(x)~=~f(x,y)$ can be written $N(y)y'(x) ~+~ M(x)~=~0$ then multiply by $dx$ and integrate. E.g. $y' ~=~ \frac{-x}{y}$. Note problem at $y~=~0$ 2 solutions. \\ \noindent Can also write these in the form $N(y)dy~=~-M(x)dx$ and integrate both sides. E.g. $yy' - x ~=~ 0$ with $y(2)~=~-1$ (4 branches) \\ \noindent E.g. $(1-y^2)y'~+~x^2~=~0$. Note solution is easier to write in implicit form. \\ \noindent Solve logistic equation $y/~=~ ay - cy^2$ and analyze. \\ \noindent Read Newtonian damping at home p. 53 \\ \noindent {\bf Exact Equations}: If $H(x,y)~=~C$, then $dH~=~ H_x dx ~+~ H_y dy ~=~0$. If you recognize this, you can solve the ODE by integrating. The condition for $Mdx~+~Ndy~=~0$ to be exact is $M_y~=~N_x$. E.g. $(2xy-y^3+1)dx ~+~ (x^2 - 3xy^2 - 2y)dy~=~0$. \\ \noindent $H(x,y)~=~C$ is called an integral curve or level curve or level set \\ \noindent Phase portrait - Suppose paths for $x(t)$ and $y(t)$ are given by ODEs. We can plot the coordinates (x(t),y(t)) to study the trajectory they trace out. $\frac{dy}{dx} ~=~ \frac{M(x,y)}{N(x,y)}$ can be studied letting $\frac{dy}{dt}~=~M(x,y)$ and $\frac{dx}{dt}~=~N(x,y)$. E.g. $y''~=~ -4y$. \\ \noindent {\bf Reduction Method}: ODEs of the form $y''~=~F(t,y')$ (Note: no $y$) Reduce to first order letting $v = y'$ and integrating to obtain $y$. E.g., $y''~=~y'-t$. \\ \noindent {\bf Reduction Method}: ODEs of the form $y''~=~F(y,y')$ (Note: no $t$) Reduce to first order by letting $y'~=~v(y)$. This works since $F$ is not a function of $t$. Then $y''~=~ \frac{dv}{dt}~=~\frac{dv}{dy} \frac{dy}{dt}~=~ v\frac{dv}{dy}$. This leads to $v\frac{dv}{dy}~=~F(y,v)$ which is first order in $v$. E.g. $y''~=~\frac{y'^2}{y}~-~ \frac{y'}{y}$ with $y(0)~=~1$ and $y'(0)~=~2$. \\ \noindent Read Escape velocity and inverse square law p. 61. Optional reading: Combat models \\ \noindent Cold Pills: Compartmental model $x(t)$ amount in GI tract and $y(t)$ amount in blood $\frac{dx}{dt}~=~-k_1x$ and $\frac{dy}{dt}~=~k_1x ~-~k_2y$ with $x(0)~=~A$ and $y(0)~=~0$. Fig. 1.8.1 and 1.8.2. Read Falling Asleep in class example at home. \\ \noindent {\bf Special form}: If $y'~=~f(y/x)$ (Can test by checking if $f(kx,ky)=f(x,y)$) then let $y~=~xz$ and the ODE becomes separable. E.g. Goose flying to its nest problem, p. 79-80. \\ \noindent Non-dimensionalizing: Newtonian damping $\frac{dv}{dt}~=~-g-\frac{k}{m} v |v|$ with $v(0)~=~v_0$. Let $t=t_1s$ and $v=v_1w$ and get equation with coefficients $1$ in $\frac{dw}{ds}$. Parameters go down to 1. \\ \section*{Theory for First Order ODEs} \noindent Initial values problems useful for understanding and predicting behavior of natural processes. How do we describe behavior and solution when analytical solution cannot be found? \\ \noindent Key questions:\\ \begin{itemize} \item Existence: Under what conditions will the IVP have at least one solution? \item Uniqueness: Under what conditions will the IVP have at most one solution? \item Extension and Long-Term Behavior:: How far into the future and past can a solution be extended? How does a solution behave as $t$ gets large? \item Sensitivity: How much does a solution change when $y_0$ and $f$ change? \item Description: How can a solution be described? \end{itemize} \noindent E\&U Theorem: Suppose the functions $f(t,y)$ and $\frac{\partial f}{\partial y}$ are continuous on a closed rectangle $R$ of the $ty$-plane and that $(t_0,y_0)$ is in $R$. Then the IVP $y'~=~f(t,y)$, $y(t_0)~=~y_0$ has a solution $y(t)$ on some $t$-interval $I$ containing $t_0$ in its interior (existence) but no more than one solution in $R$ on any interval containing $t_0$ (uniqueness). \\ \noindent Idea: $y(t)~=~y_0~+~ \int _{t_0} ^t f(s,y(s)) ds$. \\ \noindent Solution curves cannot meet if $f$ satisfies E\&U theorem. \\ \noindent Fig. 2.1.3 $y'~=~3 y \sin y ~+~t$ and Fig. 2.1.4 $ty'~-~y~=~t^2 \cos t$, $y(0)~=~0$. (No solution if $y(0)~=~1$. \\ \noindent Piecewise continuous -- one-sided limits exist at all but a finite number of points. Jump discontinuities. Solve $y'~+~y~=~ {\rm step}(t-1)$. On-off functions okay for driving term in $t$. \\ \noindent Extension principle: if $f(t,y)$ and $\frac{\partial f}{\partial y}$ are continuous on a closed and bounded rectangle $R$. If $(t_0,y_0)$ is in $R$ then the solution curve can be extended til it hits the boundary of $R$. \\ \noindent A solution is maximally extended if it can't be extended to a larger interval than $I$. E.g. $y'~=~ \frac{-t^2}{(y+2)(y-3)}$. Fig. 2.2.1 \\ \noindent Autonomous ODE -- $f$ does not depend on $t$. Then direction fields only depend on $y$ and equilibrium solutions can be studied. Solutions can be translated to the left or right. E.g. $y'~=~y^2$. \\ \noindent Analyzing the sign of $f$ can tell which solution an autonomous ODE approaches. E.g. $y'~=~ (y-3)(y-1)(y+1)$. \\ \noindent Long-term behavior: If $f(y)$ and $\frac{\partial f}{\partial y}$ are continuous for all $y$, then any solution $y(t)$ which is bounded for all time approaches an equilibrium solution as $t \to \pm \infty$. \\ \noindent Steady-states: $y'~=~0$ points are candidates for first order ODEs \\ \noindent Read periodic forced oscillations and Will the message get through p. 103 at home. \\ \noindent How much will a solution change when we change a parameter in driving function, $y_0$, etc. E.g., $y'~+~p(t)y~=~q(t)$, $y(t_0)~=~y_0$. If $p(t) \ge p_0 > 0$ and $|q(t)| < M$ for all $t$ then analyze exact solution to find $|y(t)| \le |y_0|~+~ M/p_0$ for all $t$. \\ \noindent If change $y'~+~p(t)y~=~q(t)$, $y(t_0)~=~a$ to $z'~+~p(t)y~=~m(t)$, $z(t_0)~=~b$ then $|y(t)~-~z(t)| \le e^{-p_0t} |a-b|~+~ \frac{M}{|p_0|} |1-e^{-p_0t}|$. \\ \noindent If such limits can be found, the IVP is well-posed. Existence, uniqueness, extension and solution is continuous in the data. \section*{Numerical Methods} \noindent Can only do particular cases, not general numerically \\ \noindent Basis of numerical methods for ODEs is approximating slope on short intervals \\ \noindent Euler's method: Connect with short segments $\Delta x$ or $h$ of slope $f(t,y)$. E.g. $y'=y$, $y(0)~=~1$. \\ \noindent Error proportional to $\Delta x$ or $h$ after multiple steps. \\ \noindent Heun's method averages slope at 2 points (error proportional to $h^2$). Runge-Kutta at 4 points (error proportional to $h^4$.\\ \noindent Don't just blindly trust computational results, e.g. Euler for $y'~=~-10y$, $y(0)=1$, $h~=~0.1$. \\ \noindent Think about problems that might arise with $y'~=~1-t \sin y$, $y(0)=1$, as $t$ gets larger. \\ \section*{Second-Order ODEs} \noindent The mass-spring-damper system: \begin{itemize} \item Spring acts to return to equilibrium: \item Hooke's law $-ky$, Hard-spring $-ky -jy^3$, soft-spring $-ky +jy^3$, aging spring $-k(t)y$ \item Forces of gravity, damping (proportional to velocity) and driving force. \item $my''~=~ S(y)~-~ cy' - mg + f(t)$ \end{itemize} \noindent Change variables to consider motion around equilibrium given mass $kh=mg$. {\bf static deflection}\\ \noindent E.g. Hooke's law spring, 1lb weight, static deflection 15.36 in, damping constat 1.30x10$^{-4}$ lb $\cdot$ sec / in. $f(t)~=~ 0.26 \sin (5.6t)$ lb yields $z''~+~0.05z'~+~25z$. Release from rest. \\ \noindent Equilibrium solution for a Hooke's law spring ($y'$ and $y''$ must be zero.) $y'' ~=~ -\frac{k}{m}y - \frac{c}{m}y' -g$\\ \noindent Equilibrium for soft spring $g=9.8$ m/sec, $c/m=0.2$/sec, $k/m=10$sec$^{-2}$, $j/m=0.2$(m sec)${-2}$. 3 solutions (-1, near 7.5 and -6.5) but only one normal equilibrium. See Fig. 3.1.2 \\ \noindent Turning a higher order ODE into a system. Use previous example. Then numerical method can deal with it. \\ \noindent Linearizing around an equilibrium point $F(y-y_E,y'-y'_E)~=~0~+~(y-y_E)F_y(y_E,y'_E)~+~(y'-y'_E)F_{y'}(y_E,y'_E)$. Work out around (-1,0) for our problem. Good close by, not far away. See Figs. 3.1.3, 3.1.4\\ \noindent Fundamental Theorem for 2nd Order ODEs: If $F, F_y$ and $F_{y'}$ are continuous in box $B$ in $tyy'$, then the ODE $y''~=~ F(t,y,y')$, $y(t_0)=y_0,~y'(t_0)=v_0$ has a unique solution which can be extended to the boundary of $B$. The solution depends continuously on the data. \\ \noindent Orbits (phase-plane) for $y''~=~-25 y~-~0.5y'$, $y(0)=A, ~y'(0)=0$. Figs 3.2.1 and 3.2.2. Time-state curves cannot intersect. (Skip rest of 3.2)\\ \noindent Solution to $y''~+~ay'~+~by~=~0$. Guess $Ce^{rt}$. \\ \noindent Characteristic polynomial, roots, $C_1 e^{r_1 t} ~+~ C_2 e^{r_2 t}$ is also a solution. \\ \noindent Solve $y''~+~y'~-~2y~=~0$ and $y''~+~y'/2~+~y/16 ~=~0$ test $t$ times only root. \\ \noindent Trivial solution is only solution when $y(0)=0, ~y'(0)=0$. Solve $y''~+~y'~-~2y~=~0$ with $y(0)=0, ~y'(0)=3$. \\ \noindent The $D$ operator $y''~+~y'~-~2y~=~ (D^2~+~D~-~2)y$. Check$(D-1)(D+2)y$ and $(D+2)(D-1)y$. Look at $~(D^2~+~D~-~2)( \sin 3t)$. \\ \noindent Useful info: $P(D) e^{st} ~=~ P(s) e^{st}~~~~~$ $P(D) (h(t)e^{st}) ~=~ e^{st}P(D+s)[h(t)]$ \\ \noindent Linearity: $P(D)[C_1 y_1 ~+~ C_2 y_2] ~=~ C_1 P(D)y_1 ~+~ C_2 P(D)y_2$. \\ \noindent If $y_1$ and $y_2$ are solutions of $P(D)y~=~0$ then so is $C_1 y_1 ~+~ C_2 y_2$. \\ \noindent Set up operator approach to solve $y''~+~y'/2~+~y/16 ~=~0$ $(D-1/4)(D-1/4)y=0$. Let $v~=~ (D-1/4)y$, then $(D-1/4)v~=~v'-v/4~=~ 0$ and $(D-1/4)y~=~y'-y/4~=~v$\\ \noindent Solve $(D^2~+~D~-~2)y~=~ \sin t$. So $(D+2)(D-1)y~=~ \sin t$. Let $v~=~ (D-1)y$, then $(D+2)v~=~v'+2v~=~ \sin t$ and $(D-1)y~=~y'-y~=~v$\\ \noindent $e^{it}$ Taylor series is $\cos t~+~ i \sin t$. $D(e^{rt})~=~r (e^{rt})$ for complex $r$. \noindent Show equivalence between $C_1 e^{(a+bi)t} + C_2 e^{(a-bi)t}$ and $D_1 e^{at} \cos (bt) ~+~ D_2 e^{at} \sin (bt)$\\ \noindent Solve $y''+y'+100.25=0$.\\ \noindent Periodic Functions. Fundamental period or period ($2 \pi / \omega for \sin \omega t)$, cycle, amplitude (half the difference between max and min), frequency (cycles per unit time), circular frequency (radians per unit time). \noindent Simple harmonic motion $y''~+~ \omega ^2 y ~=~ 0$ \\ \noindent Aliasing: if sample two few points in the numerical solver. Read p. 187-8 at home. \\ \noindent Solve $y''+ \omega ^2 y ~=~ 3 \sin kt$. If $k/\omega=m/n$ with $m,n$ integers, periodic with period $2 \pi m /k~=~ 2 \pi n / \omega$. Figs 3.5.5 and 3.5.6. What happens as $k$ goes to $\omega$\\ \noindent Undetermined coefficients: Guess a solution and match coefficients. \begin{itemize} \item Solve $(D^2-2D+1)y~=~3 e^{-t}$. \item Solve $(D^2-2D+1)y~=~3 e^t$. Try. Then use $h(t)e^t$. \item Solve $(D^2-D-2)y~=~4 t$. \item Solve $(D^2-D-2)y~=~e^t$. \item Solve $(D^2-D-2)y~=~4t~+~e^t$. We can sum particular solutions since the ODE is linear. \item Solve $(D-1)(D-2)y~=~te^{-t}$. \item When RHS is $t^n$ and $P(D)$ has non-zero roots. Guess $A_nt^n~+~A_{n-1}t^{n-1}~+~...~+~A_1t~+~A_0$. \item When RHS is $t^n$ and $P(D)$ has $k$ zero roots. Guess $A_{n+k}t^{n+k}~+~A_{n+k-1}t^{n+k-1}~+~...~+~A_{k+1}t^{k+1}~+~A_kt^k$. \item Solve $(D^2~+~25)y~=~ \sin 4t$. Consider $e^{4it}$ and take imaginary part. \item Solve damped Hooke's Law spring with oscillatory driving force. $(D^2+2D+4)y~=~-12t^2e^{-t} \cos 2t$. Use $h(t)e^{(-1+2i)t}$ \end{itemize} \section*{General Theory of Linear ODEs} \noindent If $a(t), ~ b(t)$ and $f(t)$ are continuous, them $y''~+~a(t)y'~+~b(t)y~=~ f(t)$ with $y(t_O)=y_0$ and $y'(t_0)=v_0$ has a unique solution for all $t$. I.e. solutions do not go to $\infty$ in finite time. \\ \noindent Corollary: If $y_0~=~ v_0~=~0$ then the trivial solution $y=0$ is the unique solution.\\ \noindent $t^2y''-2ty'+2y=0$ with $y(t_O)=0$ and $y'(t_0)=0$ has $\infty$ solutions. $y=Ct^2$. \\ \noindent Polynomial operators work even if (for $P(D)=D^2+aD+b$) $a(t)$ and $b(t)$ are not constant. However, we cannot factor.\\ \noindent Nullspace - Set of solutions to $P(D)y=0$ \noindent Wronskian: For any two functions $f$ and $g$ in {\bf C}$^1$, the function $W[f,g](t)=f(t)g'(t)-f'(t)g(t)$ is called the Wronskian of $f$ and $g$.\\ \noindent Basic solution set: A pair of solutions $y_1$ and $y_2$ of the ODE $P(D)y=0$ is called a basic solution set if $W[y_1,y_2](t) \ne 0$ anywhere in $t$.\\ \noindent Wronskian satisfies the ODE: $W' + aW=0$ for second order. So $W(t)$ is never zero or always zero. Check ODE and solve by integrating factor.\\ \noindent Any solution to the undriven ODE can be written as a sum of basic solution set functions. I.e., $y = c_1 y_1~+~ c_2 y_2$.\\ \noindent In theory we can find 2 soltions with $y(O)=1$ and $y'(0)=0$ and $y(O)=0$ and $y'(0)=1$. Here $W(0)=1$ so $W(t)$ is never $0$. \\ \noindent Sometimes we can guess a solution. E.g. $t^2y''-2y=0$, let $y=t^{\alpha}$. Note numerical issues in finding solution for $t^2$ coeeficient of $0$. (Here power of $t$ was same as order of $y$ for each term.)\\ \noindent Reduction of order: If know one undriven solution $y_1$, guess $y_2~=~u y_1$. E.g. $t^2y''-ty'+y=0$. One solution $y_1=t$.\\ \noindent Variation of Parameters: If you have the undriven basic set and want to solve $P(D)y=f$, let $y_p~=~c_1(t)y_1(t)~+~c_2(t)y_2(y) $ and force all $c'y$ sums to be zero. Works even for higher order but gets messier. We end up with integral solutions, which can deal with on-off functions $f$\\ \noindent Pendulum: Derive equations if time: $mL \theta ''~+~ cL \theta ' ~+~ mg \sin \theta ~=~ h(t)$. Or for simple case $\theta ''~+~ \frac{g}{L} \sin \theta ~=~ 0$. Fig. 4.1.1. \\ \noindent Linearized pendulum is periodic (w/o damping).\\ \section*{Beats and Resonance} \noindent Revisit harmonic oscillator and write solution to $y''~+~k^2y=0$ as $A \cos (kt + \phi)$. \\ \noindent Overdamped, underdamped and critically damped case for damped pendulum with $P(D)~=~D^2~+~2cD~+~k^2$\\ \noindent Forced oscillations: Pure resonance $y''~+~k^2y~=~ A \cos kt $. Consider $z''~+~k^2z~=~ Ae^{ikt}$. Gives solution $y~=~ C_1 \cos kt ~+~ C_2 \sin kt ~+~ \frac{A}{2k} t \sin kt$ \\ \noindent Beats: Look back at solution from earlier example $y''+ \omega ^2 y ~=~ 3 \sin kt$. Consider $y''+ \omega ^2 y ~=~ A \cos kt$. Solution $y~=~ C_1 \cos \omega t ~+~ C_2 \sin \omega t ~+~ \frac{A}{\omega^2 - k^2} \cos kt$ \\ \noindent Using $y(0)=0$ and $y'(0)=0$ leads after some algebra to $y(t)~=~ \left( \frac{2A}{\omega^2 - k^2} \sin \frac{\omega - k}{2} t \right ) \sin \frac{\omega + k}{2} t$ with circular frequency $ \frac{\omega + k}{2} $ and beats frequency $|{\omega - k}{2}|$. See Fig. 4.2.5 and 4.2.6. Initial condition at equilibrium vs. not at equilibrium \\ \noindent Forced Damped Oscillations: $y''~+~2cy'~+~ky~=~F_0 \sin \omega t$. Transfer function for particular solution. Consider $z''~+~2cz'~+~kz~=~F_0 e^{i \omega t}$. Let $z~=~A e^{i \omega t}$, then $AP(i \omega)~=~F_0$. So $z(t)~=~ \frac{1}{P(i \omega)}~F_0 e^{i \omega t}$. We call $H(i \omega)~=~ \frac{1}{P(i \omega)}$ the transfer function. $H(i \omega)~=~ \frac{1}{k^2 - \omega^2 + 2ic \omega}$. \\ \section*{Electrical Circuits:} \noindent $I$ is current, which is proportional to the number of positive charges moving through a conductor per second. \\ \noindent 1 amp is 6.24 x $10^{18}$ charge carriers past a point per second. \\ \noindent 1 coulomb is the charge carried by 1 amp in one second. I.e. 1 amp = 1 coulomb/second. \\ \noindent Potential or voltage $V_{ab}$ is the voltage drop from $a$ to $b$. Energy flow or charge flow deposited in the circuit. $E(t)$ is external voltage.\\ \noindent Resistor causes voltage drop. $V_{ab}~=~ RI$ e.g. heating the circuit. Ohm's Law. Resistance measured in ohms. 1 ohm = 1 volt/amp. \\ \noindent Inductor causes voltage drop due to changing magnetic field. Faraday's Law $V_{ab}~=~ L \frac{dI}{dt}$. Inductance $L$ measured in henries = volt-sec / amp. \\ \noindent Capacitor stores charge: $q(t)~=~q(t_0)~+~ \int_{t_0} ^t I(s) ds$ = charge stored on capacitor plate.\\ \noindent Coulomb's Law $V_{ab}(t)~=~ \frac{q(t)}{C}$ \\ \noindent Sum of Voltage drops around circuit is zero (Kirchoff's Voltage Law) so $IR~+~L \frac{dI}{dt}~+~ \frac{q(t)}{C} ~-~E(t)~=~0$. \noindent $\frac{dq}{dt}~=~I$ yields $Lq''+Rq'+q/C=E(t)$ or $LI''+RI'+\frac{I}{C}=E'(t)$ e.g. $L=20H,~R=80 \Omega,~ C= 10^{-2}F,~, E(t)=50 \sin 2t$. Find $I(t)$.\\ \noindent Steady-state current $Lz''+Rz'+z/C=A e^{i \omega t}$ gives $z_d~=~ \frac{Ae^{i \omega t}}{P(i \omega)}$. So $z_d~=~ \frac{A \cos (\omega t~+~ \phi)} {[(1/C-L \omega ^2)^2~+~ \omega ^2 R^2]^{1/2}}$. The denominator here is called the impedance. The best signal occurs when $1/C~=~L \omega ^2$ or $\omega ^2~=~ 1/(LC)$.\\ \noindent Read Tune Mozart in p. 247 at home. \noindent Kirchoff's current Law: Current into a node = current out of a node. \\ \noindent Multiple loops lead to systems of ODEs. \\ \section*{Some basics of systems of ODEs} \noindent A high order ODE can always be put into the form of a system if it can be written $y^{(n)}~=~g(t,y,y',...,y^{(n-1)})$. \\ \noindent Let $x_1~=~y$,so $y'~=~x_1'$. \noindent Let $x_2~=~x_1'~=~y'$ so $x_1'~=~x_2$ \noindent Let $x_3~=~x_2'~=~y''$ so $x_2'~=~x_3$ and so on til \noindent Let $x_n~=~x_{n-1}'~=~y^{(n-1)}$ so $x_{n-1}'~=~x_n$ \noindent So $x_n'~=~y^{(n)}$ so $x_n'~=~g(t,x_1,x_2,....,x_n)$. \\ \noindent Systems in this form are needed for most numerical solvers. \\ \noindent Example arises from coupled mass-spring system. Consider 2 masses on a frictionless horizontal surface. \\ \noindent If the system is in the form $x'(t)~=~f_1(x,y,z,t);~y'(t)~=~f_1(x,y,z,t); z'(t)~=~f_1(x,y,z,t);$ then this traces out the trajectory of a particle moving in 3 dimensional space. \\ \noindent Linear system: \begin{eqnarray} x_1'~&=&~a_{11}x_1~+~a_{12}x_2~+~...+~a_{1n}x_n~+~F_1(t) \nonumber \\ x_2'~&=&~a_{21}x_1~+~a_{22}x_2~+~...+~a_{2n}x_n~+~F_2(t) \nonumber \\ x_3'~&=&~a_{31}x_1~+~a_{32}x_2~+~...+~a_{3n}x_n~+~F_3(t) \nonumber \\ .&.&. \nonumber \\ x_n'~&=&~a_{n1}x_1~+~a_{n2}x_2~+~...+~a_{nn}x_n~+~F_n(t) \nonumber \\ \end{eqnarray} \noindent Similar existence and uniqueness theorem as earlier since first order system is equivalent to higher order ODE. We need$f_i$ and $\frac{\partial f_i} {\partial x_j}$ to be continuous. \\ \noindent Equilibrium points: Where things stop, e.g., consider $x'~=~x-y+x^2-xy$ and $y'~=~-y+x^2$. Gives equilibria at (0,0) (1,1) and (-1,1). Direction fields can help to understand the trajectory. See Fig. 5.2.2 \\ \noindent A number of Mathematical Biology systems can be modeled using systems of ODEs. Examples include predator-prey systems, Disease spread, Compartmental Drug models.\\ \section*{Laplace Transform Technique} \noindent Laplace Transforms are particularly useful in solivng ODEs when there are on-off terms, integrals and time-delays. \\ \noindent Idea is to take the ODE and "transform it" to algebraic equations. Solve the algebraic equations and then transform back. \\ \noindent If $f(t)$ is defined for $t \ge 0$ the $L[f](s)~=~ \int_0 ^ \infty e ^{-st}f(t)dt$. This is a function of $s$. \\ \noindent Work out for $f(t)~=~c,t,e^{at}$. (Consider $s$ to be positive or bigger than $a$ as needed so the transform exists).\\ \noindent Transform of $y'$. Use integration by parts. \\ \noindent Discuss linearity of Laplace Transform. Two continuous functions with the same Laplace Transform are equal (we won't prove this). \\ \noindent Solve $y'~+~ay~=~f(t)$ with $y(0)~=~y_0$. Take $y(0)=1$ and $f(t)~=~4t^3e^{-at}$ .\\ \noindent We can take Laplace transforms of functions that do not grow too fast. I.e. of exponential order $|f(t)| \le Me^{at}$ for all $t \ge 0$. The would be a problem e.g. with $e^{t^2}$. \\ \noindent Find the Laplace transform of a square wave on [0,1]. \\ \noindent Laplace Transform goes to 0 as $s \to \infty$. Laplace transform has derivatives of all orders. \\ \noindent LT of $y'',~y'''...y^{(n)}$ and of $t^nf(t)$ in terms of derivative of Laplace transform of $f$. Then consider sin, cos, $t^n$, $t \cos$. \\ \noindent $y''-y=1$ with $y(0)=0$ and $y'(0)=1$.\\ \noindent $L[\int_a ^t f(x)dx] ~=~ \frac{1}{s} L[f] - \frac{1}{s} \int_0 ^a f(x)dx$. Do an example. \\ \noindent Shifting theorems and the Heaviside function. $L[e^{at}f(t)](s)=L[f](s-a)$ $L[f(t-a) step(t-a)]=e^{-as}L[f(t)]$ $L[f(t) step(t-a)]=e^{-as}L[f(t+a)]$. Find $L[e^{-2t} \cos(3t)]$ and $L^{-1}\frac{2s+3}{s^2 - 4s + 20}$ Work out examples 6.2.5 and 6.2.6. \\ \noindent Transform of a periodic function, square wave and driven LC circuit example. P. 318-320. \\ \noindent Define convolution $(f*g)(t)~=~ \int_0 ^t f(t-u)g(t)dt$. Properties: $f*g=g*f$; $(f*g)*h=f*(g*h)$ and $(f+g)*h=f*h+g*h$ \\ \noindent Convolution theorem $L^{-1}[FG]=f*g$ and $L[f*g]=FG$. Ex. 6.4.1 and 6.4.2.\\ \noindent Discuss Theorem 6.4.3. \\ \noindent Solving ODEs with impulse functions. The Dirac delta function. $L[\delta(t)]=1$. $L[\delta(t-u)]=e^{-us}$. Work out impulse in oscillating spring ex. 6.5.1. \section*{Systems of Linear ODEs} \noindent See if students have had or are taking Linear Alegebra. If not, just use Laplace Transform method \\ \section*{Series Solutions} \noindent Review convergence of Power series and interval of convergence. \\ \noindent Solve $y''+y=0$ with $y(0)=1,~~y'(0)=0$.\\ \noindent Singular points for $y''+P(x)y'+Q(x)y=0$. $P$ and $Q$ should be real analytic. \\ \noindent Expanding around $x=x_0 \ne 0$. \noindent Solve $y''-2xy'+2y=0$ and discuss interval of convergence.\\ \noindent The power series solution will converge at $x$ if $P$ and $Q$ have power series that converge on $(x_0,x)$.\\ \noindent Regular singular point: $p(x)=(x-x_0)P(x)$ and $q(x)=(x-x_0)^2Q(x)$ are real analytic. Ex. $y''-\frac{2}{x}y'+\frac{2}{x^2}y=0$. Ex. $y''+\frac{2}{x^3}y=0$. \\ \noindent Euler ODEs: $x^2y''+p_0xy'+q_0y=0$ let $y=x^r$. Consider the 3 cases: First $p_0=-2$, $q_0=2$. Then $p_0=0$ and $q_0=1/4$. Then $p_0=1-2 \alpha$ and $q_0= \alpha ^2 + 400$. \\ \noindent Frobenius method: solution near regular singular point. Let $y=x^r$ times a power series. Two roots that differ by a non-integer. $4xy''+2y'+y=0$. Problem in recursion relation when differ by integer.\\ \noindent If roots of indicial equation are equal, then $y_2=y_1 \ln |x| + |x|^{r_1} \Sigma_0 ^\infty c_n x^n$. Ex. $xy''+y'+2y=0$. \\ If roots of indicial equation differ by an integer, then $y_2= \alpha y_1 \ln |x| + |x|^{r_2} \left ( 1+ \Sigma_1 ^\infty d_n x^n \right )$. Ex. $xy''-y=0$. \\ \end{document}