Professional Documents
Culture Documents
Lecture 6
Approximate Methods of Solution
Graphical Solutions
The first order equation
x 0 = f (t, x)
gives the slope of the solution curve at the point (t, x). We can use this to
find an approximate graphical solution to the IVP
x 0 = f (t, x)
x(t0 ) = x0
An Example
The direction field below corresponds to the DE
x0 = t2 x2
Four solutions are shown corresponding to the initial conditions
x(0) = 3, x(0) = 1, x(0) = 0.5, x(0) = 1
Taylor Series
x(t0 ) = x0
This is enough information to calculate the Taylor series for x(t) about
t = t0 . Differentiating the DE with respect to t.
x 00 = ft + fx x 0 = ft + f fx
Example
Consider the IVP
x0 = t x2
x(0) = 1
We can use this to calculate the Taylor series for x(t) about t = 0.
Plugging into the DE immediately gives x 0 (0) = 1. Differentiating
x 00 = 1 2xx 0
x 00 (0) = 1 2(1)(1) = 3
Picard Iteration
The IVP
x 0 = f (t0 , x0 )
x(t0 ) = x0
x = x0 +
f (s, x(s)) ds
t0
The Picard scheme consists of substituting the initial condition into this,
integrating, then substituting the expression back into the equation,
continuing with this until your patience runs out.
Z t
x1 = x0 +
f (s, x0 ) ds
Z
t0
t
f (s, x1 (s)) ds
x2 = x0 +
t0
xn+1 = x0 +
f (s, xn (s)) ds
t0
Example
x0 = t x2
x(0) = 1
Z t
1
x1 = 1 +
f (s, 1) ds = 1 t + t 2
2
0
Z
x2 = 1 +
Z
f (s, x1 (s)) ds = 1 +
1 2 2
(s 1 s + s ) ) ds
2
3
1
1
1
= 1 t + t2 t3 + t4 t5
2
3
4
20
Z
x3 = 1 +
f (s, x2 (s)) ds
0
3
4
= 1 t + t2 t3
2
3
+a bunch more higher order terms
Linear Algebra and Differential EquationsLecture 6ApproximateJune
Methods
21, 2016
of Solution
7 / 18
x(t0 ) = x0
x(t) = x0 +
f (s, x(s)) ds
t0
tt0
N , tn
= t0 + nh
tn
Eulers method
Example
Again consider the IVP
x0 = t x2
x(0) = 1
The table below shows the Euler method with step size h = 1 to calculate
x(3) = 2.
t
0
1
2
3
x
1
0
1
2
f (t, x)
-1
1
1
x = hf
-1
1
1
x + x
0
1
2
h
xn+1 = xn + (f (tn , xn ) + f (tn + h, xn + hf (tn , xn )))
2
h
= xn+1 = xn + (f (tn , xn ) + f (tn , xn ) + h(ft (tn , xn ) + ffx (tn , xn )) + O
2
h2
= xn+1 = xn + hf (tn , xn ) + (ft (tn , xn ) + ffx (tn , xn )) + O(h3 )
2
2
h
= xn + hx 0 (tn , xn ) + x 00 (tn , xn ) + O(h3 )
2
Example
Yet again consider the IVP
x0 = t x2
x(0) = 1
The table below shows the modified Euler method with step size h = 1 to
calculate x(3) = 2.09375.
t
0
1
2
3
x
1
1
1.5
2.09375
f (t, x)
-1
0
-0.25
hf
-1
0
-0.25
x
0
1
1.25
f
1
1
1.4375
x + h(f + f)/2
1
1.5
2.09375
Example
For the IVP
x 0 = x + et
x(0) = 2