Professional Documents
Culture Documents
Methods For Solving Ordinary Differential Equations (Lecture Notes) - Peter Philip
Methods For Solving Ordinary Differential Equations (Lecture Notes) - Peter Philip
Lecture Notes
Created for the Class of Spring Semester 2011 at LMU Munich
Contents
1 Ordinary Differential Equations (ODE) of First Order 3
1.1 Definition and Geometric Interpretation . . . . . . . . . . . . . . . . . . 3
1.2 Linear ODE, Variation of Constants . . . . . . . . . . . . . . . . . . . . . 4
1.3 Separation of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Bernoulli Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Linear ODE 22
3.1 Existence and Uniqueness . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2 Fundamental System and Variation of Constants . . . . . . . . . . . . . . 24
3.3 Linear ODE of Higher Order and the Wronskian . . . . . . . . . . . . . . 27
3.4 Constant Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4.1 Linear ODE of Higher Order . . . . . . . . . . . . . . . . . . . . . 30
3.4.2 Systems of Linear ODE . . . . . . . . . . . . . . . . . . . . . . . 35
∗
E-Mail: philip@math.lmu.de
1
CONTENTS 2
4 Numerical Methods 40
4.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.2 Explicit Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2.1 Explicit Euler Method . . . . . . . . . . . . . . . . . . . . . . . . 42
4.2.2 General Error Estimates . . . . . . . . . . . . . . . . . . . . . . . 44
4.2.3 Heun’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2.4 Explicit Runge-Kutta Method . . . . . . . . . . . . . . . . . . . . 47
4.3 Implicit Euler Method, Stiff Equations . . . . . . . . . . . . . . . . . . . 49
B Scalar Products 65
References 67
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 3
which is an equation for the unknown function y. A solution to this ODE is a differen-
tiable function
φ : I −→ R, (1.2)
defined on a (bounded or unbounded) open interval I ⊆ R satisfying the following two
conditions:
Note that condition (i) is necessary so that one can even formulate condition (ii).
—
One distinguishes between ordinary differential equations and partial differential equa-
tions (PDE). While ODE contain only derivatives with respect to one variable, PDE
can contain (partial) derivatives with respect to several different variables. In general,
PDE are much harder to solve than ODE. The term first order in Def. 1.1 indicates that
only a first derivative occurs in the equation. Correspondingly, ODE of second order
contain derivatives of second order etc. We will see later that ODE of higher order can
be equivalently formulated and solved as systems of ODE of first order. The explicit in
Def. 1.1 indicates that the ODE is explicitly solved for y ′ . One can also consider implicit
ODE of the form f (x, y, y ′ ) = 0. At first, we will restrict ourselves to studying explicit
ODE of first order.
Remark 1.2. Consider the setting of Def. 1.1. If f does not depend on y, but merely
on x, then (1.1) says φ must be the antiderivative of f according to [Phi18a, Def. 9.20].
As f is assumed to be continuous, according to the fundamental theorem of calculus in
the form [Phi18a, Th. 9.19(a)], the antiderivative of f can be computed by integration,
namely Z x
φ(x) = c + f (t) dt , (1.3)
x0
which does not solve the ODE, but only transforms it into an integral equation for φ.
However, in certain cases, this transformation can be useful to find a solution.
—
Geometrically, the ODE (1.1) provides a slope y ′ = f (x, y) for every point (x, y). In
other words, it provides a field of directions. The task is to find a differentiable function
φ such that its graph has the prescribed slope in each point it contains. In certain simple
cases, drawing the field of directions can help to guess the solutions of the ODE.
Example 1.3. (a) Let G := R+ × R and f : G −→ R, f (x, y) := y/x, i.e. we consider
the ODE y ′ = y/x. Drawing the field of directions leads to the idea that the
solutions are functions whose graphs constitute rays, i.e. φc : R+ −→ R, y =
φc (x) = c x with c ∈ R. Indeed, one immediately verifies that each φc constitutes a
solution to the ODE.
(b) Let G := R × R+ and f : G −→ R, f (x, y) := −x/y, i.e. we consider the ODE
y ′ = −x/y. Drawing the field of directions leads to the idea√that √ the solutions
are functions
√ whose graphs constitute semicircles, i.e. φ c : ] − c, c[−→ R, y =
2 +
φc (x) = c − x with c ∈ R . Indeed, we get
−2x −x −x
y ′ = φ′c (x) = √ = = , (1.5)
2 c − x2 φc (x) y
i.e. each φc constitutes a solution to the ODE.
where Z x Rx
a(t) dt
φ0 : I −→ R, φ0 (x) = exp a(t) dt =e x0
. (1.7b)
x0
where the chain rule [Phi18a, (8.14)] was used as well. In particular, φ0 is continuous.
Since φ0 > 0 as well, φ−1
0 is also continuous. Moreover, as b is continuous by hypothesis,
φ−1
0 b is continuous and, thus, Riemann integrable on [x0 , x]. Once again, [Phi18a, Th.
9.19(a)] applies, yielding φ to be differentiable with
φ′ : I −→ R,
Z x
′ ′
φ (x) = φ0 (x) c + φ0 (t) b(t) dt + φ0 (x)φ0 (x)−1 b(x)
−1
x0 Z x
−1
= a(x)φ0 (x) c + φ0 (t) b(t) dt + b(x) = a(x)φ(x) + b(x), (1.9)
x0
where the product rule [Phi18a, Th. 8.5(c)] was used as well. Comparing (1.9) with
(1.6) shows that φ is a solution to (1.6). The computation
verifies that φ satisfies the desired initial condition. It remains to prove uniqueness. To
this end, let ψ : I −→ R be an arbitrary differentiable function that satisfies (1.6) as
well as the initial condition ψ(x0 ) = c. We have to show ψ = φ. Since φ0 > 0, we can
define u := ψ/φ0 and still have to verify
Z x
∀ u(x) = c + φ0 (t)−1 b(t) dt . (1.11)
x∈I x0
We obtain
y ′ = 2xy + x3 (1.15)
with initial condition y(0) = c, c ∈ R. Comparing (1.15) with Def. 1.4, we observe we
are facing an inhomogeneous linear ODE with
From Cor. 1.6, we obtain the solution φ0,c to the homogeneous version of (1.15):
Z x
2
φ0,c : R −→ R, φ0,c (x) = c exp a(t) dt = cex . (1.17)
0
φ : R −→ R,
Z x x
x2 −t2 3 x2 1 2 −t2
φ(x) = e c+ e t dt = e c + − (t + 1)e
0 2 0
2 1 1 2 1 x2 1 2
= ex c + − (x2 + 1)e−x = c + e − (x + 1). (1.18)
2 2 2 2
y ′ = f (x)g(y), (1.19)
with one-dimensional continuous functions f and g, and g(y) 6= 0, then it can be solved
by a method known as separation of variables:
Theorem 1.9. Let I, J ⊆ R be (bounded or unbounded) open intervals and suppose
that f : I −→ R and g : J −→ R are continuous with g(y) 6= 0 for each y ∈ J. For
each (x0 , y0 ) ∈ I × J, the ODE (1.19) has a unique solution φ that satisfies the initial
condition
φ(x0 ) = y0 . (1.20)
More precisely, given (x0 , y0 ) ∈ I × J, define functions
Z x Z y
dt
F : I −→ R, F (x) := f (t) dt , G : J −→ R, G(y) := . (1.21)
x0 y0 g(t)
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 7
Let I ′ ⊆ I be an open interval such that x0 ∈ I ′ and F (I ′ ) ⊆ G(J). Then there exists
a unique solution φ : I ′ −→ R of (1.19) that satisfies (1.20). Moreover, this unique
solution also satisfies
G φ(x) = F (x) for each x ∈ I ′ . (1.22)
Proof. First note that there always exists an open interval I ′ ⊆ I such that x0 ∈ I ′ and
F (I ′ ) ⊆ G(J): According to the fundamental theorem of calculus [Phi18a, Th. 9.19(a)],
G is differentiable with G′ = 1/g. Since g is continuous and nonzero, G is even C 1 . If
G′ (y0 ) = 1/g(y0 ) > 0, then G is strictly increasing on J (due to the intermediate value
theorem [Phi18a, Th. 6.44], g(y0 ) > 0, the continuity of g, and g 6= 0 imply that g > 0
on J). As G(y0 ) = 0, this implies that there is ǫ > 0 such that ] − ǫ, ǫ[⊆ G(J). The
same also holds for G′ (y0 ) = 1/g(y0 ) < 0 by an analogous argument. Again using the
fundamental theorem of calculus [Phi18a, Th. 9.19(a)], F is also differentiable and, in
particular, continuous. Since F (x0 ) = 0, there is δ > 0 such that, for I ′ :=]x0 − δ, x0 + δ[,
one has F (I ′ ) ⊆] − ǫ, ǫ[⊆ G(J) as desired.
We now proceed to show that each solution φ : I ′ −→ R to (1.19) that satisfies (1.20)
must also satisfy (1.22). Since φ is a solution to (1.19),
φ′ (x)
= f (x) for each x ∈ I ′ . (1.23)
g φ(x)
Using the change of variables formula [Phi18a, (9.62)] in the left-hand side of (1.24),
allows us to replace φ(t) by the new integration variable u (note that each solution
φ : I ′ −→ R to (1.19) is in C 1 (I ′ ) since f and g are presumed continuous). Thus, we
obtain from (1.24):
Z φ(x) Z φ(x)
du du
F (x) = = = G φ(x) for each x ∈ I ′ , (1.25)
φ(x0 ) g(u) y0 g(u)
see that φ is a solution to (1.19), recall that (1.26) implies (1.22). Differentiating (1.22)
yields, for each x ∈ I ′ ,
(1.22) φ′ (x)
f (x) = F ′ (x) = G′ φ(x) φ′ (x) = , (1.27)
g φ(x)
H : R −→ R+ , H(t) = c et . (1.31)
Finally, we get
c
φ(x) = H F (x) = c e− ln x = . (1.32)
x
—
The advantage of using Th. 1.9 as in the previous example by computing the relevant
functions F , G, and H, is that it is mathematically rigorous. In particular, one can
be sure that one has found the unique solution to the ODE with initial condition.
However, in practice, it is often easier to use the following heuristic (not entirely rigorous)
algorithm. In the end, in most cases, one can easily check by differentiation that the
function found is, indeed, a solution to the ODE with initial condition. The heuristic
algorithm is as follows: Start with the ODE (1.19) written in the form
dy
= f (x)g(y). (1.33a)
dx
Multiply by dx and divide by g(y) (i.e. separate the variables):
dy
= f (x) dx . (1.33b)
g(y)
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 9
Integrate: Z Z
dy
= f (x) dx . (1.33c)
g(y)
Change the integration variables and supply the appropriate upper and lower limits for
the integrals (according to the initial condition):
Z y Z x
dt
= f (t) dt . (1.33d)
y0 g(t) x0
Solve this equation for y and set φ(x) := y and check by differentiation that φ is,
indeed, a solution to the ODE. The use of this heuristic algorithm is demonstrated by
the following example:
Example 1.11. Consider the ODE
y ′ = −y 2 on I × J := R × R (1.34)
with the initial condition y(x0 ) = y0 for given values x0 , y0 ∈ R. We manipulate (1.34)
according to the heuristic algorithm described in (1.33) above:
Z Z
dy 2 −2 −2
= −y −y dy = dx − y dy = dx
dx
Z y Z x y
−2 1 1 1
− t dt = dt = [t]xx0 − = x − x0
y0 x0 t y0 y y0
y0
φ(x) = y = . (1.35)
1 + (x − x0 ) y0
Clearly, φ(x0 ) = y0 . Moreover,
′ y02 ′
2
φ (x) = − 2 = − φ (x) , (1.36)
1 + (x − x0 ) y0
i.e. φ does, indeed, provide a solution to (1.34). If y0 = 0, then φ ≡ 0 is defined
on the entire interval I = R. If y0 6= 0, then the denominator of φ(x) has a zero at
x = (x0 y0 − 1)/y0 , and φ is not defined on all of R. In that case, if y0 > 0, then
x0 > (x0 y0 − 1)/y0 = x0 − 1/y0 and the maximal open interval for φ to be defined on
is I ′ =]x0 − 1/y0 , ∞[; if y0 < 0, then x0 < (x0 y0 − 1)/y0 = x0 − 1/y0 and the maximal
open interval for φ to be defined on is I ′ =] − ∞, x0 − 1/y0 [.
The cases α = 0 and α = 1 are excluded in Def. 1.12 since, for α = 0, (1.37) has the
form (1.6), i.e. it is a linear ODE; and for α = 1, it can also be written in the form (1.6),
namely with b ≡ 0, i.e. (1.37) is then a homogeneous linear ODE.
If α 6= 0, 1 and h does not vanish identically, then (1.37) is not a linear ODE. However,
the theory of linear ODE of Sec. 1.2 can still be used to determine the solutions to (1.37)
since (1.37) is related to the linear ODE
Remark 1.13. (a) If α < 0, then y α is not defined for y = 0, i.e. 0 can not be in the
image of any solution φ = y of (1.37). In particular, each solution to (1.37) must
be either negative on its entire domain or positive on its entire domain.
(b) If α > 0, then y α is also defined for y = 0 and, actually, y ≡ 0 is always a solution
to (1.37) for α > 0.
Theorem 1.14. Let α ∈ Z \ {0, 1} be an odd integer and assume the hypotheses of Def.
1.12. Moreover, let x0 ∈ I, c ∈ R \ {0}, and let z : I −→ R be the unique solution
to (1.38) satisfying z(x0 ) = |c|1−α . Then, for each open interval x0 ∈ I ′ ⊆ I such
that z does not have any zeros in I ′ , the Bernoulli ODE (1.37) has a unique solution
φ : I ′ −→ R that satisfies the initial condition y(x0 ) = c; and this unique solution is
given by ( 1
′ z(x) 1−α > 0 if c > 0,
φ : I −→ R, φ(x) = 1 (1.39)
− z(x) 1−α < 0 if c < 0.
If α > 0, then, additionally, φ = y ≡ 0 is the unique solution to (1.37) satisfying
y(x0 ) = 0.
Proof. First, let c 6= 0 and note that Th. 1.5 guarantees the existence of a unique solution
z : I −→ R to the linear ODE (1.38) with initial condition z(x0 ) = z0 := |c|1−α . As
z0 > 0 and z is continuous, there exists an open interval I ′ ⊆ I such that x0 ∈ I ′ and
z > 0 on I ′ (in particular, z(x) 6= 0 for each x ∈ I ′ ).
To prove existence, let φ be defined by (1.39). Then
( 1 1
z(x0 ) 1−α = |c|1−α 1−α = |c| = c if c > 0,
φ(x0 ) = 1 1 (1.40)
− z(x0 ) 1−α = − |c|1−α 1−α = −|c| = c if c < 0,
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 11
showing φ satisfies the initial condition. Next, for c > 0, one computes
1 1 (1.38) 1 1
φ′ = z 1−α −1 z ′ = z 1−α −1 (1 − α)g z + (1 − α)h
1−α 1−α
1 α
= z 1−α g + z 1−α h = φ g + φα h, (1.41)
proving φ is a solution to (1.37). For c < 0, the previous computation shows that −φ is
a solution to (1.37). Thus, we obtain
(1.37) α odd
φ′ = −(−φ′ ) = − g (−φ) + h (−φ)α = g φ − h (−φα ) = g φ + h φα , (1.42)
On I0 , define (
ψ 1−α for c > 0,
z̃ :=
(−ψ)1−α for c < 0.
Since
(1.37)
z̃ ′ = (1 − α)ψ −α ψ ′ = (1 − α)ψ −α (g ψ + h ψ α ) = (1 − α)ψ 1−α g + (1 − α) h
= (1 − α) z̃ g + (1 − α) h for c > 0
and
(1.37)
z̃ ′ = −(1 − α)(−ψ)−α ψ ′ = −(1 − α)(−ψ)−α (g ψ + h ψ α )
α odd
= (1 − α)(−ψ)1−α g + (1 − α) h = (1 − α) z̃ g + (1 − α) h for c < 0,
as well as (
ψ 1−α (x0 ) = c1−α for c > 0,
z̃(x0 ) =
(−ψ)1−α (x0 ) = (−c)1−α for c < 0,
z̃ is the unique solution z to (1.38) satisfying z(x0 ) = |c|1−α . In particular, on I0 , z̃ has
to agree with the solution z from the hypothesis of the theorem: z̃ ≡ z on I0 . Since z,
z̃, and ψ all are continuous,
1 1 1
|ψ(s)| = lim |ψ(x)| = lim z̃ 1−α (x) = lim z 1−α (x) = z 1−α (s) 6= 0,
x→s x→s x→s
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 12
As z has its only zero at x = 1/8, φ is defined on ] − ∞, 1/8[ and (1.39) yields
2
− 12 2 ex /2
φ : ] − ∞, 1/8[−→ R, φ(x) = − z(x) =− √ . (1.46)
1 − 8x
α Is an Even Integer:
This case is basically analogous to the previous case of an odd integer, except that the
formula for the solution is somewhat modified.
Theorem 1.16. Let α ∈ Z \ {0, 1} be an even integer and assume the hypotheses of
Def. 1.12. Moreover, let x0 ∈ I, c ∈ R \ {0}, and let z : I −→ R be the unique solution
to (1.38) satisfying z(x0 ) = |c|1−α sgn c. Then, for each open interval x0 ∈ I ′ ⊆ I such
that z does not have any zeros in I ′ , the Bernoulli ODE (1.37) has a unique solution
φ : I ′ −→ R that satisfies the initial condition y(x0 ) = c; and this unique solution is
given by
1
φ : I ′ −→ R, φ(x) = z(x) 1−α sgn z(x). (1.47)
If α > 0, then, additionally, φ = y ≡ 0 is the unique solution to (1.37) satisfying
y(x0 ) = 0.
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 13
Proof. Again start with c 6= 0 and note Th. 1.5 guarantees the existence of a unique
solution z : I −→ R to the linear ODE (1.38), this time with initial condition z(x0 ) =
z0 := |c|1−α sgn c. As z0 6= 0 and z is continuous, there exists an open interval I ′ ⊆ I
such that x0 ∈ I ′ and sgn z = sgn c 6= 0 on I ′ (in particular, z(x) 6= 0 for each x ∈ I ′ ).
To prove existence, let φ be defined by (1.47). Then
1 1
φ(x0 ) = z(x0 ) 1−α sgn z(x0 ) = |c|1−α sgn c 1−α sgn c = |c| sgn c = c, (1.48)
and obtain ψ(s) = 0 and, in particular, x0 < s ≤ x̄. Then there exists ǫ > 0 such that,
for I0 :=]x0 − ǫ, s[:
!
ψ(x) > 0 on I0 for c > 0
∃ ∀ .
ǫ>0 x∈I0 :=]x0 −ǫ,s[ ψ(x) < 0 on I0 for c < 0
On I0 , define
z̃ := |ψ|1−α sgn c.
Since
(1.37)
z̃ ′ = (sgn c) (1 − α)|ψ|−α ψ ′ sgn c = (1 − α)|ψ|−α (g ψ + h ψ α )
α even
= (1 − α)|ψ|1−α g sgn c + (1 − α) h = (1 − α) z̃ g + (1 − α) h
and
z̃(x0 ) = |ψ(x0 )|1−α sgn c = |c|1−α sgn c,
z̃ is the unique solution z to (1.38) satisfying z(x0 ) = |c|1−α sgn c. In particular, on I0 ,
z̃ has to agree with the solution z from the hypothesis of the theorem: z̃ ≡ z on I0 .
Since z, z̃, and ψ all are continuous,
1 1 1
|ψ(s)| = lim |ψ(x)| = lim |z̃(x)| 1−α = lim |z(x)| 1−α = |z(s)| 1−α 6= 0,
x→s x→s x→s
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 14
Proof. As in the previous theorems, Th. 1.5 guarantees the existence of a unique solution
z : I −→ R to the linear ODE (1.38), this time with initial condition z(x0 ) = z0 := c1−α ;
1 ORDINARY DIFFERENTIAL EQUATIONS (ODE) OF FIRST ORDER 15
z0 > 0 implies the existence of an open interval I ′ ⊆ I such that x0 ∈ I ′ and z > 0 on I ′ .
The computations for the existence proof, i.e. for the verification that φ is a solution to
(1.37) that satisfies φ(x0 ) = c are given by the c > 0 case of the proof of Th. 1.14, i.e. by
the first case in (1.40) and (1.41). The uniqueness proof is also the same as in the c > 0
case of the proof of Th. 1.14, except easier since, here, ψ > 0 on I ′ is immediately clear
from Rem. 1.13(a) for every solution ψ : I ′ −→ R to (1.37), satisfying ψ(x0 ) = c.
Theorem 1.20. Let α ∈ R+ \ Z and assume the hypotheses of Def. 1.12. Moreover,
let x0 ∈ I, c ∈ R+ , and let z : I −→ R be the unique solution to (1.38) satisfying
z(x0 ) = c1−α . Then, for each open interval x0 ∈ I ′ ⊆ I such that z does not have any
zeros in I ′ , the Bernoulli ODE (1.37) has a unique solution φ : I ′ −→ R that satisfies
the initial condition y(x0 ) = c; and this unique solution is given by (1.54). For c = 0,
one always has, at least, the solution φ ≡ y ≡ 0.
Proof. Analogous to the proof of the previous theorem, the c > 0 parts of the proof of
Th. 1.14, still prove existence and uniqueness in the present situation for c > 0.
Example 2.3. (a) The most simple types of ODE systems are those, where the 1-
dimensional equations are decoupled, i.e. where the right-hand side of the ith equa-
tion only depends on x and yi . For example, consider
+ 2 2xy1 + x3
f : R × R × R0 −→ R , f (x, y1 , y2 ) = √ , (2.5)
y2
and the initial value problem y ′ = f (x, y), y(0) = (−1/2, 9), which, written in
system form, reads 1
y1′ = 2xy1 + x3 , −2
′ √ y(0) = . (2.6)
y2 = y2 , 9
This is a decoupled combination of Ex. 1.8 and Ex. 1.59 and, thus,
1 2
2 φ1 (x) − 2 (x + 1)
φ : R −→ R , φ(x) = = x
2 , (2.7)
φ2 (x) 2
+ 3
is a solution.
Then, for each r > 0, the initial value problem y ′ = f (x, y), y(0) = (r, 0), which,
written in system form, reads
y1′ = −y2 , r
′ y(0) = , (2.9)
y2 = y1 , 0
It is a remarkable theoretical result that, at least locally, every initial value problem for
the system (2.1) has a solution, provided the function f is at least continuous:
Even though Th. 2.4 guarantees the existence of solutions, it is, in general, very difficult
to actually find them. In many cases, this requires numerical approximation methods.
A few such methods will be discussed later.
In Ex. 1.21, we have already seen that, in general, solutions to ODE initial value prob-
lems do not have to be unique. However, under additional hypotheses, they are:
Definition 2.5. Let G ⊆ R×Rn be open, n ∈ N. We call f : G −→ Rn locally Lipschitz
with respect to y if, and only if, for each (x0 , y0 ) ∈ G, there exists an open set U ⊆ G
such that (x0 , y0 ) ∈ U (i.e. U is an open neighborhood of (x0 , y0 )) and f is Lipschitz
continuous with respect to y on U , i.e. if, and only if,
∀ ∃ ∃ ∀
f (x, y) − f (x, ȳ)
≤ Lky − ȳk. (2.11)
(x0 ,y0 )∈G (x0 , y0 ) ∈ U ⊆ G open L≥0 (x,y),(x,ȳ)∈U
Here, the norms on Rn+1 and Rn are arbitrary. If one changes one or both of the norms,
one will, in general, change L, but not the property of f being locally Lipschitz.
Theorem 2.6. If G ⊆ R × Rn is open, n ∈ N, and f : G −→ Rn is locally Lipschitz
with respect to y, then, for each (x0 , y0 ) ∈ G, the solution to the initial value problem
consisting of (2.1) and y(x0 ) = y0 is unique. More precisely, if I ⊆ R is an open
interval and φ, ψ : I −→ Rn are both solutions to (2.1), then φ(x0 ) = ψ(x0 ) for one
x0 ∈ I implies φ(x) = ψ(x) for all x ∈ I:
∃ φ(x0 ) = ψ(x0 ) ⇒ ∀ φ(x) = ψ(x) . (2.12)
x0 ∈I x∈I
φ : I −→ R, (2.14)
As before, condition (i) is necessary so that one can even formulate condition (ii).
—
As mentioned above, it turns out that the nth-order ODE (1.1) is equivalent to a system
of first-order ODE:
Theorem 2.9. In the situation of Def. 2.8 plus (x0 , y0 ) ∈ G, consider the nth-order
initial value problem
y (n) = f x, y, y ′ , . . . , y (n−1) , (2.15a)
∀ y (i) (x0 ) = y0,i+1 , (2.15b)
i∈{0,...,n−1}
y1′ = y2 ,
y2′ = y3 ,
.. (2.16a)
.
′
yn−1 = yn ,
yn′ = f (x, y1 , . . . , yn ),
y(x0 ) = y0 (2.16b)
(note that the unknown function y in (2.15) is R-valued, whereas the unknown function y
in (2.16) is Rn -valued). Then both initial value problems are equivalent in the following
sense:
is a solution to (2.16).
2 SYSTEMS OF ODE AND HIGHER-ORDER ODE 20
{(x, Φ(x)) ∈ I × Rn : x ∈ I}
(2.17) Def. 2.8(i)
= x, φ(x), φ′ (x), . . . , φ(n−1) (x) ∈ I × Rn : x ∈ I ⊆ G.
i.e. φ is n times differentiable and Φ has, once again, the form (2.17) (note Φ1 = φ by
the definition of φ). Then, clearly, (2.16b) implies (2.15b) and Def. 2.1(i) implies Def.
2.8(i). Finally, from the last equation of (2.16a), one obtains
∀ φ(n) (x) = Φ′n (x) = f x, Φ1 (x), . . . , Φn (x) = f x, φ(x), φ′ (x), . . . , φ(n−1) (x) ,
x∈I
(2.21)
proving φ satisfies (2.15a).
Example 2.10. The second-order initial value problem
y(0) = 0,
y ′′ = −y, (2.22)
y ′ (0) = r > 0,
is equivalent to the following system of two first-order ODE:
y1′ = y2 , 0
′ y(0) = . (2.23)
y2 = −y1 , r
2 SYSTEMS OF ODE AND HIGHER-ORDER ODE 21
One can now easily combine Th. 2.9 with the results of Sec. 2.1 to obtain existence and
uniqueness results for higher-order ODE:
Proof. If f is continuous, the the right-hand side of (2.16a) is given by the continuous
function
y2
y3
n
F : G −→ R , F (x, y1 , . . . , yn ) := .
.
(2.26)
.
yn−1
f (x, y1 , . . . , yn ).
Thus, Th. 2.4 provides a solution Φ : I −→ Rn to (2.16) and, then, Th. 2.9(b) yields
φ := Φ1 to be a solution to (2.15).
Proof. The right-hand side of (2.16a) is given by the function F in (2.26). Let K be a
compact subset of G and assume f is Lipschitz continuous with respect to y on K with
Lipschitz constant LK ≥ 0. Then, with respect to the max norm on Rn ,
y 2 − ȳ 2
y3 − ȳ3
F (x, y) − F (x, ȳ)
≤
..
max
.
∀
yn−1 − ȳn−1
(x,y),(x,ȳ)∈K
LK ky − ȳkmax
max
≤ max{1, LK } ky − ȳkmax .
3 LINEAR ODE 22
Remark 2.13. Of course, one now can proceed to considering systems of nth order
ODE
y (n) = f x, y, y ′ , . . . , y (n−1) , (2.27)
where G ⊆ R × Rn , n ∈ N, and f : G −→ Rm , m ∈ N, is continuous. Then, clearly,
Th. 2.9 applies to each of the m equations making up (2.27), i.e. (2.27) is equivalent to
a system of m · n first-order ODE and Cor. 2.11 and Cor. 2.12 apply, respectively, still
providing existence and uniqueness of solutions under the corresponding hypotheses.
3 Linear ODE
Notation 3.1. Let F be a field and m, n ∈ N. The set of all m × n matrices over F is
denoted by M(m, n, F ), and for the set of all n × n matrices, one uses the abbreviation
M(n, F ) := M(n, n, F ). The cases F = R and F = C will be the only ones of interest
to us here.
is called a (system of) linear ODE (of first order). It is called homogeneous if, and only
if, b ≡ 0; it is called inhomogeneous if, and only if, it is not homogeneous.
Example 3.3. (a) The ODE in (2.23) is a homogeneous linear ODE with constant A:
y1′ = y2 0 1 y1 0 1
= = Ay, A := . (3.2)
y2′ = −y1 −1 0 y2 −1 0
One easily verifies that the following functions φ, ψ are solutions to (3.2) for each
r > 0:
2 r sin x r cos x
φ, ψ : R −→ R , φ(x) := , ψ(x) := . (3.3)
r cos x −r sin x
3 LINEAR ODE 23
showing f is locally Lipschitz with respect to y. Thus, Th. 2.6 yields the uniqueness of
the solution to the initial value problem.
3 LINEAR ODE 24
If φ ∈ Li is arbitrary, then
Li = φ + Lh = {φ + ψ : ψ ∈ Lh } (3.7)
and Lh is a vector space over K (we will see below that dim Lh = n, in particular, Lh
is finite-dimensional). Thus, one obtains all solutions to the inhomogeneous equation
(3.1) by adding solutions of the homogeneous equation to a particular solution to the
inhomogeneous equation. Note that this is completely analogous to what occurs for
solutions to linear systems of equations in linear algebra.
To verify the above claims, first note that we know Li 6= ∅ and Lh 6= ∅ from Th. 3.4.
Moreover, if λ, µ ∈ K and ψ1 , ψ2 ∈ Lh , then
showing λψ1 + µψ2 ∈ Lh , proving Lh is a subspace of the complex vector space of all
functions from I into C. If φ ∈ Li and ψ ∈ Lh , then
showing φ + Lh ⊆ Li . If φ, ϕ ∈ Li , then
(ii) There exists x0 ∈ I such that the k vectors φ1 (x0 ), . . . , φk (x0 ) ∈ Kn are linearly
independent over K.
(iii) The k vectors φ1 (x), . . . , φk (x) ∈ Kn are linearly independent over K for every
x ∈ I.
where the kth column of the matrix consists of the component functions φ1k , . . . , φnk of
φk , k ∈ {1, . . . , n}, a fundamental system or a fundamental matrix solution for (3.1). The
latter term is justified by the observation that Φ : I −→ M(n, K) can be interpreted as
a solution to the matrix-valued ODE
Y ′ = A(x) Y : (3.12)
Indeed,
Φ′ = φ′1 , . . . , φ′n = A(x) φ1 , . . . , A(x) φn = A(x) Φ. (3.13)
Proof. The equivalences are a direct consequence of the equivalences in Th. 3.8.
Example 3.11. (a) For each r > 0, the two solutions in (3.3) provide a fundamental
system for (3.2), since
r sin x r cos x
∀ det = −r2 sin2 x − r2 cos2 x = −r2 6= 0. (3.14)
x∈R r cos x −r sin x
(b) The two solutions in (3.5) provide a fundamental system for (3.4), since
2
x −x2 ln x
∀ + det = x3 + x3 ln x − x3 ln x = x3 6= 0. (3.15)
x∈R −x x + x ln x
3 LINEAR ODE 26
Theorem 3.12 (Variation of Constants). Consider the setting of Def. 3.2 with R re-
placed by K. If Φ : I −→ M(n, K) is a fundamental system for (3.1), then the unique
solution ψ : I −→ Kn of the initial value problem consisting of (3.1) and y(x0 ) = y0 ,
(x0 , y0 ) ∈ I × Kn , is given by
Z x
n −1
ψ : I −→ K , ψ(x) = Φ(x)Φ (x0 ) y0 + Φ(x) Φ−1 (t) b(t) dt . (3.16)
x0
is a fundamental system for our ODE. Thus, we can apply (3.16) to obtain the solution
ψ : R −→ R2 ,
Z x
−1 a
ψ(x) = Φ(x)Φ (0) + Φ(x) Φ−1 (t) b(t) dt
b 0
sin x cos x − sin 0 − cos 0 a
=−
cos x − sin x − cos 0 sin 0 b
Z x
sin x cos x − sin t − cos t t
− dt
cos x − sin x 0 − cos t sin t sin t
Z x
b sin x + a cos x sin x cos x −t sin t − sin t cos t
= − dt
b cos x − a sin x cos x − sin x 0 −t cos t + (sin t)2
x
b sin x + a cos x sin x cos x − sin t + t cos t + 12 (cos t)2
= −
b cos x − a sin x cos x − sin x − cos t − t sin t + 2t − 12 sin t cos t 0
b sin x + a cos x
=
b cos x − a sin x
sin x cos x − sin x + x cos x − 12 (sin x)2
−
cos x − sin x − cos x − x sin x + x2 − 12 sin x cos x + 1
b sin x + a cos x
=
b cos x − a sin x
(sin x)2 − x cos x sin x + 21 (sin x)3
+
sin x cos x − x(cos x)2 + 21 (sin x)2 cos x
(cos x)2 + x sin x cos x − x2 cos x + 21 sin x(cos x)2 − cos x
+
− sin x cos x − x(sin x)2 + x2 sin x − 12 (sin x)2 cos x + sin x
b sin x + a cos x + 1 + 21 sin x − (1 + x2 ) cos x
= (3.20)
b cos x − a sin x − x + (1 + x2 ) sin x
to (3.18).
n n−1
X o
Hi := (φ : I −→ K) : φ(n) = b + ak φ(k) , (3.22a)
k=0
n n−1
X o
Hh := (φ : I −→ K) : φ(n) = ak φ(k) . (3.22b)
k=0
(a) If Hi and Hh are the sets defined in (3.22), then Hh is an n-dimensional vector
space over K and, if φ ∈ Hi is arbitrary, then
Hi = φ + Hh . (3.24)
W (φ1 , . . . , φn )(x0 ) 6= 0.
(iii) The Wronskian never vanishes, i.e. W (φ1 , . . . , φn )(x) 6= 0 for every x ∈ I.
Proof. According to Th. 2.9, (3.21) is equivalent to the first-order linear ODE
0 1 0 ... 0 0 y1 0
0 0 1 ... 0 0 y2 0
.. ... ... . .
.. .. ..
.
′ .
y = +
0 0 0 ... 1 0 yn−2 0
0 0 0 ... 0 1 yn−1 0
a0 (x) a1 (x) a2 (x) . . . an−2 (x) an−1 (x) yn b(x)
Define
n o
n ′
Li := (Φ : I −→ K ) : Φ = ÃΦ + b̃ ,
n o
Lh := (Φ : I −→ Kn ) : Φ′ = Ãφ .
Remark 3.20. Using Not. 3.19, the ODE (3.30) can be written concisely as
n−1
X
n
P (∂x )y = b(x), where P (x) := x − ai x i . (3.32)
i=0
The following Prop. 3.21 implies that the differential operator P (∂x ) does not, actually,
depend on the representation of the polynomial P .
Proof. It is immediate from (3.34) and P (λi ) = 0 that φi satisfies P (∂x )φ = 0. From
Th. 3.16(a), we already know Hh is an n-dimensional vector space over K. Thus, it
merely remains to compute the Wronskian. One obtains (cf. (3.23)):
1 . . . 1
λ1 . . . λn n−1
(A.2) Y
W (φ1 , . . . , φn )(0) = .. .. = (λi − λj ) 6= 0,
. .
n−1 i,j=0
λ1 . . . λnn−1 i>j
since the λi are all distinct. We have used that the Wronskian, in the present case, turns
out to be a Vandermonde determinant. The formula (A.2) for this type of determinant is
provided and proved in Appendix A. We also used that the determinant of a matrix is the
same as the determinant of its transpose: det A = det At . From W (φ1 , . . . , φn )(0) 6= 0
and Th. 3.16(b), we conclude that (φ1 , . . . , φn ) is a basis of Hh .
3 LINEAR ODE 32
i.e. P has the distinct zeros λ1 = i, λ2 = −i, λ3 = 2. Thus, according to Th. 3.23, the
three functions
form a basis of the C-vector space Hh . If we consider (3.37) as an ODE over R, then
we are interested in a basis of the R-vector space Hh . We can use linear combinations
of φ1 and φ2 to obtain such a basis (cf. Rem. 3.27 below):
By working a bit harder, one can generalize Th. 3.23 to the case where P has zeros of
higher multiplicity. We provide this generalization in Th. 3.26 below after recalling the
notion of zeros of higher multiplicity in Rem. and Def. 3.25:
Remark and Definition 3.25. According to the fundamental theorem of algebra, for
every polynomial P ∈ Pn with deg P = n, n ∈ N, there exists r ∈ N with r ≤ n,
k1 , . . . , kr ∈ N with k1 + · · · + kr = n, and distinct numbers λ1 , . . . , λr ∈ C such that
where
∀ ∀ φjm : I −→ K, φjm (x) := xm eλj x , (3.42)
j∈{1,...,r} m∈{0,...,kj −1}
If (3.30) is inhomogeneous, then one can use Th. 3.26 and, if necessary, Rem. 3.27, to
obtain a basis of the homogeneous solution space Hh , then using the equivalence with
systems of first-order linear ODE and variation of constants according to Th. 3.12 to
solve (3.30). However, if the function b in (3.30) is such that the following Th. 3.29
applies, then one can avoid using the above strategy to obtain a particular solution φ
to (3.30) (and, thus, the entire solution space via Hi = φ + Hh ).
Pn−1
Theorem 3.29. Let a0 , . . . , an−1 ∈ K, n ∈ N, and P (x) = xn − i=0 ai xi . Consider
(a) (no resonance): If P (µ) 6= 0 and m := deg(Q) ∈ N0 , then there exists a polynomial
R ∈ P such that deg(R) = m and
The reason behind the terms no resonance and resonance will be explained in the follow-
ing Example 3.30.
d2 x
+ ω02 x = a cos(ωt), ω0 , ω ∈ R+ , a ∈ R \ {0}, (3.51)
dt2
which can be written as P (∂t )x = a cos(ωt) with
Note that the unknown function is written as x depending on the variable t (instead of y
depending on x). This is due to the physical interpretation of (3.51), where x represents
the position of a so-called harmonic oscillator at time t, having angular frequency ω0
and being subjected to a periodic external force of angular frequency ω and amplitude
a. We can find a particular solution φ to (3.51) by applying Th. 3.29 to
(a) Case ω 6= ω0 : In this case, one says that the oscillator and the external force are not
in resonance, which explains the term no resonance in Th. 3.29(a). In this case, we
can apply Th. 3.29(a) with µ := iω and Q ≡ a, yielding R ≡ a/P (iω) = a/(ω02 −ω 2 ),
i.e.
a
φ0 : R −→ C, φ0 (t) := R(t) eµt = 2 eiωt , (3.54a)
ω0 − ω 2
is a solution to (3.51).
(b) Case ω = ω0 : In this case, one says that the oscillator and the external force are in
resonance, which explains the term resonance in Th. 3.29(b). In this case, we can
apply Th. 3.29(b) with µ := iω and Q ≡ a, i.e. m = 0, k = 1, yielding R(t) = ct
for some c ∈ C. To determine c, we plug x(t) = R(t) eµt into (3.53):
P (∂t ) ct eiωt = ∂t (c eiωt + ciωt eiωt ) + ω02 ct eiωt
= ciω eiωt + ciω eiωt − cω 2 t eiωt + ω02 ct eiωt
= 2ciω eiωt = a eiωt ⇒ c = a/(2iω). (3.55)
Thus,
a
φ0 : R −→ C, φ0 (t) := t eiωt , (3.56a)
2iω
y ′ = A y + b(x), (3.57)
We will see that the solution theory of linear ODE with constant coefficients is related
to the eigenvalues of A. We recall the definition of this notion:
3 LINEAR ODE 36
To proceed, we need a few more notions and results from Linear Algebra:
Theorem 3.34. Let n ∈ N and A ∈ M(n, C). Then the following statements (i) and
(ii) are equivalent:
(i) There exists a basis B of eigenvectors for Cn , i.e. there exist v1 , . . . , vn ∈ Cn and
λ1 , . . . , λn ∈ C such that B = {v1 , . . . , vn } is a basis of Cn and Avi = λi vi for each
i = 1, . . . , n (note that the vi must all be distinct, whereas some (or all) of the λi
may be identical).
(ii) There exists an invertible matrix W ∈ M(n, C) such that
λ1 0
W −1 AW =
...
, (3.62)
0 λn
i.e. A is diagonalizable (if (3.62) holds, then the columns v1 , . . . , vn of W must
actually be the respective eigenvectors to th eigenvalues λ1 , . . . , λn ).
3 LINEAR ODE 37
Theorem 3.35 (Jordan Normal Form). Let n ∈ N and A ∈ M(n, C). There exists an
invertible matrix W ∈ M(n, C) such that
B := W −1 AW (3.63)
where λi is an eigenvalue of A.
The reason Th. 3.35 regarding the Jordan normal form is useful for solving linear ODE
with constant coefficients is the following result:
Theorem 3.36. Let n ∈ N and A, W ∈ M(n, C), where W is assumed invertible. Then
the following statements (i) and (ii) are equivalent:
(ii) ψ := W −1 φ : I −→ Cn is a solution to y ′ = W −1 AW y.
φ′ = Aφ ⇔ W −1 φ′ = W −1 Aφ ⇔ ψ ′ = W −1 AW ψ (3.66)
Remark 3.37. To obtain a fundamental system for (3.57) with A ∈ M(n, C), it suffices
to obtain a fundamental system for y ′ = By, where B := W −1 AW is in Jordan normal
form and W ∈ M(n, C) is invertible: If φ1 , . . . , φn are linearly independent solutions to
y ′ = By, then A = W BW −1 , Th. 3.36, and W being a linear isomorphism yield that
ψ1 := W φ1 , . . . , ψn := W φn are linearly independent solutions to y ′ = Ay.
Moreover, since B is in block diagonal form with each block being a Jordan matrix
according to (3.64) and (3.65), it actually suffices to solve y ′ = By assuming that
B = λ Id +N, (3.67)
where λ ∈ C and N is a so-called canonical nilpotent matrix, i.e.
0 1 0 ... 0
0 1
N = 0 (zero matrix) or N =
... ... , (3.68)
0
0 0 1
0
where the case N = 0 is already covered by Th. 3.33. The remaining case is covered by
the following Th. 3.38.
Theorem 3.38. Let λ ∈ C, k ∈ N, k ≥ 2, and assume 0 6= N ∈ M(k, C) is a canonical
nilpotent matrix according to (3.68). Then
2 xk−2 xk−1
1 x x2 ... (k−2)! (k−1)!
xk−3 xk−2
0 1 x ... (k−3)! (k−2)!
.. ..
...
0 0 1 . .
λx
Φ : I −→ M(k, C), Φ(x) := e . .. .. ... ... ,
.. (3.69)
.. . . .
0 0 0 ... 1 x
0 0 0 ... 0 1
is a fundamental matrix solution to
y ′ = (λ Id +N )y, (3.70)
i.e. the columns of Φ provide k linearly independent solutions to (3.70). Furthermore,
for 0 ∈ I, Φ satisfies the initial condition
Φ(0) = Id . (3.71)
Proof. That (3.71) holds for 0 ∈ I is immediate from (3.69). Since Φ(x) has upper
triangular form with all 1’s on the diagonal, we obtain det Φ(x) = ekλx 6= 0 for each
x ∈ I, showing the columns of Φ are linearly independent. Let φij : I −→ C denote the
ith component function of the jth column of Φ, i.e.
(
xj−i
eλx (j−i)! for i ≤ j,
∀ φij : I −→ C, φij (x) :=
i,j∈{1,...,k} 0 for i > j.
3 LINEAR ODE 39
ψ1 (x) = Re(φ1 (x)) = Re e(µ+iω)x (α + iβ)
= Re eµx cos(ωx) + i sin(ωx) (α + iβ)
= eµx α cos(ωx) − β sin(ωx) , (3.78a)
ψ2 (x) = Im(φ1 (x)) = eµx α sin(ωx) + β cos(ωx) . (3.78b)
4 NUMERICAL METHODS 40
(iii) The matrix A has precisely one eigenvalue λ ∈ R and the corresponding eigenspace
is 1-dimensional. Then there is an invertible matrix W ∈ M(2, R) such that
B := W −1 AW is in (nondiagonal) Jordan normal form, i.e.
−1 λ 1
B = W AW = . (3.79)
0 λ
form a fundamental system for y ′ = By (over K). Thus, according to Th. 3.36,
the two functions
4 Numerical Methods
4.1 Motivation
In the previous sections, we have studied initial value problems for ODE, including
systems of ODE and ODE of higher order. In some simple situations, we were able
to provide solution formulas, e.g. for linear ODE in one dimension (see Th. 1.5) and
for linear ODE of higher order with constant coefficients (see Th. 3.26 and Rem. 3.27).
However, even in these cases, where we have explicit solution formulas, numerical meth-
ods are, in general, necessary for the approximate evaluation of these formulas. For
example, one will, in general, need numerical methods to evaluate the integrals occur-
ring in Th. 1.5 and one will, in general, need numerical methods to approximate the
polynomial roots required for Th. 3.26.
For most ODE, no explicit solution formulas are available, and numerical methods are
required to approximate solutions. There is a vast literature regarding numerical meth-
ods for ODE. Here, we will only be able to briefly touch on the general theory of such
methods and to briefly discuss a few selected concrete methods.
We consider initial value problems
Stable numerical methods virtually always require that small changes of the input data
result in small changes of the output data. The following result Th. 4.1, which generalizes
the uniqueness result of Th. 2.6, shows that initial value problems for ODE are not
hopeless in this regard.
Theorem 4.1 (Continuity in Initial Conditions). If G ⊆ R × Rn is open, n ∈ N, and
f : G −→ Rn is globally L-Lipschitz with respect to y, i.e.
∃ ∀
f (x, y) − f (x, ȳ)
≤ Lky − ȳk, (4.2)
L≥0 (x,y),(x,ȳ)∈G
then the solutions to (4.1a) depend continuously on the initial condition: Let φ, ψ :
I −→ Rn both be solutions to (4.1a) defined on the same open interval I ⊆ R with
ξ ∈ I, then,
∀
φ(x) − ψ(x)
≤ eL(x−ξ)
φ(ξ) − ψ(ξ)
. (4.3)
x∈I,
x≥ξ
The general idea for the numerical approximation methods is to start at x0 := ξ and
to proceed by discrete steps h0 , h1 , . . . to x1 := x0 + h0 > x0 , x2 := x1 + h1 > x1 , . . . ,
while, simultaneously, starting with u0 := y0 and proceeding to approximations u1 of
y(x1 ), u2 of y(x2 ), . . . This gives rise to the following definition:
Definition 4.2. A (discrete) numerical approximation for the initial value problem
(4.1) is a (finite or infinite) sequence ((xi , ui ))i∈{0,1,... } in the domain G of f such that
(x0 , u0 ) = (ξ, η) and x0 < x1 < . . . Thus, each such numerical approximation comes
with a sequence of stepsizes (hi )i∈{0,1,... } , where
∀ hi := xi+1 − xi . (4.4)
i∈{0,1,... }
(a) We speak of an explicit single-step method for the numerical solution of (4.1) if, and
only if, the sequence (ui )i∈{0,1,... } is given by an explicit recursion of the form
∀ ui+1 = ui + hi ϕ(xi , ui , hi ), (4.5)
i∈{0,1,... }
Remark 4.3. Note the crucial difference between explicit methods as defined in Def.
4.2(a) as compared to the implicit methods of Def. 4.2(b): For explicit methods, the
defining function φ does not depend on ui+1 , whereas it does depend on ui+1 for im-
plicit methods. In consequence, explicit methods are computationally much simpler to
execute: For explicit methods, obtaining ui+1 basically means one evaluation of ϕ. For
implicit methods, ui+1 is obtained as a solution to (4.7), which, in general constitutes
a coupled system of n nonlinear equations, and might be very difficult to solve. The
system (4.7) is typically again solved by a suitable numerical method, e.g. Newton’s
method. In particular, obtaining ui+1 usually requires several evaluations of ϕ. How-
ever, depending on the ODE to be solved, the additional computational cost in each
step of an implicit method might be more than compensated by better convergence
properties. This is typically the case for so-called stiff ODE, see Sec. 4.3 below. Thus,
unfortunately, it actually depends on the ODE, which numerical method to prefer; and
even though there are some general guidelines, there is no general selection recipe.
Remark 4.4. In Def. 4.2, we only defined so-called single-step methods, also known
as one-step methods. For a single-step method, the defining function ϕ depends only
on ui (and ui+1 in the implicit case), whereas for so-called multistep methods, ϕ will
also depend on ui−1 , ui−2 , . . . – more precisely, ϕ depends on ui , . . . , ui−m+1 for an m-
step method. Even though multistep methods are important, we will not have time to
consider them in this class. For more on multistep methods, see, e.g., [Pla06, Sec. 8]
and [QSS07, Sec. 11.5, Sec. 11.6].
Remark 4.5. A priori, the methods defined in Def. 4.2 yield discrete approximations
u0 , u1 , . . . to y(x0 ), y(x1 ), . . . , but they do not yield an approximating function u : I −→
Rn of y : I −→ Rn on a suitable open interval x0 ∈ I ⊆ R. To pass from the ui to
a function u requires interpolation. Different interpolation methods are possible, where
interpolation by splines is often used, piecewise linear (i.e. affine) splines being the most
simple possible choice.
As a first example of an explicit method according to Def. 4.2(a), we consider the explicit
Euler method. For the explicit Euler method, the defining function is
i.e., given ξ = x0 < x1 < . . . and hi according to (4.4), the explicit Euler method
consists of the recursion
u0 = η,
∀ ui+1 = ui + hi f (xi , ui ). (4.10)
i∈{0,1,... }
4 NUMERICAL METHODS 43
Here,
3 2 −y2
f : R −→ R , f (x, y1 , y2 ) = , (4.13)
y1
and, from Ex. 2.3(b), we know the exact solution
2 φ1 (x) 2 cos x
φ : R −→ R , φ(x) = = . (4.14)
φ2 (x) 2 sin x
The following compilation compares the results for hi = h = π/2 and hi = h = π/4:
2 2 2
φ(0) = , u0 (h = π/2) = , u0 (h = π/4) =
0 0 0
π 0
2
0.77
φ = , u1 (h = π/2) = , u2 (h = π/4) =
2 2 π 3.14
(4.17)
−2 −2.93 −4.64
φ(π) = , u2 (h = π/2) = , u4 (h = π/4) =
0 6.28 2.41
3π 0 −12.8 −5.56
φ = , u3 (h = π/2) = , u6 (h = π/4) = .
2 −2 1.67 −6.37
We see that the values produced by the explicit Euler method are (unacceptably) far
from the exact values. One reason is the stepsizes hi being too large to yield accurate
approximations, and decreasing hi does, indeed, yield more accurate approximations as
can already by seen in (4.17). But the bad quality of the ui is also due to the explicit
Euler method not being a very accurate method. This will be made more precise in
the following Sec. 4.2.2 (cf. Th. 4.12), and we will also see examples of more accurate
methods below.
We will now introduce notions and results that help to gauge the accuracy (and the
expected error) of explicit single-step methods as defined in Def. 4.2(a) above.
Notation 4.8. Given a real interval [a, b], a < b, (x0 , . . . , xN ) ∈ RN +1 , N ∈ N, is called
a partition of [a, b] if, and only if, a = x0 < x1 < · · · < xN = b. Given such a partition
∆ of [a, b] as above, the number
hmax (∆) := max hi : i ∈ {0, . . . , N − 1} , hi := xi+1 − xi , (4.18)
is called the mesh size of ∆. Moreover, let Π([a, b]) denote the set of all partitions of
[a, b].
Definition 4.9. Consider the initial value problem (4.1) and assume f is such that
(4.1) has a unique solution φ : I −→ Rn on some open interval I ⊆ R. Let b > ξ be
such that [ξ, b] ⊆ I. Moreover, consider an explicit single-step methods as defined in
Def. 4.2(a), given by a defining function
ϕ : Dϕ −→ Rn , Dϕ ⊆ R × Rn × R+ . (4.19)
u0 = η,
∀ ui+1 = ui + hi ϕ(xi , ui , hi ), hi := xi+1 − xi . (4.20)
i∈{0,1,... }
4 NUMERICAL METHODS 45
(a) We call the method well-defined if, and only if, for each partition ∆ = (x0 , . . . , xN )
of [ξ, b], the recursion (4.20) provides all approximations u0 , . . . , uN (cf. Rem. 4.6),
i.e. if, and only if,
∀ ∀ (xi , ui , hi ) ∈ Dϕ . (4.21)
∆∈Π([ξ,b]) i∈{0,1,...,N −1}
(b) The method is said to have order of convergence p ∈ N if, and only if, it is well-
defined and satisfies
n o
∃ ∀ max kui − φ(xi )k : i ∈ {0, . . . , N } ≤ C hpmax (∆), (4.22)
C≥0 ∆∈Π([ξ,b])
where the quantity on the left-hand side of the inequality in (4.22) is known as the
method’s global truncation error (it depends on both ϕ and ∆).
(c) For each x ∈ [ξ, b] and each h ∈ [0, b − x] such that (x, φ(x), h) ∈ Dϕ , we call
η(x, h) := φ(x) + h ϕ(x, φ(x), h) −φ(x + h) (4.23)
| {z }
cf. (4.20)
the method’s local truncation error at point (x + h, φ(x + h)) with respect to the
stepsize h. The method is said to be consistent of order p ∈ N if, and only if, η(x, h)
is defined for each x ∈ [ξ, b], h ∈ [0, b − x], and
∃ ∀ ∀ kη(x, h)k ≤ C hp+1 . (4.24)
C≥0 x∈[ξ,b] h∈[0,b−x]
Theorem 4.11. Consider the setting of Def. 4.9. If the explicit single-step method
under consideration is well-defined, consistent of order p ∈ N, and globally L-Lipschitz
with respect to u, L > 0, then it has order of convergence p. More precisely,
n o
∀ max kui − φ(xi )k : i ∈ {0, . . . , N } ≤ K hpmax (∆), (4.26a)
∆∈Π([ξ,b])
C L(b−ξ)
where K = e −1 , (4.26b)
L
C being the constant given by (4.24).
Proof. For the proof that the explicit Euler method is consistent of order 1 see, e.g.,
[Pla06, Th. 7.14]. Clearly, if f is globally Lipschitz with respect to y, then ϕ is globally
Lipschitz with respect to u, i.e. the explicit Euler method has order of convergence 1
according to Th. 4.11.
n 1
ϕ : Dϕ −→ R , ϕ(x, u, h) := f (x, u) + f x + h, u + hf (x, u) , (4.27)
2
i.e., given ξ = x0 < x1 < . . . and hi = xi+1 − xi , Heun’s method consists of the recursion
u0 = η,
hi (4.28)
∀ ui+1 = ui + f (xi , ui ) + f xi + hi , ui + hi f (xi , ui ) .
i∈{0,1,... } 2
As for the explicit Euler method above, we have the issue that, in general, there is no
guarantee that ui+1 is well-defined by (4.28). More precisely, ui+1 is well-defined by
(4.28) if, and only if, (xi , ui ) ∈ G and (xi + hi , ui + hi f (xi , ui )) ∈ G; and (4.28) is
supposed to mean that the recursion continues as long as ui+1 is well-defined, and it
terminates with ui , otherwise.
Example 4.13. We redo Ex. 4.7 with Heun’s method. Thus, once again, we consider
3 2 −y2
f : R −→ R , f (x, y1 , y2 ) = , (4.29)
y1
The following compilation compares the results for hi = h = π/2 and hi = h = π/4:
2 2 2
φ(0) = , u0 (h = π/2) = , u0 (h = π/4) =
0 0 0
π 0
−0.47
−0.28
φ = , u1 (h = π/2) = , u2 (h = π/4) =
2 2 π 2.17
(4.31)
−2 −4.82 −2.32
φ(π) = , u2 (h = π/2) = , u4 (h = π/4) =
0 −1.47 −0.60
3π 0 3.43 0.98
φ = , u3 (h = π/2) = , u6 (h = π/4) = .
2 −2 −7.23 −2.44
While the errors are reduced as compared to the explicit Euler method, the results are
still far too bad to be useful in practise, due to hi being far too large. Here, the example
merely serves illustrative purposes.
Theorem 4.14. If the local truncation error η(x, h) of Heun’s method is defined for each
x ∈ [ξ, b], h ∈ [0, b − x] (for example, G = Rn+1 is sufficient) and f ∈ C 2 (G, Rn ), then
Heun’s method is consistent of order 2. If, in addition, Heun’s method is well-defined
(again, G = Rn+1 being sufficient) and f is globally Lipschitz with respect to y, then
Heun’s method has order of convergence 2.
Proof. For the proof that Heun’s method is consistent of order 2 see, e.g., [Pla06, Ex.
7.18]. Clearly, if f is globally Lipschitz with respect to y, then ϕ is globally Lipschitz
with respect to u, i.e. Heun’s method has order of convergence 2 according to Th.
4.11.
While the Euler method and Heun’s method discussed above, are still relatively simple,
they are also too inaccurate for most practical applications. The Runge-Kutta method
introduced below is slightly more involved, yielding a fourth-order method, often suffi-
ciently good for serious use.
For the explicit Runge-Kutta method, the defining function is
1
ϕ : Dϕ −→ Rn , ϕ(x, u, h) := k1 (x, u) + 2k2 (x, u, h) + 2k3 (x, u, h) + k4 (x, u, h) ,
6
(4.32a)
k1 (x, u) := f (x, u), (4.32b)
h h
k2 (x, u, h) := f x + , u + k1 (x, u) , (4.32c)
2 2
h h
k3 (x, u, h) := f x + , u + k2 (x, u, h) , (4.32d)
2 2
k4 (x, u, h) := f x + h, u + hk3 (x, u, h) , (4.32e)
4 NUMERICAL METHODS 48
i.e., given ξ = x0 < x1 < . . . and hi = xi+1 − xi , the explicit Runge-Kutta method
method consists of the recursion
u0 = η,
hi
∀ ui+1 = ui + k1 (xi , ui ) + 2k2 (xi , ui , hi ) + 2k3 (xi , ui , hi ) + k4 (xi , ui , hi ) .
i∈{0,1,... } 6
(4.33)
As for the explicit Euler method and Heun’s method above, we have the issue that, in
general, there is no guarantee that ui+1 is well-defined by (4.33). More precisely, ui+1 is
well-defined by (4.33) if, and only if,
(xi , ui ) ∈ G, xi + hi /2, ui + hi k1 (xi , ui )/2 ∈ G,
xi + hi /2, ui + hi k2 (xi , ui , hi )/2 ∈ G, (4.34)
and xi + hi , ui + hi k3 (xi , ui , hi ) ∈ G,
and (4.33) is supposed to mean that the recursion continues as long as (4.34) holds, and
it terminates with ui , if (4.34) fails.
Example 4.15. As in the previous examples regarding the explicit Euler method and
Heun’s method, respectively, we, once again, consider
3 2 −y2
f : R −→ R , f (x, y1 , y2 ) = , (4.35)
y1
ξ := 0 and η := 20 . The following compilation compares the results for hi = h = π/2
and hi = h = π/4:
2 2 2
φ(0) = , u0 (h = π/2) = , u0 (h = π/4) =
0 0 0
π 0
−1.71
0.01
φ = , u1 (h = π/2) = , u2 (h = π/4) =
2 2 0.07 2.00
(4.36)
−2 −0.10 −1.99
φ(π) = , u2 (h = π/2) = , u4 (h = π/4) =
0 −1.58 0.02
3π 0 1.46 −0.02
φ = , u3 (h = π/2) = , u6 (h = π/4) = .
2 −2 −0.13 −1.98
The improvement over Heun’s method (see (4.31)) is striking, and the values obtained
for hi = h = π/4 can be considered acceptable.
Theorem 4.16. If the local truncation error η(x, h) of the explicit Runge-Kutta method
is defined for each x ∈ [ξ, b], h ∈ [0, b − x] (for example, G = Rn+1 is sufficient)
and f ∈ C 4 (G, Rn ), then the explicit Runge-Kutta method is consistent of order 4. If,
in addition, the explicit Runge-Kutta method is well-defined (again, G = Rn+1 being
sufficient) and f is globally Lipschitz with respect to y, then the explicit Runge-Kutta
method has order of convergence 4.
4 NUMERICAL METHODS 49
Proof. For the proof that the explicit Runge-Kutta method is consistent of order 4 see,
e.g., [But03, Sec. 322]. Clearly, if f is globally Lipschitz with respect to y, then ϕ is
globally Lipschitz with respect to u, i.e. the explicit Runge-Kutta method has order of
convergence 4 according to Th. 4.11.
(a) The initial value problem (4.37) is said to satisfy an upper Lipschitz condition with
respect to y and h·, ·i if, and only if, there exists a continuous function M : [ξ, b] −→
R such that
∀ f (x, y) − f (x, ȳ), y − ȳ ≤ M (x) ky − ȳk2 . (4.38)
(x,y),(x,ȳ)∈G
Moreover, the initial value problem is called dissipative if, and only if, (4.38) holds
with M ≤ 0 (in the sense that M (x) ≤ 0 for each x ∈ [ξ, b].
(b) The initial value problem (4.37) is stiff provided that it satisfies the following two
conditions (i) and (ii):
4 NUMERICAL METHODS 50
(i) The problem is dissipative or, at least, (4.38) holds with an M that does not
surpass a moderate positive size, say M ≤ 1.
(ii) The expression on the left-hand side of (4.38) divided by ky − ȳk2 can become
strongly negative, i.e.
(
)
f (x, y) − f (x, ȳ), y − ȳ
∀ m(x) := inf 2
: y, ȳ ∈ Rn , y 6= ȳ ≪ 0.
x∈[ξ,b] ky − ȳk
(4.39)
Remark 4.18. Note that the Cauchy-Schwarz inequality (B.2) implies
f (x, y) − f (x, ȳ), y − ȳ f (x, y) − f (x, ȳ)
∀ ≤ . (4.40)
(x,y),(x,ȳ)∈G ky − ȳk2 ky − ȳk
In consequence, (4.39) means that f can be globally L-Lipschitz with respect to y only
with a very large Lipschitz constant L ≥ |m(x)|. In particular, for the explicit Euler
method, Heun’s method, and the explicit Runge-Kutta method, the constant K provided
by (4.26) becomes very large (cf. Theorems 4.12, 4.14, and 4.16), such that reasonable
approximations from these methods can only be expected for exceedingly small stepsizes
h.
Definition 4.19. The implicit Euler method is an implicit single-step method as defined
in Def. 4.2(b), where the defining function is
ϕ : {(x, u, v, h) ∈ R × Rn × Rn × R+ n
0 : (x + h, v) ∈ G} −→ R ,
(4.41)
ϕ(x, u, v, h) := f (x + h, v),
i.e., given ξ = x0 < x1 < . . . and hi = xi+1 − xi , the implicit Euler method consists of
the recursion
u0 = η,
∀ ui+1 = ui + hi f (xi+1 , ui+1 ), (4.42)
i∈{0,1,... }
y ′ = λy − (1 + λ)e−x , (4.44a)
y(0) = η, η ∈ R. (4.44b)
To compare with (4.38) and (4.40), we compute (using the Euclidean scalar product,
which is just multiplication in one dimension)
2 2
∀ 2
f λ (x, y) − fλ (x, ȳ), y − ȳ = λ(y − ȳ) = λ|y − ȳ| , (4.45)
(x,y),(x,ȳ)∈R
4 NUMERICAL METHODS 51
Table 1: Numerical rusults to (4.44) with λ = −10, computed for several stepsizes h by
the explicit Euler method and by the implicit Euler method. The problem is not stiff
and both methods perform equally well.
φ′λ (x) = −e−x + λ(η − 1)eλx = λe−x + λ(η − 1)eλx − (1 + λ)e−x = λφλ (x) − (1 + λ)e−x ,
Table 2: Numerical rusults to (4.44) with λ = −1000, computed for several stepsizes h
by the explicit Euler method and by the implicit Euler method. The problem is stiff
and the explicit method is unstable for the largest three values of h.
4 NUMERICAL METHODS 52
u0 = 1,
∀
ui+1 = ui + h λui − (1 + λ) e−xi . (4.48)
i∈{0,1,... }
recomputing the results of [Pla06, Table 8.3], reproduced in Tables 1 and 2 for the
reader’s convenience, where we write
For λ = −10, the problem (4.44) is actually not stiff and the results in Table 1 show
that both the explicit and the implicit Euler method produce reasonable results even
for the largest stepsize h = 2−4 .
For λ = −1000, (4.44) is stiff, and the results in Table 2 show that, while the implicit
Euler method performs reasonably for each value of h, the error of the explicit Euler
method appears to tend to infinity for the first three values of h, but then becomes
reasonably small for h = 2−10 and h = 2−12 (one says the explicit Euler method is
unstable for the larger values of h.
Example 4.21. Let us consider the 2-dimensional example, where n = 2, ξ = 0, and
2 −100 y1 + y2 −100 1
f : R × R −→ R, f (x, y) := Ay = 1 , A := 1 , (4.52)
− 10 y2 0 − 10
y1′ = −100 y1 + y2 ,
1
y2′ = − y2 , (4.53a)
10
y(0) = η, η ∈ R2 . (4.53b)
4 NUMERICAL METHODS 53
To compare with (4.38) and (4.40), we compute (using the Euclidean scalar product)
f (x, y) − f (x, ȳ), y − ȳ = A(y − ȳ), y − ȳ
1
= −100 (y1 − ȳ1 )2 + (y2 − ȳ2 )(y1 − ȳ1 ) − (y2 − ȳ2 )2
∀ 10 (4.54)
(x,y),(x,ȳ)∈R2 2
1
≤ − 10 |y1 − ȳ1 | − √ |y2 − ȳ2 | ≤ 0 ≤ ky − ȳk22 ,
10
and (
)
f (x, y) − f (x, ȳ), y − ȳ
inf : y, ȳ ∈ Rn , y 6= ȳ = −∞, (4.55)
ky − ȳk2
obtaining M (x) = 0 and m(x) = ∞. Thus, the problem (4.53) is stiff according to Def.
4.17(b).
As in the previous example, the goal is to assess the performance of both the explicit
Euler method (4.10) and the implicit Euler method (4.42), comparing their respective
results with the exact solution. As (4.53a) is a linear ODE with constant coefficients, the
exact solution can be obtained from the results of Sec. 3.4.2. To this end, one observes
A to be diagonalizable,
10
−1 −100 0 1 1 −1 1 − 999
D := W AW = 1 , W = , W = : (4.56)
0 − 10 0 999
10
10
0 999
Indeed,
10
−1 −100 1
−1 1 1 1 − 999 −100 −100 + 999
10
W AW = W 1 999 = 10 999
0 − 10 0 10 0 999 0 − 100
−100 0
= 1 .
0 − 10
implying
∀ ui = (Id +h A)i u0 = W (Id +h D)i W −1 η. (4.63)
i∈N0
Using
i (1 − 100h)i 0
∀ (Id +h D) = 1
i (4.64)
i∈N0 0 1− 10
h
and (4.60), we obtain
i
v1 1i v2
∀ ui = (1 − 100h) + 1− h . (4.65)
i∈N0 0 10 w22 v2
1
For h > 50
, we have |1 − 100h| > 1 and (4.65) implies
v1 6= 0 ⇒ lim kui k = ∞, (4.66)
i→∞
whereas limx→∞ kφ(x)k = 0, showing the instability of the explicit Euler method for
1
h > 50 . When using (4.62) instead of (4.65), numericallly, due to roundoff errors,
limi→∞ kui k = ∞ will even occur for v1 = 0.
For the implicit Euler method, the equation for ui+1 is
ui+1 = ui + h Aui+1 , (4.67)
i.e. the recursion is
u0 = η,
∀ ui+1 = (Id −hA)−1 ui , (4.68)
i∈N0
implying i i
∀ ui = (Id −hA)−1 u0 = W (Id −h D)−1 W −1 η. (4.69)
i∈N0
Using
1
i
1+100h
0
−1 i
∀ (Id −h D) =
1
i (4.70)
i∈N0 0 1
1+ 10 h
such that
lim kui k = 0, (4.72)
i→∞
independently of the size of h > 0. While (4.72) does not prove the convergence of the
implicit Euler method, a convergence result is provided by the following Th. 4.22.
Theorem 4.22. Assume the initial value problem (4.37) satisfies an upper Lipschitz
condition with respect to y as defined in Def. 4.17(a), however with a constant function
M (x) ≡ M ∈ R. Moreover, assume (4.37) has a unique solution φ defined on [ξ, b],
and consider the implicit Euler method (4.42) for an equidistant partition (x0 , . . . , xN )
of [ξ, b], i.e. h = xi+1 − xi for each i ∈ {0, . . . , N − 1}. Then there exists C ≥ 0 not
depending on the partition and such that the global truncation error can be estimated
n o
max kui − φ(xi )k : i ∈ {0, . . . , N } ≤ K h, where (4.73)
(
C(b − ξ) for M ≤ 0,
K := C M (b−ξ)/(1−HM ) (4.74)
M
e − 1 for M > 0,
where the estimate for M > 0 holds for each h, H ∈ R+ satisfying 0 < h ≤ H < 1/M .
For M ≤ 0, the constant K in (4.73) and (4.74) tends to be of moderate size and it
grows at most linearly with the length of the interval [ξ, b].
5.1 Prototypes
ODE contain only derivatives of one variable, and, correspondingly, the unknown func-
tion y is supposed to be defined on a subset of R. In contrast, PDE contain (partial)
derivatives with respect to different variables, and, correspondingly, the unknown func-
tion u is supposed to be defined on a subset of Rn , n ≥ 2.
A systematic study of PDE, if at all possible, is far beyond the scope of this class, and
we will only be able to briefly consider some prototypes of important classes of PDE.
(a) The support of a function f : Ω −→ R, denoted supp(f ), is the closure of the set
of points, where f does not vanish, i.e.
(b) For each k ∈ N0 , let C k (Ω) (resp. C k (Ω)) denote the set of all functions f : Ω −→ R
such that all partials up to order k existTand are continuous on ΩT (resp. extend con-
tinuously to Ω). Moreover, C ∞ (Ω) := k∈N0 C k (Ω), C ∞ (Ω) := k∈N0 C k (Ω). The
corresponding sets C k (Ω, Rm ), C k (Ω, Rm ), C ∞ (Ω, Rm ), C ∞ (Ω, Rm ) of Rm -valued
functions, m ∈ N, are defined analogously – for example, f ∈ C k (Ω, Rm ) if, and
only if, all component functions f1 , . . . , fm of f are in C k (Ω). Let Cck (Ω) denote the
set of all functions f from T C k (Ω) that have a compact support contained in Ω, i.e.
supp(f ) ⊆ Ω; Cc∞ (Ω) := k∈N0 Cck (Ω).
(c) Provided they exist, we denote the gradient, divergence, and Laplacian (also known
as the Laplace operator) of a function f by ∇ f , div f , and ∆f , respectively, where
f ∈ C 1 (Ω) ⇒ ∇ f : Ω −→ Rn , ∇ f (ξ) = ∂1 f (ξ), . . . , ∂n f (ξ) , (5.2a)
X n
f ∈ C 1 (Ω, Rn ) ⇒ div f : Ω −→ R, div f (ξ) = ∂i fi (ξ), (5.2b)
i=1
2 n
f ∈ C (Ω) ⇒ ∆f : Ω −→ R , ∆f (ξ) = div ∇ f (ξ)
Xn
= ∂i ∂i f (ξ). (5.2c)
i=1
∂t u − ∆u = f (5.4)
∂t ∂t u − ∆u = f (5.5)
5 SHORT INTRODUCTION TO PDE 57
Each of the above PDE is called homogeneous if, and only if, the right-hand side function
f vanishes, i.e. f ≡ 0. They are called inhomogeneous if, and only if, they are not
homogeneous.
—
Here, we will only have time to look at Laplace’s and Poisson’s equation in more detail,
which we do in the following Sec. 5.2. For similar consideration regarding the heat
equation and the wave equation, we refer to [Eva98, Sec. 2.3] and [Eva98, Sec. 2.4],
respectively.
Note that for n = 1, (5.3) is actually an ODE that can be solved simply by integrating f
twice. We will therefore restrict ourselves to considering (5.3) for n ≥ 2 in the following.
Notation 5.3. For each n ∈ N, let
Z
αn := voln (B1 (0)) := 1 (5.6)
B1 (0)
is called the fundamental solution of Poisson’s equation (5.3) (or of Laplace’s equation
∆u = 0).
—
5 SHORT INTRODUCTION TO PDE 58
A description of how one can find the solution Φ if one does not know it already, can
be found in [Eva98, Sec. 2.2.1.a]. Here, in the following Prop. 5.6, we will merely verify
that Φ is, indeed, harmonic.
Proposition 5.6. For each n ∈ N, n ≥ 2, the fundamental solution Φ of Laplace’s
equation as defined in (5.7) is, indeed, harmonic, i.e.
∆Φ = 0 on Rn \ {0}. (5.8)
Proof. While the constants used in the definition of Φ are useful in the context of Th. 5.7
below, we can ignore them for the purposes of the present proof. To keep notation simple,
we still write Φ below, even though the Φ’s below will defer from the corresponding Φ’s
from (5.7) by a constant.
We start with n = 2: For i ∈ {1, 2} and x = (x1 , x2 ) ∈ R2 \ {0}, we have
p
∂ ln x21 + x22 xi
∂i Φ(x) = = 2 , (5.9a)
∂xi x1 + x22
x2 + x2 − 2x2
∂i ∂i Φ(x) = 1 2 2 2 2 i , (5.9b)
(x1 + x2 )
2x2 + 2x22 − 2x21 − 2x22
∆Φ(x) = ∂1 ∂1 Φ(x) + ∂2 ∂2 Φ(x) = 1 = 0. (5.9c)
(x21 + x22 )2
Now let n = 3: For i ∈ {1, . . . , n} and x ∈ Rn \ {0}, we have
P 1− n n
!− n2
∂ ( ni=1 x2i ) 2 X
∂i Φ(x) = = (2 − n) xi x2i , (5.10a)
∂xi i=1
! n !− n2 −1
n − 2 n
X X
∂i ∂i Φ(x) = (2 − n) x2i − n x2i x2i , (5.10b)
i=1 i=1
n
!− n2 n
X X n x2
∆Φ(x) = (2 − n) x2i 1 − Pn i 2 = 0, (5.10c)
i=1 i=1 i=1 xi
The reason the harmonic function Φ of (5.7) is referred to as the fundamental solution
of Poisson’s equation lies in the fact that it can be used to formulate a solution formula
for Poisson’s equation with a general function f , assuming f satisfies certain regularity
requirements. The following Th. 5.7 is quoted from [Eva98, Sec. 2.2], where it is proved
for f ∈ Cc2 (Rn ). The assumption on f is made mainly for simplicity and, in the literature,
one finds variants of Th. 5.7 requiring far less regularity on f .
Theorem 5.7. Let n ∈ N, n ≥ 2, f ∈ Cc2 (Rn ), and Φ as in (5.7).
(a) For each x ∈ Rn , the function y 7→ Φ(x − y)f (y) (with arbitrarily defined value for
y = x) is integrable over Rn .
5 SHORT INTRODUCTION TO PDE 59
u : Rn −→ R,
R
Z − 1 n ln kx − yk2 f (y) dy for n = 2,
2π R
u(x) := Φ(x − y)f (y) dy = 1
R f (y) (5.11)
R n n(n−2)α
n Rn n−2 dy
kx−yk2
for n ≥ 3,
and for n ≥ 3,
Z Z Z R
1 dx rn−1
Φ(x) dx = − n−2 = − lim dr
BR (0) BR (0) n(n − 2)αn kxk2 ρ→0 ρ (n − 2) r n−2
R
r2 R2
= − lim =− ∈ R, (5.12b)
ρ→0 2 (n − 2) 2 (n − 2)
ρ
While (5.7) and (5.11) provide particular solutions to Laplace’s and Poisson’s equation,
respectively, both equations typically allow infinitely many different solutions. This is,
indeed, not really surprising, since we encountered the same phenomenon for ODE. One
calls a problem well-posed if it admits a unique solution (one usually also requires this
solution to depend continuously on the input data, but here we only consider existence
and uniqueness). For a large class of ODE, we were able to obtain well-posedness by
supplementing the ODE with an initial condition (cf. Th. 2.6). For Poisson’s equation,
one can often obtain well-posedness by supplementing the PDE by so-called boundary
conditions. The following are the most commonly considered boundary conditions:
Definition 5.8. A boundary condition for Poisson’s equation (5.3) on an open set Ω ⊆
Rn , n ≥ 2, prescribes conditions for the unknown function f : Ω −→ R to be satisfied
on ∂Ω, i.e. on the boundary of Ω.
5 SHORT INTRODUCTION TO PDE 60
αu + β n · ∇ u = g on ∂Ω, (5.15)
In each case, the combination of the PDE and the boundary condition is called a bound-
ary value problem.
—
(a) For each x ∈ Ω, we call φx : Ω −→ R a corrector function for Ω if, and only if, φx
satisfies the following two conditions (5.16a) and (5.16b):
is called a Green’s function for Ω if, and only if, the φx , x ∈ Ω, are all corrector
functions for Ω as defined in (a).
5 SHORT INTRODUCTION TO PDE 61
In many situations, one can now represent solutions to Poisson’s equation as integrals
over Green’s functions as stated in Th. 5.12 below. However, in several respects, this can
only be considered a partial solution to the problem: (a) Green’s functions are typically
very difficult to find, (b) the resulting integrals are typically very difficult to carry out,
(c) it remains to verify that the function given by the representation formula is, indeed,
a solution in the concrete situation at hand.
One of the difficulties regarding PDE is that results often depend on the regularity of the
boundary of the involved sets – Ω in our case. The following Def. 5.10 for C k -boundaries
is taken from [Eva98, Sec. C.1]:
Definition 5.10. Let Ω ⊆ Rn be an open set, n ∈ N, n ≥ 2. The boundary ∂Ω is said
to be C k , k ∈ N, if, and only if, for each x0 ∈ ∂Ω, there exists r > 0 and γ ∈ C k (Rn−1 )
such that – upon relabeling and reorienting the coordinate axes if necessary – we have
U ∩ Br (x0 ) = x ∈ Br (x0 ) : xn > γ(x1 , . . . , xn−1 ) . (5.18)
where
∂G
(x, y) := ν(x, y) · ∇ G(x, y), (5.20)
∂ν
is the directional derivative of G in the direction of the outward unit normal ν(x, y).
It is shown in [Eva98, Sec. 2.2.4.c] that a Green’s function for the (open) unit ball B1 (0)
in Rn , n ≥ 2, is given by
G : (x, y) ∈ B1 (0)2 : 0 6= x 6= y −→ R, G(x, y) := Φ(y − x) − Φ y kxk2 − x/kxk2 ,
(5.21)
where Φ is again the fundamental solution as defined in (5.7) (G can be continuously
extended to points (0, y) with y 6= 0, but, for (5.19) the values G(0, y) are irrelevant).
This leads to (5.22), known as Poisson’s formula for a ball:
5 SHORT INTRODUCTION TO PDE 62
Theorem 5.13. For each R > 0, let BR (0) denote the (open) unit ball in Rn , n ≥ 2.
Given g ∈ C(∂BR (0)), define
Z
R2 − kxk22 g(y)
u : BR (0) −→ R, u(x) := n
dy . (5.22)
nR αn ∂BR (0) kx − yk2
Then u ∈ C ∞ (BR (0)) and u is a solution to Laplace’s equation with Dirichlet boundary
condition (5.13) in the sense that
Proof. This is stated as [Eva98, Sec. 2.2, Th. 15], but the proof is left as an exercise.
For a proof, see, e.g., [RR04, Th. 4.14].
Even though, in Th. 5.12, Ω is assumed to be bounded, (5.19) can sometimes also be
used to obtain solutions for unbounded sets Ω. For example, it is shown in [Eva98, Sec.
2.2.4.b] that a Green’s function for the half-space
is given by
G : (x, y) ∈ (Rn+ )2 : x 6= y −→ R,
(5.25)
G(x, y) := Φ(y − x) − Φ(y − x̃), where x̃ := (x1 , . . . , xn−1 , xn ),
and then (5.19) is used to obtain Poisson’s formula (5.26) for a half-space:
!
1 R−x R+x (R − x)2 + y 2
∂y u(x, y) = 4R − 2y arctan + arctan + x ln ,
π y y (R + x)2 + y 2
(5.33b)
2
∂x ∂x u(x, y) =
π (R2 + 2Rx + + x2 y 2 ) (R2
− 2Rx + x2 + y 2 )
R−x R+x
4 2 2 2 2 2 2
· R − 2R (x − y ) + (x + y ) arctan + arctan
y y
!
− 2Ry R2 + x2 + y 2 , (5.33c)
be the corresponding Vandermonde matrix. Then its determinant, the so-called Vander-
monde determinant is given by
n
Y
det(V ) = (λi − λj ). (A.2)
i,j=0
i>j
Proof. The proof can be conducted by induction with respect to n: For n = 1, we have
1
1 λ0 Y
det(V ) = = λ1 − λ0 = (λi − λj ), (A.3)
1 λ1
i,j=0
i>j
showing (A.2) holds for n = 1. Now let n > l. We know from Linear Algebra that the
value of a determinant does not change if we add a multiple of a column to a different
B SCALAR PRODUCTS 65
column. Adding the (−λ0 )-fold of the nth column to the (n + 1)st column, we obtain
in the (n + 1)st column
0
λn − λn−1 λ0
1 1
.. . (A.4)
.
λnn − λnn−1 λ0
Next, one adds the (−λ0 )-fold of the (n − 1)st column to the nth column, and, succes-
sively, the (−λ0 )-fold of the mth column to the (m + 1)st column. One finishes, in the
nth step, by adding the (−λ0 )-fold of the first column to the second column, obtaining
1 λ0 . . . λn 1 0 0 ... 0
0
1 λ1 . . . λn 1 λ1 − λ0 λ2 − λ1 λ0 . . . λn − λn−1 λ0
1 1 1 1
det(V ) = .. .. = .. .. .. .. .. . (A.5)
. . . . . . .
1 λn . . . λnn 1 λn − λ0 λ2n − λn λ0 . . . λnn − λnn−1 λ0
As we also know from Linear Algebra that determinants are linear in each row, for each
i, we can factor out (λi − λ0 ) from the ith row of (A.6), arriving at
n−1
Yn
1 λ 1 . . . λ 1
(λi − λ0 ) ... ... .. .. .
det(V ) = . . (A.7)
n−1
i=1 1 λn . . . λn
However, the determinant in (A.7) is precisely the Vandermonde determinant of the n−1
numbers λ1 , . . . , λn , which is given according to the induction hypothesis, implying
n
Y n
Y n
Y
det(V ) = (λi − λ0 ) (λi − λj ) = (λi − λj ), (A.8)
i=1 i,j=1 i,j=0
i>j i>j
B Scalar Products
Definition B.1. Let X be a real vector space. A function h·, ·i : X × X −→ R is called
an inner product or a scalar product on X if, and only if, the following three conditions
are satisfied:
(a) hx, λy + µzi = λhx, yi + µhx, zi for each x, y, z ∈ X and each λ, µ ∈ R. Together
with Def. B.1(ii), this means that h·, ·i is a bilinear form.
where p p
kxk := hx, xi, kyk := hy, yi. (B.3)
Moreover, equality in (B.2) holds if, and only if, x and y are linearly dependent, i.e. if,
and only if, y = 0 or there exists λ ∈ R such that x = λy.
0 < hx − λy, x − λyi = hx, xi − 2λhx, yi + λ2 hy, yi = kxk2 − 2λhx, yi + λ2 kyk2 . (B.4)
Since (B.4) is valid for each λ ∈ R, one can set λ := hx, yi/kyk2 (using y 6= 0) to get
or hx, yi2 < kxk2 kyk2 . Finally, taking the square root on both sides shows that (B.2)
holds with strict inequality.
B SCALAR PRODUCTS 67
Proposition B.4. If X is a real vector space with an inner product h·, ·i, then the map
p
k · k : X −→ R+ 0 , kxk := hx, xi, (B.6)
defines a norm on X. One calls this the norm induced by the inner product.
establishing that k · k satisfies the triangle inequality. In conclusion, we have shown that
k · k constitutes a norm on X.
(a) The most common scalar product on Rn is the Euclidean scalar product defined by
n
X
h·, ·i : Rn × Rn , hx, yi := x · y := xi yi . (B.8)
i=1
(b) Let the matrix B ∈ M(n, R) by symmetric (i.e. B t = B) and positive definite (i.e.
xt Bx > 0 for each 0 6= x ∈ Rn , where, for the purposes of matrix multiplication
x ∈ Rn is considered a column vector). Then
defines a scalar product on Rn : Indeed, for h·, ·iB , Def. B.1(i) is precisely the state-
ment that B is positive definite. Next, for each x, y, z ∈ Rn and each λ, µ ∈ R,
proving h·, ·iB satisfies Def. B.1(ii). Finally, using that B is symmetric, for each
x, y ∈ Rn ,
References
[Alt06] Hans Wilhelm Alt. Lineare Funktionalanalysis, 5th ed. Springer-Verlag,
Berlin, 2006 (German).
[Koe03] Max Koecher. Lineare Algebra und analytische Geometrie, 4th ed. Sprin-
ger-Verlag, Berlin, 2003 (German), 1st corrected reprint.
[Phi18a] P. Philip. Calculus I for Computer Science and Statistics Students. Lec-
ture Notes, Ludwig-Maximilians-Universität, Germany, 2017/2018, available
in PDF format at http://www.math.lmu.de/~philip/publications/lectureNot
es/philipPeter_Calc1_forInfAndStatStudents.pdf.
[Pla06] Robert Plato. Numerische Mathematik kompakt, 3rd ed. Vieweg Verlag,
Wiesbaden, Germany, 2006 (German).
[Str08] Gernot Stroth. Lineare Algebra, 2nd ed. Berliner Studienreihe zur Math-
ematik, Vol. 7, Heldermann Verlag, Lemgo, Germany, 2008 (German).
REFERENCES 69
[Wal02] Wolfgang Walter. Analysis 2, 5th ed. Springer-Verlag, Berlin, 2002 (Ger-
man).
[Wal04] Wolfgang Walter. Analysis 1, 7th ed. Springer-Verlag, Berlin, 2004 (Ger-
man).