1. SOLUTION OF BOUNDARY VALUE PROBLEMS IN ORDINARY DIFFERENTIAL EQUATIONS
Consider a second order differential equation 𝐹 𝑥, 𝑦, 𝑦′, 𝑦′′ = 0.
Its general solution contains two arbitrary constants. To determine these constants we need to
prescribe two conditions.
The conditions are called initial conditions if 𝑦 and 𝑦′ are specified at a certain value of 𝑥.
The differential equation together with the initial conditions is called the initial value problem.
If 𝑦 or 𝑦′ or their combination is prescribed at two different values of 𝑥, then the conditions
are called boundary conditions.
The differential equation together with the boundary conditions is called a boundary value
problem.
1
2. The solution of an initial value problem, in general, exists and is unique, but the solution of a
boundary value problem may exist or may not.
The following simple examples will illustrate this-
(1) 𝒚′′ + 𝒚 = 𝟎, 𝒚 𝟎 = 𝟎, 𝒚 𝝅 = 𝟏
Auxiliary equation, 𝑚2 + 1 = 0 ⇒ 𝑚 = ±𝑖
The general solution of DF is, 𝑦 = 𝐴 𝑐𝑜𝑠𝑥 + 𝐵𝑠𝑖𝑛𝑥
𝑦 0 = 0 ⇒ A = 0; solution is 𝑦 = 𝐵𝑠𝑖𝑛𝑥
𝑦(𝜋) = 1 ⇒ 1 = 𝐵 0 , which is not possible.
Hence the boundary value problem does not have a solution.
2
3. 𝟐 𝒚′′ + 𝒚 = 𝟎, 𝒚 𝟎 = 𝟎, 𝒚 𝝅 = 𝟎
The general solution of DF is, 𝑦 = 𝐴𝑐𝑜𝑠𝑥 + 𝐵𝑠𝑖𝑛𝑥
𝑦 0 = 0 ⇒ A = 0; and solution is 𝑦 = 𝐵𝑠𝑖𝑛𝑥
𝑦(𝜋) = 1 ⇒ 0 = 𝐵 0 .
Here 𝐴 = 0 𝑎𝑛𝑑 𝐵 is undeterminable.
Hence the boundary value problem has an infinite number of solutions, 𝒚 = 𝑩𝒔𝒊𝒏𝒙, Where 𝐵
is an arbitrary constant.
3
4. 𝟑 𝒚′′ + 𝒚 = 𝟎, 𝒚 𝟎 = 𝟎, 𝒚 𝝅/𝟐 = 𝟏
The general solution of DF is, 𝑦 = 𝐴𝑐𝑜𝑠𝑥 + 𝐵𝑠𝑖𝑛𝑥
𝑦 0 = 0 ⇒ A = 0; and solution is 𝑦 = 𝐵𝑠𝑖𝑛𝑥
𝑦
𝜋
2
= 1 ⇒ 𝐵 = 1.
Hence the boundary value problem has the unique solutios, 𝒚 = 𝒔𝒊𝒏𝒙
4
5. To solve the boundary value problem of the form,
𝑝 𝑥 𝑦′′ + 𝑞 𝑥 𝑦′ + 𝑟 𝑥 𝑦 = 𝑓(𝑥) with boundary conditions 𝑦 𝑎 = 𝑦𝑎 and 𝑦 𝑏 = 𝑦𝑏,
we use finite difference method.
Method of finite differences:
Divide the interval 𝑎, 𝑏 into 𝑛 sub-intervals, each of length ℎ =
𝑏−𝑎
𝑛
.
Let 𝑥𝑖 = 𝑎 + 𝑖ℎ, 𝑖 = 0, 1, 2, … , 𝑛, and let us use the following notation:-
𝑦 𝑥𝑖 = 𝑦𝑖, 𝑦′ 𝑥𝑖 = 𝑦𝑖
′
, 𝑦′′ 𝑥𝑖 = 𝑦𝑖
′′
.
𝑝 𝑥𝑖 = 𝑝𝑖, 𝑞 𝑥𝑖 = 𝑞𝑖, 𝑟 𝑥𝑖 = 𝑟𝑖, 𝑓 𝑥𝑖 = 𝑓𝑖
𝑥0 = 𝑎 𝑥1 𝑥2 𝑥𝑖 𝑥𝑖+1 𝑥𝑛−1 𝑥𝑛 = b
5
6. By Taylor’s series expansion,
𝑦𝑖+1 = 𝑦 𝑥𝑖+1 = 𝑦 𝑥𝑖 + ℎ = 𝑦𝑖 + ℎ𝑦𝑖
′
+
ℎ2
2!
𝑦𝑖
′′
+
ℎ3
3!
𝑦𝑖
′′′
+ … ______ (1)
𝑦𝑖−1 = 𝑦 𝑥𝑖−1 = 𝑦 𝑥𝑖 − ℎ = 𝑦𝑖 − ℎ𝑦𝑖
′
+
ℎ2
2!
𝑦𝑖
′′
−
ℎ3
3!
𝑦𝑖
′′′
+ … ______ (2)
Eqn(1) gives 𝑦′
𝑥𝑖 =
1
ℎ
𝑦 𝑥𝑖 + ℎ − 𝑦 𝑥𝑖 −
ℎ
2
𝑦′′
𝑥𝑖 − ⋯
i.e., 𝑦′
𝑥𝑖 =
1
ℎ
𝑦 𝑥𝑖 + ℎ − 𝑦 𝑥𝑖 + 𝑂 ℎ
which is the forward difference approximation of 𝑦′(𝑥𝑖) with an error of the order ℎ.
Similarly eqn(2) gives 𝑦′
𝑥𝑖 =
1
ℎ
𝑦 𝑥𝑖 − 𝑦 𝑥𝑖 − ℎ + 𝑂 ℎ
which is the backward difference approximation of 𝑦′(𝑥𝑖) with an error of the order ℎ.
6
7. Eqn(1)-Eqn(2) ⟹ 𝑦′ 𝑥𝑖 =
1
2ℎ
𝑦 𝑥𝑖 + ℎ − 𝑦 𝑥𝑖 − ℎ + 𝑂(ℎ2)
which is the central-difference approximation of 𝑦′(𝑥𝑖) with an error of the order ℎ2
.
Clearly this central difference approximation to 𝑦′(𝑥𝑖) is better than the forward or
backward difference approximations and hence should be preferred.
Yielding approximation,
𝒚𝒊
′
=
𝒚𝒊+𝟏−𝒚𝒊−𝟏
𝟐𝒉
with an error of the order ℎ2.
(3)
7
8. Eqn(1)+eqn(2) ⟹ 𝑦𝑖+1 + 𝑦𝑖−1 = 2𝑦𝑖 + ℎ2
𝑦𝑖
′′
+
ℎ4
12
𝑦𝑖
′′′′
+ ⋯ ,
We get approximation as
𝒚𝒊
′′
=
𝒚𝒊+𝟏−𝟐𝒚𝒊+𝒚𝒊−𝟏
𝒉𝟐 with an error of the order ℎ2
(4)
which is the central difference approximation of 𝑦′′ 𝑥𝑖 .
In finite difference method 𝑦′ and 𝑦′′ are replaced by the finite differences using eqns (3) and
(4).
8
9. Consider the two cases that arise while solving linear boundary value problems.
Case (1): The boundary conditions dot not involve 𝒚′
To solve the boundary value problem (BVP),
𝑝 𝑥 𝑦′′ + 𝑞 𝑥 𝑦′ + 𝑟 𝑥 𝑦 = 𝑓(𝑥) with boundary conditions 𝑦 𝑎 = 𝑦𝑎 and 𝑦 𝑏 = 𝑦𝑏.
We set 𝑥 = 𝑥𝑖 in BVP and replace 𝑦𝑖′ and 𝑦𝑖′′ by the approximations eqn(3) and (4) and we get
the system of equations
𝑝𝑖 𝑦𝑖
′′
+ 𝑞𝑖 𝑦𝑖
′
+ 𝑟𝑖 𝑦𝑖 = 𝑓𝑖
⟹ 𝑝𝑖
𝑦𝑖+1−2𝑦𝑖+𝑦𝑖−1
ℎ2 + 𝑞𝑖
𝑦𝑖+1−𝑦𝑖−1
2ℎ
+ 𝑟𝑖𝑦𝑖 = 𝑓𝑖 _______ (5)
with 𝑖 = 1, 2, 3, … , 𝑛 − 1 for the 𝑛 − 1 unknowns 𝑦1, 𝑦2, … , 𝑦𝑛−1.
9
10. The system (5) involves 𝑦0 for 𝑖 = 1 and 𝑦𝑛 for 𝑖 = 𝑛 − 1. However these are known from the
boundary conditions as 𝑦0 = 𝑦 𝑎 = 𝑦𝑎 and 𝑦𝑛 = 𝑦 𝑏 = 𝑦𝑏.
Examples:
1) Solve 𝒙 𝒚′′ + 𝒚 =0, 𝒚 𝟏 = 𝟏, 𝒚 𝟐 = 𝟐 with 𝒉 = 𝟎. 𝟐𝟓 by finite difference method.
Answer: With ℎ = 0.25, 𝑛 = 4
i.e., Divide the interval [1, 2] into 4 equal parts
We find the unknowns 𝑦1, 𝑦2, 𝑦3 from the system,
𝑥𝑖
𝑦𝑖+1 − 2𝑦𝑖 + 𝑦𝑖−1
ℎ2
+ 𝑦𝑖 = 0
𝑥0 = 1 𝑥1 = 1.25 𝑥2 = 1.5 𝑥3 = 1.75 𝑥4 = 2
𝑦0 = 1 𝑦4 = 2
𝑦1 =? 𝑦2 =? 𝑦3 =?
10