This action might not be possible to undo. Are you sure you want to continue?
PerOlof Persson
persson@berkeley.edu
Department of Mathematics
University of California, Berkeley
Math 228A Numerical Solutions of Diﬀerential Equations
Reduction to First Order and Autonomous Systems
Consider the initial value problem
u
= f(u, t), u(t
0
) = u
0
In general,
u : [t
0
, t
0
+ a] → R
n
,
f : R
n
×[t
0
, t
0
+ a] → R
n
An mth order system of s equations can be reduced to a system of
ms ﬁrst order equations, by introducing new variables
v
1
= u
, v
2
= u
, . . . , v
m−1
= u
(m−1)
.
The explicit timedependency can be removed by introducing a
new variable w = t with the trivial equation w
= 1, to obtain a
new autonomous system of equations
[u, w]
= [f(u, w), 1], [u, w](t
0
) = [u
0
, t
0
]
Linear ODEs
A linear system of ODEs has the form
u
= A(t)u + g(t), A(t) ∈ R
s×s
, g(t) ∈ R
s
If A does not depend on t, the system is a constant coeﬃcient
linear system
u
= Au + g(t)
for a constant matrix A ∈ R
s×s
. For g(t) = 0 the equation is
homogeneous with solution u(t) = e
A(t−t
0
)
u
0
where the matrix
exponential for diagonalizable A = V ΛV
−1
is
e
At
= V e
Λt
V
−1
, e
Λt
=
_
¸
¸
¸
_
e
λ
1
t
0 · · · 0
0 e
λ
2
t
· · · 0
.
.
.
.
.
.
.
.
.
0 0 · · · e
λ
s
t
_
¸
¸
¸
_
Duhamel’s Principle
For general constant coeﬃcient linear systems u
= Au + g(t), the
solution is given by Duhamel’s principle
u(t) = e
A(t−t
0
)
u
0
+
_
t
t
0
e
A(t−τ)
g(τ) dτ
This is similar to the concept of Green’s functions for boundary
value problems – The eﬀect at time t of g(τ) at time τ is
e
A(t−τ)
g(τ).
Lipschitz Condition
Deﬁnition
A function f(u, t) is said to be Lipschitz continuous in a region S if
there exists a Lipschitz constant λ ≥ 0 such that
f(x, t) −f(y, t) ≤ λx −y, x, y ∈ S
If f is smoothly diﬀerentiable in S we may set
λ = max
(x,t)∈S
_
_
_
_
∂f(x, t)
∂x
_
_
_
_
Deﬁnition
Commonly used vector norms
x
1
=
m
i=1
x
i
 , x
2
=
_
m
i=1
x
i

2
_
1/2
, x
∞
= max
1≤i≤m
x
i

WellPosedness
Deﬁnition
The initialvalue problem
u
= f(u, t), t
0
≤ t ≤ t
0
+ a, u(t
0
) = u
0
is said to be a wellposed problem if:
A unique solution, u(t), to the problem exists, and
There exist constants ε
0
> 0 and k > 0 such that for any ε,
with ε
0
> ε > 0, whenever δ(t) is continuous with δ(t) < ε
for all t in [a, b], and when δ
0
< ε, the initialvalue problem
z
= f(z, t) + δ(t), t
0
≤ t ≤ t
0
+ a, z(t
0
) = u
0
+ δ
0
,
has a unique solution z(t) that satisﬁes
z(t) −u(t) < kε for all t in [t
0
, t
0
+ a].
Existence and Uniqueness
Theorem
Suppose f(u, t) is continuous in u, t on the cylinder
S = {(u, t) : u ∈ R
d
, u −u
0
≤ b, t ∈ [t
0
, t
0
+ a]}
with a, b > 0 and · a given vector norm. Then the IVP
u
= f(u, t), u(t
0
) = u
0
(1)
has at least one solution for t
0
≤ t ≤ t
0
+ α, where
α = min
_
a,
b
µ
_
, µ = sup
(u,t)∈S
f(u, t)
Existence and Uniqueness
Theorem (PicardLindel¨of)
Subject to both continuity and Lipschitz continuity of f in S, (1)
has a unique solution in [t
0
, t
0
+ α] and is wellposed.
Theorem
If f is C
r
for some r ≥ 1, the solution u(u
0
, t) is also C
r
as a
function of t and the initial condition u
0
.
Basic Schemes for IVPs
Consider the initial value problem
u
= f(t, u), 0 ≤ t ≤ T, u(0) = u
0
Distribute mesh points equally throughout [0, T]:
t
n
= nh, for each n = 0, 1, 2, . . . , N
The step size h = T/N = t
n+1
−t
n
Standard OneStep Methods
Forward Euler
u
n+1
= u
n
+ hf(t
n
, u
n
)
with error bound at time t
n
= nh ≤ T
u
n
−u(t
n
) ≤ e
LT
u
0
−u(0) +
e
LT
−1
2L
Mh
where L is a Lipschitz constant for f and M ≥ u
.
Backward Euler
u
n+1
= u
n
+ hf(t
n+1
, u
n+1
)
Taylor series method of order k
u
n+1
= u
n
+ hf(t
n
, u
n
) +
h
2
2
f
(t
n
, u
n
) +· · · +
h
k
k!
f
(k−1)
(t
n
, u
n
)
Multistep Methods
Deﬁnition
An mstep multistep method for solving the initialvalue problem
u
= f(t, u), 0 ≤ t ≤ T, u(0) = u
0
,
has a diﬀerence equation for approximating u
n+1
:
u
n+1
= a
m−1
u
n
+ a
m−2
u
n−1
+· · · + a
0
u
n+1−m
+ h[b
m
f(t
n+1
, u
n+1
) + b
m−1
f(t
n
, u
n
) +· · ·
+ b
0
f(t
n+1−m
, u
n+1−m
)],
Explicit method if b
m
= 0, implicit method if b
m
= 0.
Multistep Methods
FourthOrder AdamsBashforth Technique
u
n+1
= u
n
+
h
24
[55f(t
n
, u
n
) −59f(t
n−1
, u
n−1
)
+ 37f(t
n−2
, u
n−2
) −9f(t
n−3
, u
n−3
)]
FourthOrder AdamsMoulton Technique
u
n+1
= u
n
+
h
24
[9f(t
n+1
, u
n+1
) + 19f(t
n
, u
n
)
−5f(t
n−1
, u
n−1
) + f(t
n−2
, u
n−2
)]
RungeKutta Methods
RungeKutta Order Four
k
1
= f(t
n
, u
n
)
k
2
= f
_
t
n
+
h
2
, u
n
+
h
2
k
1
_
k
3
= f
_
t
n
+
h
2
, u
n
+
h
2
k
2
_
k
4
= f(t
n
+ h, u
n
+ hk
3
)
u
n+1
= u
n
+
h
6
(k
1
+ 2k
2
+ 2k
3
+ k
4
)
RungeKutta Methods
General form of RungeKutta methods
k
i
= f
_
_
t
n
+ c
i
h, u
n
+ h
s
j=1
a
ij
k
j
_
_
, i = 1, . . . , s
u
n+1
= u
n
+ h
s
j=1
b
j
k
j
RungeKutta tableaux or Butcher array
c A
b
T
Explicit RungeKutta method if a
i,j
= 0 when j ≥ i
Explicit RungeKutta Methods
Forward/Backward Euler
0 0
1
1 1
1
The explicit midpoint method
0
1
2
1
2
0 1
Fourstage fourthorder method
0
1
2
1
2
1
2
0
1
2
1 0 0 1
1
6
1
3
1
3
1
6
Implicit RungeKutta Methods
Implicit midpoint method
1
2
1
2
1
HammerHollingsworth
1
2
−
√
3
6
1
4
1
4
−
√
3
6
1
2
+
√
3
6
1
4
+
√
3
6
1
4
1
2
1
2
w](t0 ) = [u0 . In general. t0 + a] → Rn An mth order system of s equations can be reduced to a system of ms ﬁrst order equations. . The explicit timedependency can be removed by introducing a new variable w = t with the trivial equation w = 1. to obtain a new autonomous system of equations [u. . u : [t0 . by introducing new variables v1 = u . t0 + a] → Rn . f : Rn × [t0 . w). . . w] = [f (u. [u. 1].Reduction to First Order and Autonomous Systems Consider the initial value problem u = f (u. t0 ] u(t0 ) = u0 . t). v2 = u . vm−1 = u(m−1) .
.. For g(t) = 0 the equation is homogeneous with solution u(t) = eA(t−t0 ) u0 where the matrix exponential for diagonalizable A = V ΛV −1 is λt e 1 0 ··· 0 0 e λ2 t · · · 0 At Λt −1 Λt e =Ve V . . . . g(t) ∈ Rs If A does not depend on t.Linear ODEs A linear system of ODEs has the form u = A(t)u + g(t). A(t) ∈ Rs×s . . the system is a constant coeﬃcient linear system u = Au + g(t) for a constant matrix A ∈ Rs×s . . e = . . 0 0 · · · e λs t .
the solution is given by Duhamel’s principle t u(t) = eA(t−t0 ) u0 + t0 eA(t−τ ) g(τ ) dτ This is similar to the concept of Green’s functions for boundary value problems – The eﬀect at time t of g(τ ) at time τ is eA(t−τ ) g(τ ). .Duhamel’s Principle For general constant coeﬃcient linear systems u = Au + g(t).
y ∈ S ∂f (x. t) is said to be Lipschitz continuous in a region S if there exists a Lipschitz constant λ ≥ 0 such that f (x. t) ≤ λ x − y .t)∈S x. If f is smoothly diﬀerentiable in S we may set λ = max (x.Lipschitz Condition Deﬁnition A function f (u. x 2 = i=1 xi  2 . t) − f (y. x ∞ = max xi  1≤i≤m . t) ∂x Deﬁnition Commonly used vector norms m m 1/2 x 1 = i=1 xi  .
to the problem exists. and when δ0 < ε.WellPosedness Deﬁnition The initialvalue problem u = f (u. t0 ≤ t ≤ t0 + a. the initialvalue problem z = f (z. t) + δ(t). t0 ≤ t ≤ t0 + a. whenever δ(t) is continuous with δ(t) < ε for all t in [a. t). b]. with ε0 > ε > 0. t0 + a]. has a unique solution z(t) that satisﬁes z(t) − u(t) < kε for all t in [t0 . and There exist constants ε0 > 0 and k > 0 such that for any ε. . u(t). z(t0 ) = u0 + δ0 . u(t0 ) = u0 is said to be a wellposed problem if: A unique solution.
Existence and Uniqueness Theorem Suppose f (u. t0 + a]} with a. Then the IVP u = f (u.t)∈S f (u. where α = min a. t on the cylinder S = {(u. u − u0 ≤ b. µ = sup (u. t). b > 0 and · a given vector norm. t) is continuous in u. u(t0 ) = u0 (1) has at least one solution for t0 ≤ t ≤ t0 + α. b µ . t) . t) : u ∈ Rd . t ∈ [t0 .
t) is also C r as a function of t and the initial condition u0 .Existence and Uniqueness Theorem (PicardLindel¨f) o Subject to both continuity and Lipschitz continuity of f in S. t0 + α] and is wellposed. . (1) has a unique solution in [t0 . Theorem If f is C r for some r ≥ 1. the solution u(u0 .
. u). u(0) = u0 Distribute mesh points equally throughout [0. T ]: tn = nh.Basic Schemes for IVPs Consider the initial value problem u = f (t. 0 ≤ t ≤ T. 1. . 2. N The step size h = T /N = tn+1 − tn . for each n = 0. . .
Backward Euler un+1 = un + hf (tn+1 . un ) + h2 hk (k−1) f (tn . un+1 ) Taylor series method of order k un+1 = un + hf (tn . un ) with error bound at time tn = nh ≤ T un − u(tn ) ≤ eLT u0 − u(0) + eLT − 1 Mh 2L where L is a Lipschitz constant for f and M ≥ u . un ) + · · · + f (tn . un ) 2 k! .Standard OneStep Methods Forward Euler un+1 = un + hf (tn .
un+1 ) + bm−1 f (tn . 0 ≤ t ≤ T. has a diﬀerence equation for approximating un+1 : un+1 = am−1 un + am−2 un−1 + · · · + a0 un+1−m + h[bm f (tn+1 . implicit method if bm = 0. un ) + · · · + b0 f (tn+1−m . u(0) = u0 . Explicit method if bm = 0.Multistep Methods Deﬁnition An mstep multistep method for solving the initialvalue problem u = f (t. u). un+1−m )]. .
un−2 )] . un−1 ) + f (tn−2 .Multistep Methods FourthOrder AdamsBashforth Technique un+1 = un + h [55f (tn . un ) − 59f (tn−1 . un−3 )] FourthOrder AdamsMoulton Technique un+1 = un + h [9f (tn+1 . un−2 ) − 9f (tn−3 . un ) 24 − 5f (tn−1 . un+1 ) + 19f (tn . un−1 ) 24 + 37f (tn−2 .
un + k2 2 2 k4 = f (tn + h. un ) h h .RungeKutta Methods RungeKutta Order Four k1 = f (tn . un + k1 2 2 h h k3 = f tn + . un + hk3 ) h un+1 = un + (k1 + 2k2 + 2k3 + k4 ) 6 k2 = f tn + .
un + h j=1 s aij kj .RungeKutta Methods General form of RungeKutta methods s i = 1. s ki = f tn + ci h. . . .j = 0 when j ≥ i . . un+1 = un + h j=1 bj kj RungeKutta tableaux or Butcher array c A bT Explicit RungeKutta method if ai.
Explicit RungeKutta Methods Forward/Backward Euler 0 0 1 The explicit midpoint method 0 1 2 1 2 1 1 1 0 Fourstage fourthorder method 0 1 2 1 2 1 2 1 1 0 0 1 6 1 2 0 1 3 1 1 3 1 6 .
Implicit RungeKutta Methods Implicit midpoint method 1 2 1 2 1 HammerHollingsworth √ 3 1 2 − √ 6 3 1 2 + 6 1 4√ 1 4 √ − 1 4 1 2 3 6 1 4 + 1 2 3 6 .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.