# 2250-4 12:55pm Lecture Record Week 3 S2010

Last Modified: January 31, 2010, 13:58 MST.    Today: September 24, 2018, 01:37 MDT.

## 26 Jan: Autonomous Differential Equations and Phase Diagrams. Sections 2.1, 2.2

```Review: Problem 1.5-34
The expected model is
x'=1/4-x/16,
x(0)=20,
using units of millions of cubic feet.
Model Derivation
Law:  x'=input rate - output rate.
Definition:  concentration == amt/volume.
Use of percentages
0.25% concentration means 0.25/100 concentration
```

html: Problem notes S2010 (4.4 K, html, 31 Jan 2010)
```Examples and Applications
Growth-Decay model y'=ky and its algebraic model y=y(0)exp(kx).
Pharmokinetics of drug transport [ibuprofen]
Pollution models.
Three lake pollution model [Erie, Huron, Ontario].
Brine tanks.
One-tank model.
Two-tank and three-tank models.
Recycled brine tanks and limits of chapter 1 methods.
Linear cascades and how to solve them.
Method 1: Linear integrating factor method.
Method 2: Superposition and equilibrium solutions for
constant-coefficient y'+py=q. Uses the shortcut for
homogeneous DE y'+py=0.
```
```Intro to Maple lab 1
Theory of equations review
Factor and root theorem,
division algorithm,
recovery of the quadratic from its roots.
```

Maple: Lab 1, Introduction (112.5 K, pdf, 01 Jan 2010)
```Lecture on 2.1, 2.2:
Theory of autonomous DE y'=f(y)
Picard's theorem and non-crossing of solutions.
Direction fields and translation of solutions
No direction field is needed to draw solution curves
Definition: phase line diagram, phase diagram,
Calculus tools: f'(x) pos/neg ==> increasing/decreasing
DE tools: solutions don't cross, tangent matching
Maple tools for production work.
Stability theory of autonomous DE y'=f(y)
Stability of equilibrium solutions.
Stable and unstable classification of equilibrium solutions.
funnel, spout, node,
How to construct Phase line diagrams
How to make a phase diagram graphic
Inventing a graph window
Invention of the grid points
Using the phase line diagram to make the graphic
calculus tools
DE tools
Partial fraction methods and solution formulas
```

## 26 Jan: Newton Kinematic Models. Projectiles. Problem. Section 2.3.

```Drill and Review
Phase diagram for y'=y(1-y)(2-y)
Phase line diagram
Labels: stable, unstable, funnel, spout, node
Partial fractions.
DEFINITION: partial fraction=constant/polynomial with exactly one root
THEOREM: P(x)/q(x) = a sum of partial fractions
Finding the coefficients.
Method of sampling
clear fractions, substitute samples, solve for A,B, ...
Method of atoms
clear fractions, multiply out and match powers, solve for A,B,...
Heaviside's cover-up method
partially clear fraction, substitute root, find one constant
Separation of variable solutions with partial fractions.
Exercise solutions to the four problems due in 2.1, 2.2.
Phase line diagrams.
Phase diagram.
```
```Newton's force and friction models
Isaac Newton ascent and descent kinematic models.
Free fall with no air resistance F=0.
Linear air resistance models F=kx'.
Non-linear air resistance models F=k|x'|^2.
```

The tennis ball problem. Does it take longer to rise or longer to fall?
Slides: Newton kinematics with air resistance. Projectiles. (109.3 K, pdf, 29 Aug 2009)
Jules Verne problem. A rocket from the earth to the moon.
Slides: Jules Verne Problem (91.9 K, pdf, 27 Jan 2010)
Reading assignment: proofs of 2.3 theorems in the textbook and derivation of details for the rise and fall equations with air resistance.
Problem notes for 2.3-10. 2.3-20 (1.8 K, txt, 24 Jan 2010)

## 27-28 Jan: Murphy and Cox

Exam 1 review, questions and examples on exam problems 1,2,3,4,5.
Exam 1 date is Feb 17, 2-4pm in WEB 104 or Feb 18, 6:50am in JTB 140.
Sample Exam: Exam 1 key from F2009. See also S2009, exam 1.
Answer Key: Exam 1, S2009, 7:30am (395.7 K, pdf, 02 Mar 2009)
Answer Key: Exam 1, S2009, 10:45am (310.2 K, pdf, 02 Mar 2009)
Answer Key: Exam 1, f2009, 7:30am (62.9 K, pdf, 30 Sep 2009)
Answer Key: Exam 1, f2009, 12:25pm (339.3 K, pdf, 11 Oct 2009)
Lecture on midterm 1 problems 4,5. Lecture on 2.2-10,18.
Maple Lab 2, problem 1 details [maple L2.1].

## 28 Jan: Jules Verne Problem. Numerical Solutions for y'=F(x)

Jules Verne problem. A rocket from the earth to the moon.
Slides: Jules Verne Problem (91.9 K, pdf, 27 Jan 2010)
```Numerical Solution of y'=F(x)
Example: y'=x+1, y(0)=1
Symbolic solution y=0.5 x^2 + x + 1.
Dot table. Connect the dots graphic.
How to draw a graphic without knowing the solution equation for y.
Making the dot table by approximation of the integral of F(x).
Rectangular rule.
Dot table steps for h=0.1.
Answers: (x,y) = (0,1), (0.1,1.1), (0.2,1.21).
Maple support for making a connect-the-dots graphic.
Next week: Maple sessions with Rect, Trap, Simp rules: online code.
```
```Numerical Solution of y'=f(x,y)
Two problems will be studied, in maple labs 3, 4.
First problem
y' = -2xy, y(0)=2
Symbolic solution y = 2 exp(-x^2)
Second problem
y' = (1/2)(y-1)^2, y(0)=2
Symbolic solution y = (x-4)/(x-2)
The work begins in exam review problems ER-1, ER-2, both due
before the first midterm exam. The maple numerical work is due
much later, after Spring Break.
Exam Review: Problems ER-1, ER-2 (46.9 K, pdf, 01 Jan 2010)```
```Rect, Trap, Simp rules from calculus
Introduction to the Euler, Heun, RK4 rules from this course.
Example: y'=3x^2-1, y(0)=2 with solution y=x^3-x+2.
Example: y'=2x+1, y(0)=3 with solution y=x^2+x+3.
Dot tables,  connect the dots graphic.
How to draw a graphic without knowing the solution equation for y.
Key example y'=sqrt(x)exp(x^2), y(0)=2.
Challenge: Can you integrate sqrt(x) exp(x^2)?
Making the dot table by approximation of the integral of F(x).
Rect, Trap, Simp rules and their accuracy of 1,2,4 digits resp.
```
```Example for your study:
Problem:  y'=x+1, y(0)=1
It has a dot table with x=0, 0.25, 0.5, 0.75, 1 and
y= 1, 1.25, 1.5625, 1.9375, 2.375.
The exact solution y = 0.5(1+(x+1)^2) has values
y=1, 1.28125, 1.625, 2.03125, 2.5000.
Determine how the dot table was constructed and identify
which rule, either Rect, Trap, or Simp, was applied.
```
Introduction: Maple Labs 3 and 4, due after Spring Break.
Maple lab 3 S2010. Numerical DE (82.5 K, pdf, 01 Jan 2010)
Maple lab 4 S2010. Numerical DE (78.9 K, pdf, 01 Jan 2010)

The work for book sections 2.4, 2.5, 2.6 is in maple lab 3 and maple lab 4.
The numerical work using Euler, Heun, RK4 appears in L3.1, L3.2, L3.3.
The actual symbolic solution derivation and answer check were submitted as Exam Review ER-1. Confused? Follow the details in the next link, which duplicates what was done in ER-1.
Sample symbolic solution report for 2.4-3 (22.6 K, pdf, 19 Sep 2006)
Confused about what to put in your L3.1 report? Do the same as what appears in the sample report for 2.4-3 (link below). Include the hand answer check. Include the maple code appendix. Then fill in the table in maple Lab 3, by hand. The example shows a hand answer check and the maple code appendix.

Sample Report for 2.4-3 (0.0 K, pdf, 31 Dec 1969)
Download all .mws maple worksheets to disk, then run the worksheet in xmaple.
In Mozilla firefox, save to disk using right-mouseclick and then "Save link as...". Some browsers require SHIFT and then mouse-click. Open the saved file in xmaple or maple.
Extension .mws [or .mpl] allows interchange between different versions of maple. Mouse copies of the worksheet pasted into email allow easy transfer of code between versions of maple.

## 28 Jan: Numerical Solutions for y'=f(x,y)

```Euler, Heun, RK4 algorithms
Computer implementation in maple
Geometric and algebraic ideas in the derivations.
Numerical Integration   Numerical Solutions of DE
RECT                    Euler
TRAP                    Heun [modified Euler]
SIMP                    Runge-Kutta 4 [RK4]

Numerical work maple L3.1, L3.2, L3.3, L4.1, L4.2, L4.3 will be
submitted after Spring Break. No numerical problems from ch 2
are assigned.
All discussion of maple programs will be based in the TA session
[Cox and Murphy].
There will be one additional presentation of maple lab details
in the main lecture. The examples used in maple labs 3, 4 are
the same as those in exam review problems ER-1, ER-2. Each has
form dy/dx=f(x,y) and requires a non-quadrature algorithm, e.g.,
Euler, Heun, RK4.
```
Second lecture on numerical methods. Postponed to Week 4.
```Examples
Web references contain two kinds of examples.
The first three are quadrature problems dy/dx=F(x).
The fourth is of the form dy/dx=f(x,y), which requires a
non-quadrature algorithm like Euler, Heun, RK4.

y'=3x^2-1, y(0)=2, solution y=x^3-x+2
y'=exp(x^2), y(0)=2, solution y=2+int(exp(t^2),t=0..x).
y'=2x+1, y(0)=3 with solution y=x^2+x+3.
y'=1-x-y, y(0)=3, solution y=2-x+exp(-x).
```