0% found this document useful (0 votes)
123 views19 pages

Boundary Value Problems in ODEs

This document discusses numerical methods for solving boundary value problems (BVPs) for ordinary differential equations (ODEs). It describes the shooting method, which transforms the BVP into an initial value problem (IVP) by guessing the unknown initial conditions. The finite difference method is also covered. This method discretizes the domain, approximates the ODE and boundary conditions with finite differences, embeds the boundary conditions into the linear system of equations, and solves the system to find the solution values at each grid point. Types of boundary conditions like Dirichlet, Neumann, and mixed conditions are also defined.

Uploaded by

keyzek
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
123 views19 pages

Boundary Value Problems in ODEs

This document discusses numerical methods for solving boundary value problems (BVPs) for ordinary differential equations (ODEs). It describes the shooting method, which transforms the BVP into an initial value problem (IVP) by guessing the unknown initial conditions. The finite difference method is also covered. This method discretizes the domain, approximates the ODE and boundary conditions with finite differences, embeds the boundary conditions into the linear system of equations, and solves the system to find the solution values at each grid point. Types of boundary conditions like Dirichlet, Neumann, and mixed conditions are also defined.

Uploaded by

keyzek
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 8

Solution methods for boundary


value problems for ODEs

Usually, in physical problems, the initial conditions for derivatives of certain order
are not know, but instead of that the initial and final values for the unknown
or derivatives of some order can be known. Such type of problems are called as
the boundary-value problems. this occurs more frequently with partial differential
equations.
The difference between the IVP and BVP is depicted in the following table
Initial Value Problem (IVP) Boundary Value Problem (BVP)
The initial conditions are given The boundary conditions are given
at the same point of the independent at two different points of the
variable independent variable
Example of IVP Example of BVP
aÿ(t) + bẏ(t) + cy(t) = d(t) aÿ(t) + bẏ(t) + cy(t) = d(t)
y(t0 ) = α and ẏ(t0 ) = β y(tl ) = α and y(tr ) = γ
In the case of IVP with given y(t0 ) and t˙0 , there is a theorem of existence and
uniqueness of the solution. But in the case of IVP the existence and uniqueness
theorem is not available. Therefore, the BVP may have no solutions or may have
non-unique solutions even when the problem is of the order N and N conditions
are available.

Types of boundary conditions

Types of boundary conditions are described in the following table:

178
Name of condition Value specified Examples
Dirichlet condition The value of y(t) is specified at two particular locations of y(0) = 2 and
the independent variable y(a) = 3
Neumann condition The derivative of y(t) is specified at two points ẏ(0) = 5 and
ẏ(b) = 7
Mixed condition Both, the value of y(t) and its derivative ẏ(t) ẏ(c) = 2 and
are specified y(a) = −3

8.1 Numerical solution of BVP by the shoot-


ing method
One of the most popular method for the solution of BVP is the shooting method
which is based on the following idea:

1. transform the ODE of BVP to a system of ODE equations,

2. guess the initial conditions that are not available,

3. solve IVP,

4. check the known boundary conditions,

5. if necessary modify the guess and solve problem again and jump to the third
point.

Example 13 ♥
Solve BVP for the second order ODE

z̈(t) − 4z(t) + 4t = 0

with the boundary conditions z(0) = 0 and z(1) = 2. The problem can be con-
verted to a system of the first order ODEs
" # " # " # " #
ż1 z2 z1 (0) 0
= , =
ż2 4(z2 − t) z2 (0) ?

and solved by the RK2 method with h = 0.01 for various values of z2 (0) until
the function z(t) at t = 1 will satisfy the condition z(1) = 2. The following table
(according to [1]) shows the guesses and results
guess ż(0) z(1)
1 0 -0.7688
2 1 0.9900
This table gives coordinates of two points in the space of z(0) and ż(1) and it is
easy to fit a straight line through these points (see Fig. Al Amer Unit 7 Lesson 8

179
page 19). The third guess is less intuitive because of the simple geometry: choosing
the ordinate z(1) = 2, which is the solution to the BVP, correspond to abscissa
ż(0) = 1.5743, which is the third and the final best guess.

The shooting method can be ineffective for higher order BVP when boundary
conditions for more than one variable should be invented.

8.2 Numerical solution of BVP by finite-difference


method
Consider the second order ODE

ÿ(t) + ẏ(t) = 0 (8.1)

for y(t), where t ∈ [0, 1], with Neumann boundary conditions: y(0) = 0 and
ẏ(1) = −1. The procedure to solve this BVP with the finite difference method
consists the following steps:

• discretize the domain t ∈ [0, 1],

• approximate ODE by the second order accurate finite difference scheme,

• approximate the boundary conditions,

• embed boundary conditions,

• set up the system of linear algebraic equations, called shortly: the linear
system,

• solve the linear system.

These steps are described below in detail.

Discretization of the domain

The domain t ∈ [0, 1] must be staggered about the boundary and therefore, for
the Neumann’s conditions it should be split into (n − 2) subintervals by n discrete
1
points with the step h = n−2 . Then the discretization of t is such that ti = h(i− 32 ).
For the Dirichlet conditions it should be split into (n − 1) subintervals with the
1
step h = n−1 .

180
Approximation of ODE

The Eq.8.1 can be approximated by the finite-differences and express in the form

1
(yi−1 − 2yi + yi+1 − yi ) = 0 (8.2)
h

that can be also rewritten in the form of polynomial

ai yi−1 + bi yi + ci yi+1 = di (8.3)

where coefficients are defined as follows: ai = ci = h12 , bi = −(1 + h22 ), and di = 0.


The error term is neglected but we keep in mind that the scheme is the second
order accurate in h. In addition it is assumed that the polynomial coefficients are
not constant and di 6= 0. The Eq.8.3 is valid only for i ∈ [2, . . . , n − 1] as the
discrete value of the derivative is not defined at extreme points of a grid, ie. i = 1
and i = n.

Approximation of boundary conditions

Following the approximation of ODE, the boundary conditions must be also ap-
proximated. Because the grid is staggered, the values of y1 and y2 are given at
t1 = − h2 and t2 = h2 and therefore, the value y at t = 0 can be defined by interpo-
lation between y1 and y2 . Therefore, using the central interpolation at the point
t1+ 1
2

y1 + y2
y1+ 1 = + O(h2 ) = 0
2 2

and solving for y1 and neglecting the error of the finite-difference scheme, we obtain

y1 = −y2 .

The boundary condition at t = 1 is approximated by the second-order accurate


difference scheme

dy yn − yn−1
|i=n− 1 = + O(h2 ) = −1.
dt 2 h

taken at ti=n− 1 . From where, neglecting the discretization error, we can obtain
2

yn = yn−1 − h.

181
Embedding of boundary conditions

The approximation of ODE can be used only to find the solution at points i ∈
[2, 3, . . . , n − 1] and therefore, the boundary conditions must be embedded in the
range of those points. Writing the approximation of ODE at i = 2 and i = n − 2

a2 y1 + b2 y2 + c2 y3 = d2 ,
an−1 yn−2 + bn−1 yn−1 + cn−1 yn = dn−1

and substituting the boundary conditions

y1 = −y2
yn = yn−1 − h

results in two required equations embedded in the linear system for the ODE

(b2 + a2 )y2 + c2 y3 = d2
an−1 yn−2 + (bn−1 − cn−1 )yn−1 = dn−1 + cn−1 h. (8.4)

Setting the system of the linear equations

The system of linear equations approximating the ODE at i ∈ [2, 3, . . . , n − 1] is


written as follows

(b2 − a2 )y2 + c2 y3 = d2
a3 y2 + b3 y3 + c3 y4 = d3
a4 y3 + b4 y4 + c4 y5 = d4 (8.5)
.. ..
. .
an−2 yn−3 + bn−2 yn−2 + cn−2 yn−1 = dn−2
an−1 yn−2 + (bn−1 − cn−1 )yn−1 = dn−1 + cn−1 h

This can be rewritten in the matrix form


   
b̂2 a2 y2 d2

 3 b3

a c3

 y3  
  d3 

a4 b4 c4 y4 d4
    
    
.. .. .. .. ..
    

. . .
 = 
(8.6)



 .   . 
  

 an−3 bn−3 cn−3  y
  n−3  
 
dn−3 

an−2 bn−2 cn−2   yn−2  dn−2
    
 
an−1 b̂n−1 yn−1 dˆn−1

182
where the following substitutions have been applied

b̂2 = b2 − a2 ,
b̂n−1 = bn−1 + cn−1 ,
dˆn−1 = dn−1 + hcn−1 .

Solution of the linear system

The liner system expressed by Eq.8.6 can be represented as

A·y =d (8.7)

and one of the solvers appropriate for a tridiagonal system can be applied. The
solution y is loaded by the error of the first-order accurate in h that is worse in
comparison with the second order accurate shooting method with the predictor-
corrector method.

8.3 Method of weighted residuals (MWR)


The differential equation can be expressed by using the differential operator D
acting on the function y(t), i.e.

Dy(t) = f (t), for t ∈ Ω ⊆ Rn (8.8)

with boundary conditions on ∂Ω. One of the possible forms of the differential
operator is

d2
Dy = ( + k 2 )y = 0 for 0 < t < 1. (8.9)
dx2

The approximate solution y(t) of Eq.8.8 can be expressed as

n
X
y(t) ≈ v(t) = cj ϕj (t) (8.10)
j=1

where the so called trial space is spanned on vectors {ϕj }nj=1 . Therefore, the
functions v(t) are called the trial functions. Since vectors ϕj (t) are known, the
goal of MWR is to find n scalars {cj }nj=1 that can be done by minimizing so called
residuals

r(t) ≡ Dv(t0 ) − f (t) (8.11)

183
where r is the residual. The minimization of the residual is performed in the sense
of the following integral relation defined over the entire domain Ω:
Z
r(t)wi (t)dt = 0 for each i, (8.12)

where {wi }mi=1 are called the test functions or weights. The number of weight
functions and the number of base functions for the trial space are related. There
are many possibilities for the selection of these base functions. One of choices is
related to the Lagrange polynomials which we already discussed in one of former
chapters. The set of (n − 1) degree polynomials related to tj , j = 1, 2, . . . , n

n
Y t − ti
pj (t) = (8.13)
i=1,i6=j
tj − ti

forms the basis of the finite-dimensional linear space. Therefore, the trial functions
can be expressed as
n
X
v(t) = vj pj (t), (8.14)
j=1

where vi ≡ v(ti ) = nj=1 cj pj (ti ) = ci pi (t) = ci because pj (ti ) = δij . These


P

polynomials pj (t) are equal to zero only in a finite number of nodal points and
otherwise are nonzero, and moreover, pj (t) ∈ C ∞ .
The other set of base polynomials which could be chosen is the set of piecewise
polynomials.

8.4 Galerkin method


The Galerkin method can be derived from MWR by choosing wi (t) = ϕ(t) as the
basis of the trial space. Then the weighted average is written as
Z
r(t)ϕi (t)dt = 0. (8.15)

where r(t) is required to be orthogonal to ϕi (x).


The so called Galerkin-Petrov method is constructed by applying another basis.
Example 13 , [2], ♥
Solve the following BVP
à !
d2
Dy ≡ + k 2 y = 0, for t ∈ (0, 1) (8.16)
dt2

184
y(0) = 1 and y(1) = 0.
Choose h = 0.5 and then calculate the solution at three nodes: t = 0, t = 0.5,
t = 1. Hence, the trial function consists of three base functions ϕj (t) of the trial
space , i.e.

3
X
v(t) = vj ϕj (t), (8.17)
j=1

with values v1 and v3 = 0 obtained from the boundary conditions. Therefore, the
only unknown value of v(0.5) correspond to the second node:
Z 1Ã 2 !
d v 2
+ k v ϕ2 (t)dt = 0 (8.18)
0 dt2

Substituting Eq.8.17 into Eq.8.18 results in


Z 1Ã 2 !
d ϕj
Σ3j=1 2
+ k ϕj ϕ2 (t)dt = 0 (8.19)
0 dt2

It can be integrated by parts


Z 1µ
dv dϕ2
dv ¯¯1

Σ3j=1 − 2
+ k vϕj dt +
ϕ2 ¯0 =
0 dt dt dt
1 1 2 2 2 2 1 1 2
µ ¶ µ ¶ µ ¶
v1 + k h + v2 − + k h + v3 + k h =0 (8.20)
h 6 h 3 h 6

8.5 Collocation method


The basic idea of the collocation method consists of the following steps:

• choose the finite-dimensional space of solution,


• choose the number of collocation points , i.e. the number of discrete points
within the domain Ω,
• select the solution satisfying the given BVP at the collocation points {tci }.

The last step can be done by minimizing the residual and enforcing it to assume
the zero value at a finite number of collocation points. Assuming the test functions
wi (t) in the form

wi (t) = a(t − tci ),

185
the residual, defined by Eq. 8.12, is expressed by
Z
r(t)a(t − tci )dt = r(tci ) = 0 (8.21)

where tci is the i-th collocation point.


Example 13 , [2], ♥
Solve the following BVP
à !
d2
Dy ≡ + k 2 y = 0, for t ∈ (0, 1) (8.22)
dt2

y(0) = 1 and y(1) = 0.


Choosing the piecewise cubic Hermitian trial space, the trial function approxima-
tion is expressed as

n
X dvj
v(t) = vj ϕ0j (t) + ϕ1j (t) (8.23)
j=1
dt

Then the second order ODE requires two collocation points per one segment of the
domain called as the element. For example, taking n = 2, gives two nodes located
at ends of the domain, i.e. t = 0 and t = 1. In this case there are 2n unknowns
with totally 2n equations generated from the ODE and two boundary conditions.
The accuracy of calculations of the order O(h4 ) can be achieved by choosing the
collocation points as the Gauss quadrature points:

1 √
tc1 = (3 − 3),
6
c 1 √
t2 = (3 + 3).
6

Then the residuals can be written as


2
X d2 ϕ0j dvj d2 ϕ1j
r(tc1 ) = vj |t=tc1 + |t=tc1
j=1
dt dt dt2
 
2
dvj
+ k2 
X
vj ϕ0j |t=tc1 + ϕ1j |t=tc1  = 0 (8.24)
j=1
dt
2
X d2 ϕ0j dvj d2 ϕ1j
r(tc2 ) = vj |t=tc2 + |t=tc2
j=1
dt dt dt2
 
2
dvj
+ k2 
X
vj ϕ0j |t=tc2 + ϕ1j |t=tc2  = 0
j=1
dt

186
Two Eqs. 8.24 and two boundary conditions compose the system than can be
written in the matrix form
    
1 0 0 0 v1 1
dv1
 b21 b22 b23 b24 
dt
  0 
= , (8.25)
    

b31 b32 b33 b34
 dv2 0
dt
    
0 0 0 1 v2 0

where values corresponding to elements of matrix B are the following

b21 = b34 = −5.657 + 0.998k 2 ,


b22 = −b33 = −3.868 + 0.027k 2 ,
b23 = −b32 = −1.830 − 0.0008k 2 ,
b24 = b31 = 5.657 + 0.002k 2 ,

Unfortunately, the matrix B is nonsymmetric, but we can note very interesting


combination of symmetry and skew-symmetry of elements which does not help to
solve the linear system. The system can be solved by one of methods discussed
earlier. ♠

8.6 Variational formulation of BVP for ODE

8.6.1 Preliminaries
Sobolev spaces

Elementary knowledge about the Sobolev spaces is necessary for understanding


of variational formulation of BVP for ODE and the finite element method. The
following table contains several definitions of norm, metrics, spaces and derivatives
needed for the better understanding of the weak formulation of ODE and PDE
problems.

187
Name Definition
Lebesgue A set which can be assigned a volume is called the
measurable set measurable set.
Lebesgue The Lebesgue norm is based on the Lebesgue integral
norm interpreted as the area under a curve.
Lebesgue The Lebesgue spaces are defined by
spaces Lp (Ω) := {f (t) : kf kLp (Ω) < ∞} for f (t) is a real-
valued functions given on the domain Ω, where
1
kf kLp (Ω) := ( Ω f p dt) p for 1 ≤ p ≤ ∞.
R

Minkowski’s kf + gkLp (Ω) ≤ (kf kLp (Ω) + kgkLp (Ω) ) for 1 ≤ p ≤ ∞


inequality and f, g ∈ Lp (Ω)
Holder’s kf (t)g(t)kL1 (Ω) ≤ kf kLp (Ω) kgkLq (Ω) for 1 ≤ p, q ≤ ∞
inequality such that p1 + 1q = 1, and if f ∈ Lp (Ω) and g ∈ Lq (Ω)
then f g ∈ L1 (Ω)
Cauchy-Schwartz Cauchy-Schwartz inequality is the special case of
inequality the RHolder’s inequality when p = q = 2,
i.e. Ω |f (t)g(t)|dt ≤ kf kL2 (Ω) kgkL2 (Ω)
Norm k · k The norm k · k on a given vector space V is a function
which has the following properties:
1. kvk ≥ 0 for ∀v ∈ 0 and such that kvk = 0 for v = 0,
2. kc · vk = |c| · kvk for ∀c ∈ R and v ∈ V ,
Triangle inequality 3. kv + wk ≤ kvk + kwk for ∀v, w ∈ V .
Metric Distance between two points v, w ∈ V of the vector space
V is defined as d(v, w) = kv − wk.
Complete A metric space is complete when every Cauchy sequence
metric space {vj } ∈ V has a limit v ∈ V .
Normed A Cauchy sequence for normed linear space is convergent
linear space kvj − vk k → 0 for j, k → ∞
Complete normed The normed linear space is complete, if kv − vk k → 0
linear space as j → ∞
Banach space The Banach space is a complete normed linear vector
space V over the real or complex numbers that is
equipped with the norm k · k such that every Cauchy
sequence in V has a limit in V .
e.g Lp (Ω) for 1 ≤ p ≤ ∞ is a Banach space.
Hilbert space A Hilbert space is a real or complex space equipped
with the inner product. The space is complete p with the
norm induced by the product, i.e kf k = (f, f ).
A Hilbert space is always a Banach space but the opposite
conclusion may not be true.
The space L2 (Ω) is an example of infinite-dimensional
Hilbert space.

188
Name Definition
Support The support of a function u ∈ C defined on the domain
Ω ⊂ Rn is the closure of the open set {t : u(t) 6= 0}.
The function u has a compact support if such set is
compact and is the interior of Ω.
Functions with Denote D(Ω) = C0∞ (Ω) ⊂ C ∞ where C ∞ is the set
compact support of functions with compact support in Ω ⊂ Rn ,
Locally integrable The set of locally integrable functions is denoted by
functions L1loc := {f : f ∈ L1 (K)} for compact ∀K ⊂ Ω
Weak derivative The function f ∈ L1loc has a weak derivative Dw αf,
1
provided that a function g ∈ Lloc (Ω) exists and fulfils
the following relation
|α| (α) (t)dt for ∀ϕ ∈ D(Ω),
R R
Ω g(t)ϕ(t)dt = (−1) Ω f (t)ϕ
where ϕ(α) means α derivative of ϕ.
Then Dw α f = g and g is called the weak derivative of f .

Weak derivative Assuming that f is a function in the Lebesgue space,


in L1 ([a, b]) space i.e. f ∈ L1 (Ω) ≡ L1 ([a, b]) for Ω = [a, b],
the weak derivative of f is a function g provided that
Rb Rb
a f (t)ϕ̇(t)dt = − a g(t)ϕ(t)dt for all continuously
differentiable functions ϕ such that ϕ(a) = ϕ(b) = 0.
Examples of weak derivatives are given below.
Sobolev space The Sobolev space is a normed linear space defined
by the following relation
Wpk (Ω) := {f ∈ L1loc (Ω) : kf kWpk (Ω) < ∞}
where f ∈ L1loc (Ω) and the norm in this space is given
by one of the following definitions:
³P ´1
α p p
if 1 ≤ p ≤ ∞ then kf kWpk (Ω) := |α|≤k kDw f kLp (Ω)
if p = ∞ then kf kW∞ α
k (Ω) := max|α|≤k kDw f kL∞ (Ω)

with k ≥ 0. The above is true subject to the existence


of the weak derivatives Dw α f for all |α| ≤ k

The space W2k (Ω) is also called H k (Ω).


Theorem: The Sobolev space Wpk (Ω) is also a Banach space.
Bilinear form A bilinear form, b(·, ·), on a linear space V is a mapping
on linear space b : V × V → R such that each of the maps: v → b(v, w),
and w → b(v, w), is a linear form on V
Real inner A real inner product (·, ·) is a symmetric bilinear form
product on a linear space V that satisfies the following conditions:
(v, v) ≥ 0 for ∀v ∈ V and (v, v) = 0 when v = 0.
Inner-product The inner-product space is a linear space V equipped
space with the inner-product (·, ·). It is denoted by (V, (·, ·)).

189
Name Definition
Examples of V = Rn , (x, y) := ni=1 xi yi ,
P

V = L2 (Ω), Ω ⊆ Rn , (f, g)L2 (Ω) := Ω f (t)g(t)dt,


R
inner-product
spaces V = W2k , Ω ⊆ Rn , (f, g)k := |α|≤k (Dα f, Dα g)L2 (Ω)
P
1 1
Schwartz inequality The Schwartz inequality |(f, g)| ≤ (f, f ) 2 (g, g) 2 holds
in V, (·, ·) in (V, (·, ·)) if and only if f and g are linearly dependent.
Norm in (V, (·, ·)) The norm p in (V, (·, ·)) is defined by the inner-product
as kf k := (f, f ).
Hilbert spaces The inner-product space (V, (·, ·)) is called a Hilbert
space if the associated normed linear space (V, k · k)
exists and is complete.
Examples of V = Rn , (x, y) := ni=1 xi yi ,
P

V = L2 (Ω), Ω ⊆ Rn , (f, g)L2 (Ω) := Ω f (t)g(t)dt,


R
Hilbert
spaces V = W2k , Ω ⊆ Rn , (f, g)k := |α|≤k (Dα f, Dα g)L2 (Ω)
P

Subspace of Assume that V is a Hilbert space. A linear subset W


Hilbert space of V is a subspace of V when any two functions f, g ∈ W
can produce a linear combination f + αg ∈ W with
α ∈ R. Such subspace W is also a Hilbert space.
Example 14 ♥
The so called sign function g : [−1, 1] → [−1, 1] given by

 1,
 if t > 0,
g : t → g(t) = 0, if t = 0,
 −1, if t < 0,

is a weak derivative of the absolute value function f (t) = |t| such that f : [−1, 1] →
[0, 1] that is not differentiable at t = 0. It should be emphasized here that it is not
the only weak derivative that can be assigned to f (t), because any function p(t)
that is equal to g(t) almost everywhere is also a weak derivative for f (t). ♠
Example 15 ♥
Show that the function g(t) given by
(
1, if t < 0,
g(t) :=
−1, if t > 0,

is a weak derivative of the function f (t) = 1 − |t|, for t ∈ Ω = [−1, 1]. Note that
f (t) is continuous at 0.
Solution
Apply the formula given by the first definition of the weak derivative in above table
and break the interval [−1, 1] into two parts where f (t) is smooth and integrate
by parts:

190
Z 1 Z 0 Z 1
f (t)ϕ̇(t)dt = f (t)ϕ̇(t)dt + f (t)ϕ̇(t)dt
−1 −1 0
Z 0 Z 1
= f ϕ|0−1 − (+1)ϕ(t)dt + f ϕ|10 − (−1)ϕ(t)dt
−1 0
Z 1
= − f (t)ϕ(t)dt − f (0+)ϕ(0+) + f (0−)ϕ(0−)
−1
Z 1
= − g(t)ϕ(t)dt.
−1

Sturm-Liouville form of ODE

All second order ODE can be expressed as the LHS of the Sturm-Liouville (S-L)
form called also the self-adjoint form. This observation is very useful because each
BVP based of this kind of equation has a unique solution.
The classical S-L form for the real second order ODE is

d dy(t)
· ¸
− p(t) + q(t)y(t) = λr(t)y(t) (8.26)
dx dt

where q(t) and r(t) ∈ C[a, b], p(t) ∈ C 1 [a, b], y(t) ∈ C 2 [a, b], and moreover
p(t) > 0 and q(t) > 0 on [a, b]. The value λ is not specified by Eq. 8.26, however
finding values of λ for which non-trivial solutions of BVP exist, is a part of the
S-L problem. The above can be written as

Dy(t) = λr(t)y(t), a≤t≤b (8.27)


y(a) = α,
y(b) = β,

where

d dy(t)
· ¸
Dy(t) = − p(t) + q(t)y(t). (8.28)
dx dt

is the linear operator

D : C 2 [a, b] ⇒ C[a, b]

transfers objects from the space C 2 to the space C.

191
Following the first sentence of this section, each BVP for ODE with non-homogeneous
conditions can be written as

Dy(t) = r(t), a≤t≤b (8.29)


y(a) = α,
y(b) = β.

Moreover, it can be transferred to the BVP with homogeneous conditions (both


of them equal to zero) subject to the existence of a function w(t) such that takes
the same boundary values as y(t). Then the difference of these two functions
Z(t) = y(t) − w(t) fulfils the following BVP

DZ(t) = r(t) − Dw(t), a≤t≤b (8.30)


Z(a) = 0,
Z(b) = 0.

The final solution y(t) ∈ C 2 [a, b] = {y ∈ C 2 [a, b], y(a) = α, y(b) = β} of the problem
Eq. 8.29 can be done by solving at first the problem Eq. 8.30 for Z(t) ∈ C02 [a, b] =
{y ∈ C 2 [a, b], y(a) = y(b) = 0}. It is important to note from which spaces these
solutions are selected. Therefore, the problem Eq. 8.29 can be approximated by
the problem Eq. 8.30 replacing Z(t) by ŷ(t), i.e.

Dŷ(t) = r(t), a≤t≤b (8.31)


ŷ(a) = 0,
ŷ(b) = 0.

Variational formulation of BVP for ODE

If ŷ solves the problem Eq. 8.31, then the first step to convert the problem into its
variational form is to select any smooth function v(t) which satisfies the homoge-
neous boundary conditions, i.e. v(a) = 0 and v(b) = 0. The second step is to refer
to one of quadratic functionals [11] defined in Sobolev spaces H 1 (a, b), e.g. inner
product. Suppose that Dŷ(t) is expressed in simpler form: Dŷ(t) = ÿ(t).ˆ Then
the problem expressed by Eq 8.31 and boundary conditions can be written as
Z b Z b
r(t)v(t)dt = ˆ
ÿ(t)v(t)dt. (8.32)
a a

Integration of the RHS of Eq. 8.32 gives


Z b
ˆ
RHS = ẏ(t)v(t)|b
a−
ˆ v̇(t)dt
ẏ(t)
a
Z b
= − ˆ v̇(t)dt
ẏ(t) (8.33)
a
= ϕ(ŷ, v)

192
Both sides of Eq. 8.32 are the inner products in a Hilbert space.
The third step is to replace the infinite dimensional linear problem (IDLP)
Z b
Find ŷ ∈ H01 such that ∀v ∈ H01 , −ϕ(ŷ) = r(t)v(t)dt (8.34)
a

by a finite dimensional problem (FDP)


Z b
Find ŷ ∈ H01 such that ∀v ∈ V, −ϕ(ŷ) = r(t)v(t)dt (8.35)
a

where V is a finite dimensional subspace of H01 . The subspace V can be chosen as


a space of piecewise linear functions.
Example 16 ♥
Consider the two-point boundary value problem

Ly = −ÿ + bẏ + cy = f (t) for 0 < t < 1, (8.36)


y(0) = y0 ,
y(1) = y1 ,

where: b, c ∈ R with c ≥ 0, f (t) ∈ C[0, 1], and y0 , y1 ∈ R. The weak formulation


can be introduced at first assuming the following relations:

Y = {y(t) ∈ H 1 (0, 1) with y(0) = y0 , y(1) = y1 } (8.37)


1
V = Ĥ (0, 1),

where H 1 (0, 1) and Ĥ 1 (0, 1) are the Sobolev spaces specified as follows:

H 1 (0, 1) = {y(t) ∈ L2 (0, 1) with generalized ẏ(t) ∈ L2 (0, 1)},


1 1
Ĥ (0, 1) = {y(t) ∈ H (0, 1) such that y(0) = y(1) = 0.} (8.38)

These spaces provide the unique solution for the weak formulation of the second
order BVP.
The weak form of Eq. 8.37 can be expressed as
Find y ∈ Y such that

a(y, v) = (f, v), ∀v ∈ V, (8.39)

where
Z 1
a(y, v) = (ẏ v̇ + bẏv + cyv)dt (8.40)
0
Z 1
(f, v) = f vdt.
0

193
8.7 Reyleigh-Ritz method
Our idea for this section is to follow the magnificent paper by R. Courant published
in 1943 [11] with the presentation of the Rayleigh-Ritz (R-R) method. Courant’s
paper is fundamental for the development of the finite element method called by
him as the finite difference method with some generalizations. The paper was
one of the fundamental papers for the development of applied mathematics and
computational mechanics.

8.7.1 Theory and the principle


Suppose that the minimum d of an integral expression or any variational expression
L(y) is seeking. The searching procedure can be initiated with the minimizing
sequence φ1 , φ2 , . . . , φn which is admissible for the variational problem

limn→∞ L(φn ) = d, (8.41)

where d is the lower bound of the functional L(φi ). The problem lies in the
construction of the minimization sequence and the recipe for such construction is
given by the Ritz procedure:

• start with an arbitrary chosen system of so called coordinate functions:


ω1 , ω2 , . . . , ωn , . . . , ωz , which fulfils the following conditions:

1. Any linear combination of them is admissible in the variational prob-


lem, i.e.
φn = a1 ω1 + a2 ω2 + . . . + an ωn (8.42)
2. Any admissible function φi may be approximated with any accuracy
by a linear combination of coordinate functions. Similarly, any deriva-
tive of φi may be approximated by a linear combination of coordinate
functions derivatives.

• For n sufficiently large and appropriate choice of coefficients a1 , a2 , . . . , an ,


the admissible function φn , which differs arbitrary little from d can be find. It
means that a minimizing sequence can be also find as the linear combination
of the coordinate functions.

• Therefore, to construct required minimizing sequence, the coefficients ai


should be chosen in the following manner:

1. Propose any function φn given by 8.42 and substitute it in the varia-


tional problem.

194
2. Then L(φn ) becomes a function F (a1 , a2 , . . . , an ) of n parameters ai
that can be evaluated form the minimum problem
L(φn ) = F (a1 , a2 , . . . , an ) = min, (8.43)
3. Because L(φn ) is quadratic or bilinear functional, Eq.8.43 leads to a
system of n linear equations for n parameters ai and therefore the
minimizing sequence φi is found.

Courant made the important remark regarding the convergence of the minimizing
sequence:

• While the convergence of L(φi ) to d is assured, it is associated with the


convergence of φi to u which is the true solution of the original minimization
problem or, at least, the derivatives of φi converge to the corresponding
derivatives of u.

• The convergence of two sequences: φ1 , φ2 , . . . , φn , . . . and the sequence of


derivatives of φi , is improved if the order of occurring derivatives becomes
higher.

• The convergence becomes worse when the number of independent variables


increases.

The better convergence in the R-R method can be assured by modifying the orig-
inal variational problem by adding higher order terms which vanish for the actual
solution u. From the theoretical point of view, the R-R method consists in the
construction of the minimizing sequence but the main difficulty is to find suitable
coordinate functions and to estimate the accuracy of the final result. The functions
should be chosen considering two objectives:

• ai terms of Eq. 8.43 situated on the main diagonal are dominating,

• the number of accounted terms should be kept small.

The completeness of the sequence φi is not important because only few of the
coordinate functions are accounted in time. To achieve the successful evaluation
of u the initial function should be fairly good approximation of u and in addition,
the functions φi should be sufficiently different so that by increasing number of
terms the quality of approximation could be increased. The choice of polynomials
as coordinate functions leads to better results.
Referring that our original problem can be written in the form: L(u) = f , very
useful method for the selection of coordinate functions consists of the following
idea:

• start with choosing the function ω1 ,

195
• then define ω2 = L(ω1 ),

• and proceed further on with this pattern ω3 = L(ω2 ) = LL(ω1 ), ω4 =


L()ω3 = LLL(ω1 ).

This idea results in the system of equations for ai comparatively simple. Unfortu-
nately, this selection of functions lead to some complications at boundaries because
of higher derivatives.

8.7.2 Boundary conditions and R-R method objections


The approximation by the R-R method is quite good for the rigid boundary con-
ditions and few admissible coordinate functions would give a solution close to the
true one. Unfortunately, in general the rigid boundary conditions preclude the
choice of simple coordinate function. The situation is different in the case of free
and natural boundary conditions, when the boundary conditions need not to be
stipulate in advance. Generally, polynomials with undetermined coefficients can be
used as φi functions. However, the reasonable accuracy of solution requires many
more terms. Therefore the chosen functions should satisfy the natural boundary
conditions in advance. Nevertheless, the advantage of φi as polynomials might be
decisive.
Courant noticed that rigid boundaries can be considered as a limiting case of free
boundaries.
The R-R procedure does not contain a principle for estimating the accuracy of the
approximation and this is a weak point of this method. The another disadvantage
is related selection of selection of the coordinate functions that requires tedious
computations.

196

You might also like