CoCalc Shared Fileslatex-tests / long-presentation.tex
Author: Harald Schilly
1\documentclass{beamer}
2
3\mode<presentation> {
5   \setbeamercolor*{palette primary}{use=structure,fg=white,bg=mycolor1}
6  \setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=mycolor3}
7  \setbeamercolor*{palette secondary}{use=structure,fg=white,bg=mycolor2}
8  \setbeamercolor{item projected}{bg=mycolor1}
10  \setbeamercolor{block title}{fg=white,bg=mycolor1}%
11  \setbeamercolor{block body}{fg=black,bg=mycolor4}%
12}{}
13%  \setbeamercolor{itemize item}{fg=mycolor1}
14%  \setbeamercolor{enumerate item}{fg=mycolor1}
15%\setbeamercovered{transparent}
16}
17%  \setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=green}
18\definecolor{mycolor1}{RGB}{51, 0, 102}
19\definecolor{mycolor2}{RGB}{51, 0, 90}
20\definecolor{mycolor3}{RGB}{51, 0, 80}
21\definecolor{mycolor4}{RGB}{255,250,250}%{127,255,212}
22
23\usepackage{amsmath,amssymb,comment}
24\usepackage{amsfonts}
25\usepackage{makeidx}
26\usepackage{xcolor}
27\usepackage{epsfig}
28\usepackage{mathrsfs}
29% \documentclass{article}
30\newcommand{\bigo}[1]{O\left( #1 \right) }
31\newtheorem{conjecture}{Conjecture}
32\newtheorem{mydef}{Definition}
33\newtheorem{thm}{Theorem}
34\newtheorem{cor}{Corollary}
35\newcommand{\nnn}{\nonumber}
36\newcommand{\OO}{\mathcal{O}}
37\newcommand{\vv}{\textbf{v}}
38\newcommand{\x}{\textbf{x}}
39\newcommand{\xx}{\boldsymbol{\xi}}
40\newcommand{\w}{\textbf{w}}
41\def\l{\left}
42\def\r{\right}
43\renewcommand{\b}{\vec{b}}
44\renewcommand{\v}{\vec{v}}
45\newcommand{\f}{\textbf{f}}
46
47\title[Perturbation Theory]{Introduction to Ordinary Differential Equations}
48\author[Emily Weymier]{Emily Weymier}
49\institute[SFA]{\begin{tabular}{l} Department of Mathematics $\&$ Statistics \\Stephen F. Austin State University, Nacogdoches, TX
50\end{tabular}}
51\date{September 22, 2017}
52
53\begin{document}
54
55\frame{\titlepage}
56
57\begin{frame}{Outline}
58\begin{enumerate}
59\item What is a differential equation? \vfill
60\item Initial Value Problems %\vfill
61\begin{itemize}
62    \item Linear first order differential equations
63    \item Second order differential equations
64    \item Recasting high order differential equations as a system of first order differential equations
65    \end{itemize} \vfill
66\item Boundary Value Problems \vfill
67\item Solution techniques for nonlinear differential equations %\vfill
68    \begin{itemize}
69    \item Power series solutions
70    \item Perturbation theory concept
71    \end{itemize} \vfill
72\item Concluding Remarks \vfill
73\end{enumerate}
74\end{frame}
75
76\section{What is a differential equation?}
77
78\begin{frame}{Differential Equations: The Basics}
79\begin{itemize}
80\item Ordinary differential equations are used to model change over an independent variable (for our purposes it will usually be $t$ for time) without using partial derivatives. \pause
81\vfill
82\item Differential equations contain three types of variables: an independent variable, at least one dependent variable (these will be functions of the independent variable), and the parameters.\pause
83\vfill
84\item ODE's can contain multiple iterations of derivatives. They are named accordingly (i.e. if there are only first derivatives, then the ODE is called a first order ODE).\pause
85\vfill
86%\item
87%\vfill
88\end{itemize}
89\end{frame}
90
91\begin{frame}{A Simple Example: Population Modeling}
92
93Population growth is commonly modeled with differential equations. In the following equation: $t=$ time, $P=$ population and $k=$ proportionality constant. $k$ represents the constant ratio between the growth rate of the population and the size of the population.
94\begin{eqnarray*}
95\frac{dP}{dt} = kP
96\end{eqnarray*}
97
98In this particular equation, the left hand side represents the growth rate of the population being proportional to the size of the population $P$. This is a very simple example of a first order, ordinary differential equation. The equation only contains first order derivatives and there are no partial derivatives. %I think it is slipping my mind right now, but is there a word for non partial derivatives? That is probably a stupid question but I am blanking on it right now.
99\end{frame}
100
101
102
103\section{Initial Value Problems}
104
105\begin{frame}{Initial Value Problems}
106
107An initial value problem consists of a differential equation and an initial condition. So, going back to the population example, the following is an example of an initial value problem:
108
109\begin{eqnarray*}
110\frac{dP}{dt} = kP, P(0)=P_0
111\end{eqnarray*}
112
113The solution to this set of equations is a function, call it $P(t)$, that satisfies both equations.
114
115\end{frame}
116
117\begin{frame} {Linear First Order Differential Equations}
118\begin{itemize}
119
120\item The standard form for a first-order differential equation is
121\begin{eqnarray*}
122\frac{dy}{dt} = f(t,y)
123\end{eqnarray*}
124where the right hand side represents the function $f$ that depends on the independent variable, $t$, and the dependent variable, $y$.
125
126\end{itemize}
127\end{frame}
128
129
130
131\begin{frame}{General Solutions to a Differential Equation}
132
133Let's look at a simple example and walk through the steps of finding a general solution to the following equation
134\begin{eqnarray*}
135\frac{dy}{dt} = (ty)^2
136\end{eqnarray*}
137\vfill
138We will simply "separate" {\color{red}write as separate''} the variables then integrate the both sides of the equation to find the general solution.
139
140\begin{eqnarray*}
141\frac{dy}{dt} &=& t^2 y^2
142\\ \frac{1}{y^2} \,dy &=& t^2 \, dt
143\\ \int \frac{1}{y^2} \,dy &=& \int t^2 \, dt
144\end{eqnarray*}
145
146\end{frame}
147
148\begin{frame}
149
150\begin{eqnarray*}
151\\ - y^{-1} &=& \frac{t^3}{3} + c
152\\ -\frac{1}{y} &=& \frac{t^3}{3} + c
153\\ y &=& -\frac{1}{\frac{t^3}{3} + c}
154\\ \Rightarrow y(t) &=& -\frac{3}{t^3 + c_1}
155\end{eqnarray*}
156where $c_1$ is any real number.
157\end{frame}
158
159\section{Solving Initial Value Problems}
160
161\begin{frame}{Linear First Order Differential Equations}
162
163Initial value problems consist of a differential equation and an initial value. We will work through the example below:
164
165\begin{eqnarray*}
166\frac{dx}{dt} = -xt;~~~~~ x(0) = \frac{1}{\sqrt{\pi}}
167\end{eqnarray*}
168
169First we will need to find the general solution to $\frac{dx}{dt} = -xt$, then use the initial value $x(0)=\frac{1}{\sqrt{\pi}}$ to solve for $c$. Since we do not know what $x(t)$ is, we will need to "separate" the equation before integrating.
170\begin{eqnarray*}
171\frac{dx}{dt} &=& -x t
172\\ -\frac{1}{x} \,dx &=& t \,dt % "separate" the variables
173\\ \int -\frac{1}{x} \,dx &=& \int t \,dt % integrate both sides with respect to the appropriate variable
174\end{eqnarray*}
175
176\end{frame}
177
178
179
180\begin{frame}{Linear First Order Differential Equations Continued}
181\begin{eqnarray*}
182-\ln{x} &=& \frac{t^2}{2} + c
183\\ x &=& e^{-(\frac{t^2}{2} + c)}
184\\ x &=& e^{-(\frac{t^2}{2})} e^{-c}
185\\ x &=& k e^{-\frac{t^2}{2}}
186\end{eqnarray*}
187
188The above function of $t$ is the general solution to $\frac{dx}{dt} = -xt$ where $k$ is some constant. Since we have the initial value $x(0) = \frac{1}{\sqrt{\pi}}$, we can solve for $k$.
189\end{frame}
190
191\begin{frame}{Solving Initial Value Problems}
192
193Thus we can see that the solution to the initial value problem
194\begin{eqnarray*}
195\frac{dx}{dt} = -xt; x(0) = \frac{1}{\sqrt{\pi}}
196\end{eqnarray*}
197is
198
199$$x(0) = \frac{1}{\sqrt{\pi}} = k e^{-\frac{0^2}{2}}$$
200
201$$x(t) = \frac{1}{\sqrt{\pi}} \, e^{-\frac{t^2}{2}}$$ %is this even right? OK I think I got it this time.
202
203\end{frame}
204
205\begin{frame}
206
207Let's verify that this solution is correct. We will need to show
208\begin{eqnarray*}
209\frac{dx}{dt} &=& x'(t) = f(t, x(t)) %I don't feel like this is the correct notation.??
210\\\frac{dx}{dt} &=& \frac{d}{dt}\bigg(\frac{1}{\sqrt{\pi}} e^{-\frac{t^2}{2}} \bigg) = \frac{1}{\sqrt{\pi}} e^{-\frac{t^2}{2}}
211\\ &\Rightarrow& \frac{d}{dt}\bigg(\frac{1}{\sqrt{\pi}} e^{-\frac{t^2}{2}} \bigg) = -\frac{1}{\sqrt{\pi}} e^{-\frac{t^2}{2}}
212\end{eqnarray*}
213
214\end{frame}
215
216
217\begin{frame}{Second Order Differential Equations}
218Second order differential equations simply have a second derivative of the dependent variable. The following is a common example that models a simple harmonic oscillator:
219
220\begin{eqnarray*}
221\frac{d^2y}{dt^2} + \frac{k}{m} y = 0
222\end{eqnarray*}
223where $m$ and $k$ are determined by the mass and spring involved. This second order differential equation can be rewritten as the following first order differential equation:
224
225\begin{eqnarray*}
226\frac{dv}{dt} = -\frac{k}{m} y
227\end{eqnarray*}
228where $v$ denotes velocity.
229\end{frame}
230
231\begin{frame}{Second Order Differential Equations Continued}
232
233Referring back to some calculus knowledge, if $v(t)$ is velocity, then $v=\frac{dy}{dt}$. Thus, we can substitute in $\frac{dv}{dt}$ into our second order differential equation and essentially turn it into a first order differential equation.
234
235\begin{eqnarray*}
236\frac{d^2y}{dt^2} = -\frac{k}{m} y \Leftrightarrow \frac{dv}{dt} = -\frac{k}{m} y
237\end{eqnarray*}
238
239Now we have the following system of first order differential equations to describe the original second order differential equation:
240
241\begin{eqnarray*}
242\frac{dy}{dt} &=& v
243\\ \frac{dv}{dt} &=& -\frac{k}{m} y
244\end{eqnarray*}
245\end{frame}
246
247\begin{frame}{Second Order Differential Equations Continued}
248Consider the following initial value problem:
249
250$$\frac{d^2y}{dt^2} + y = 0$$
251
252with $y(0) = 0$ and $y'(0) = v(0) = 1$. Let's show that $y(t) = \sin(t)$ is a solution. Let $v=\frac{dy}{dt}$, then we have the following system:
253
254\begin{eqnarray*}
255\frac{dy}{dt} &=& v
256\\ \frac{dv}{dt} &=& -y
257\end{eqnarray*}
258
259\end{frame}
260
261
262
263\begin{frame}{Second Order Differential Equations Continued}
264
265\begin{eqnarray*}
266\frac{dy}{dt} &=& \frac{d}{dt} \sin(t) = \cos(t) = v
267\\ \frac{dv}{dt} &=& -\sin(t) = -y
268\\ \Rightarrow \frac{d^2y}{dt^2} &=& -\sin(t)
269\\ \Rightarrow \frac{d^2y}{dt^2} + y &=& \frac{d^2 (\sin(t))}{dt^2} + \sin(t)
270\\ &=& -\sin(t) + \sin(t) = 0
271\end{eqnarray*}
272
273\end{frame}
274
275
276
277\begin{frame}{High Order Differential Equations as a System}
278
279
280
281\end{frame}
282
283\section{Boundary Value Problems}
284
285\begin{frame}{Boundary Value Problems: The Basics}
286
287\end{frame}
288
289\section{Solution Techniques for Nonlinear Differential Equations}
290\begin{frame}{Power Series Solutions}
291To demonstrate how to use power series to solve a nonlinear differential equation we will look at Hermite's Equation:
292
293\begin{eqnarray*}
294\frac{d^2y}{dt^2} - 2t \frac{dy}{dt} + 2 py = 0
295\end{eqnarray*}
296We will use the following power series and its first and second derivatives to make a guess:
297
298\begin{eqnarray}
299\label{function} y(t) &=& a_0 + a_1 t + a_2 t^2 + a_3 t^3 + ... = \sum_{n=0}^{\infty} a_n t^n
300\\ \label{der} \frac{dy}{dt} &=& a_1 + 2a_2 t + 3a_3 t^2 + 4a_4 t^3 + ... = \sum_{n=1}^{\infty} n a_n t^{n-1}
301\\ \label{der2} \frac{d^2y}{dt^2} &=& 2 a_2 + 6 a_3 t + 12 a_4 t^2 + ... = \sum_{n=2}^{\infty} n(n-1) a_n t^{n-2}
302\end{eqnarray}
303
304\end{frame}
305
306
307\begin{frame}
308
309From the previous equations we can conclude that
310
311\begin{eqnarray*}
312y(0) &=& a_0
313\\ y'(0) &=& a_1
314\end{eqnarray*}
315
316Next we will substitute (\ref{function}), (\ref{der}) and (\ref{der2}) into Hermite's Equation and collect like terms.
317
318\begin{eqnarray*}
319\frac{d^2y}{dt^2} - 2t \frac{dy}{dt} + 2 py = 0 = (2 a_2 + 6 a_3 t + 12 a_4 t^2 + ...)
320\\  - 2t (a_1 + 2a_2 t + 3a_3 t^2 + 4a_4 t^3 + ...)
321\\  +2p (a_0 + a_1 t + a_2 t^2 + a_3 t^3 + ...)
322\\ \Rightarrow (2pa_0 + 2a_2) + (2pa_1 - 2a_1 + 6a_3)t +
323\\ (2pa_2 - 4a_2 + 12a_4)t^2 + (2pa_3 - 6a_3 + 20a_5)t^3 = 0
324\end{eqnarray*}
325
326\end{frame}
327
328
329
330\begin{frame}
331Then from here, we will set all coefficients equal to $0$ since the equation is equal to $0$ and $t \neq 0$. %is that true?
332We get the following sequence of equations:
333
334\begin{eqnarray*}
3352pa_0 + 2a_2 &=& 0
336\\ 2pa_1 - 2a_1 + 6a_3 &=& 0
337\\ 2pa_2 - 4a_2 + 12a_4 &=& 0
338\\ 2pa_3 - 6a_3 + 20a_5 &=& 0
339\end{eqnarray*}
340
341\end{frame}
342
343
344
345\begin{frame}
346
347Then will several substitutions we arrive at the following set of equations:
348
349\begin{eqnarray*}
350\\ \Rightarrow a_2 &=& -pa_0
351\\ a_3 &=& - \frac{p-1}{3} a_1
352\\ a_4 &=& -\frac{p-2}{6} a_2 = \frac{(p-2)p}{6} a_0
353\\ a_5 &=& -\frac{p-3}{10} a_3 = \frac{(p-3)(p-1)}{30} a_1
354\end{eqnarray*}
355
356\end{frame}
357
358
359
360
361\begin{frame}{Perturbation Theory Concept}
362Perturbation theory is used when a mathematical equation involves a small perturbation, usually $\epsilon$. From here we create $y(x)$ such that it is an expansion in terms of $\epsilon$. For example
363\begin{eqnarray*}
364y(x) = y_0(x) + \epsilon y_1(x) + \epsilon^2 y_2(x)+\cdots
365\end{eqnarray*}
366This summation is called a perturbation series and it has a nice feature that allows each $y_i$ to be solved using the previous $y_i$'s.
367Consider the equation,
368\begin{eqnarray}
369\label{ex1} x^2+x+6\epsilon &=& 0, \hspace{.5cm} \epsilon \ll 1
370\end{eqnarray}
371
372\noindent Let's consider using perturbation theory to determine approximations for the roots of Equation (\ref{ex1}).
373
374
375\end{frame}
376
377
378\begin{frame}{Perturbation Theory Concept Continued}
379
380Notice this equation is a perturbation of $x^2+x=0$. Let $x(\epsilon) = \sum_{n=0}^{\infty} a_n \epsilon^n$. This series will be substituted into (\ref{ex1}) and powers of $\epsilon$ will be collected. %We wish for the equation to be true for any $\epsilon \ll 1$.
381Next we will calculate the first term of the series by setting $\epsilon =0$ in (\ref{ex1}). So the leading order equation is
382
383\begin{eqnarray}
384\label{LOE} a_0^2 + a_0 = 0
385\end{eqnarray}
386
387\noindent with solutions $x = -1, 0$. Thus $x(0) = a_0 = -1, 0$.
388Now the perturbation series are as follows
389
390\begin{eqnarray}
391&=& 1 - a_1 \epsilon - a_2 \epsilon^2 - a_1 \epsilon + a_1^2 \epsilon^2 + a_1 a_2 \epsilon^3 - a_2 \epsilon^2 + a_1 a_2 \epsilon^3 + a_2^2 \epsilon^4 - 1 + a_1 \epsilon + a_2 \epsilon^2 + 6 \epsilon
392%\\ = 1 - 2 a_1 \epsilon - 2 a_2 \epsilon^2 + a_1^2 \epsilon^2 + 2 a_1 a_2 \epsilon^3 + a_2^2 \epsilon^4 - 1 + a_1 \epsilon + a_2 \epsilon^2 + 6 \epsilon %combining like terms
393\\ &=& (1-1) + (-2 a_1 + a_1 + 6)\epsilon + (-2 a_2 + a_1^2 +a_2)\epsilon^2 + \mathcal{O}(\epsilon^3) %factoring out epsilons.
394\end{eqnarray}
395
396\end{frame}
397
398
399
400\begin{frame}{Perturbation Theory Concept Continued}
401
402\begin{eqnarray}
403\\\label{root1} x_1(\epsilon) = -1 + a_1 \epsilon + a_2 \epsilon^2 + \mathcal{O}(\epsilon^3)
404\end{eqnarray}
405and
406\begin{eqnarray}
407\label{root2} x_2(\epsilon) &=& 0 + b_1 \epsilon + b_2 \epsilon^2 + \mathcal{O}(\epsilon^3)
408\end{eqnarray}
409
410Next, we will substitute in (\ref{root1}) into (\ref{ex1}) while ignoring powers of $\epsilon$ greater than $2$. Since we are only approximating the solution to the second-order, we can disregard the powers of $\epsilon$ greater than $2$.
411
412\begin{align*}
413x^2 + x + 6 \epsilon &= (-1 + a_1 \epsilon + a_2 \epsilon^2)^2 + (-1 + a_1 \epsilon + a_2 \epsilon^2) + 6 \epsilon
414\\ &\Rightarrow (- a_1 + 6)\epsilon + (- a_2 + a_1^2)\epsilon^2 + \mathcal{O}(\epsilon^3)
415\end{align*}
416
417\end{frame}
418
419
420\begin{frame}{Perturbation Theory Concept Continued}
421
422From here we take the coefficient of each power of $\epsilon$ and set it equal to zero. This step is justified because (\ref{ex1}) is equal to zero and $\epsilon \neq 0$ so each coefficient must be equal to zero. Thus we have the following equations
423\begin{align*}
424\mathcal{O}(\epsilon^1) &: -a_1 + 6 = 0
425\\ \mathcal{O}(\epsilon^2) &: a_1^2 - a_2 = 0
426\end{align*}
427These equations will be solved sequentially. The results are $a_1 = 6$ and $a_2 = 36$. Thus the perturbation expansion for the root $x_1 = -1$ is:
428
429$$x_1(\epsilon) = -1 + 6 \epsilon + 36 \epsilon^2 + \mathcal{O}(\epsilon^3)$$
430
431
432
433The same process can be repeated for $x_2$ with the perturbation expansion for the root $x_2 = 0$ resulting in
434
435$$x_2(\epsilon) = -6 \epsilon - 36 \epsilon^2 + \mathcal{O}(\epsilon^3)$$
436\end{frame}
437
438
439%Here's the tex and work for the above:
440
441%Now, we will plug equation (\ref{root2}) into (\ref{ex1}) while disregarding powers of $\epsilon$ greater than $2$. This will create the perturbation expansion for the root $x_2 = 0$.
442
443%\begin{align*}
444%x^2 + x + 6 \epsilon &= (0 + b_1 \epsilon + b_2 \epsilon^2)^2 + (0 + b_1 \epsilon + b_2 \epsilon^2) + 6 \epsilon
445% &= b_1^2 \epsilon^2 + 2 b_1 b_2 \epsilon^3 + b_2^2 \epsilon^4 + b_1 \epsilon + b_2 \epsilon^2 + 6 \epsilon
446%\\ &= (b_1 + 6) \epsilon + (b_1^2 + b_2) \epsilon^2 + \mathcal{O}(\epsilon^3)
447%\end{align*}
448%From here we take the coefficient of each power of $\epsilon$ and set it equal to zero. This step is justified because (\ref{ex1}) is equal to zero and $\epsilon \neq 0$ so each coefficient must be equal to zero. Thus we have the following equations
449
450%\begin{align*}
451%\mathcal{O}(\epsilon^1) &: b_1 + 6 = 0
452%\\ \mathcal{O}(\epsilon^2) &: b_1^2 + b_2 = 0
453%\end{align*}
454
455%These equations will be solved sequentially. The results are
456
457%\begin{align*}
458%b_1 &= -6
459%\\ b_1^2 + b_2 &= 0
460%\\ (-6)^2 + b_2 &= 0
461%\\ b_2 &= -36
462%\end{align*}
463
464%Thus the perturbation expansion for the root $x_2 = 0$ is
465
466%$$x_2(\epsilon) = -6 \epsilon - 36 \epsilon^2 + \mathcal{O}(\epsilon^3)$$
467
468
469
470
471
472%\begin{frame}{Numerical Experiments}
473%\begin{itemize}
474%\item Example 1 - Test convergence rate, computational efficiency, and accuracy with known exact solution\vfill\pause
475%\item Example 2 - Test convergence rate, computational efficiency, and accuracy with nonlinear model\vfill\pause
476%\item Example 3 - convergence rate, computational efficiency of three-species model\vfill
477%\end{itemize}
478%\end{frame}
479
480
481
482\begin{frame}{Concluding Remarks}
483
484
485\end{frame}
486
487%\begin{frame}{Efficiency}
488%\begin{minipage}{1.0\textwidth}
489%\begin{figure}[h]
490%\begin{center}
491%\includegraphics[scale=.3]{Example1CompTime.pdf}
492%\caption{A log-log plot of the computational time, in seconds, versus $N$ after $1000$ iterations.  The temporal step is held constant, $\tau = 10^{-6}$, while $h=1/(N-1)$.  A linear least squares approximates the slope of the line to be $1.654628$. This indicates that the computational time is scales as $N^{1.654628}$.  The computational time of an efficient scheme should scale no slower than $N^2$.  This indicates that the proposed nonlinear splitting scheme is highly efficient.}
493%\end{center}
494%\end{figure}
495%\end{minipage}
496%\begin{minipage}{1.0\textwidth}
497%\begin{itemize}
498%\item Let $\tau = 10^{-6}$ and consider the computational time for $1000$ temporal steps for $N=21,~31, \ldots, 401$.\vfill\pause
499%\item The computational time scales as $N^{1.654628}$\vfill
500%\end{itemize}
501%\end{minipage}
502%\end{frame}
503
504%\begin{frame}{Example 2 - Invasive Species Model}
505
506%\end{frame}
507
508%\begin{frame}{Nonlinear Splitting Algorithm}
509
510%\end{frame}
511
512%\begin{frame}{All in the details}
513
514
515%\end{frame}
516
517%\begin{frame}{Concluding Remarks}
518
519%\begin{itemize}
520%\item In summary:
521%   \begin{enumerate}
522%    \item \textbf{Positivity} of numerical solution guaranteed.
523%    \vfill
524%    \item \textbf{Nonlinear} stability and convergence were shown.
525%    \vfill
526%    \item \textbf{Computationally efficient} design $\rightarrow$ Computational Time scales less than $N^2$.
527%    \end{enumerate}
528%    \vfill
529%\end{itemize}
530%\end{frame}
531
532\begin{frame}{Questions?}
533
534
535\end{frame}
536
537\end{document}
538
539