42 Slovak international scientific journal # 81, (2024)
A FINITE DIFFERENCE TECHNIQUE FOR THE SOLUTION OF THIRD ORDER BOUNDARY
VALUE PROBLEMS IN ORDINARY DIFFERENTIAL EQUATIONS
Ramani J.V.,
Department of Mathematics, Dyal Singh College (University of Delhi),
Lodhi Road, New Delhi, India
Dinesh Kumar
Department of Mathematics, Dyal Singh College (University of Delhi),
Lodhi Road, New Delhi, India
Abstract
In this paper, we propose an efficient finite difference method to solve third order boundary value problems.
Analysis proves that the proposed method have at least quadratic convergence. Numerical results confirm the
accuracy and efficiency of the proposed method.
Keywords: Boundary Value Problems, Finite Difference, Taylor series, Row Sum Norm, Maximum Error.
1. Introduction
Third-order differential equations arise in many modelling problems like aeroelasticity, beam deflection the-
ory, electromagnetic waves, theory of thin film flow.
In this paper, we study an effective numerical technique based on finite differences to solve third order bound-
ary value problems(BVPs) of the following
type:
𝑢′′′ = 𝑓(𝑥, 𝑢), 𝑎 ≤ 𝑥 ≤ 𝑏 (1.1)
subject to the boundary conditions
𝑎+𝑏
𝑢′′ (𝑎) = 𝛼, 𝑢 ( ) = 𝛽, 𝑢′ (𝑏) = 𝛾 (1.2)
2
where the 𝛼, 𝛽 and 𝛾 are arbitrary constants.
The discussion on the existence, uniqueness and convergence of the solution of problem 1.1 can be found in
the literature [1], [12], [3], [6]. We wont mention the conditions on the existence and uniqueness of the solution to
problem 1.1.
We assume the existence and uniqueness of the solution to problem 1.1. We also assume that problem 1.1 is
well posed.
This article is arranged in the following order. In section 2, we propose the finite difference method. In section
3, we discuss the convergence of the proposed method. In section 4, we illustrate the method with examples and
finally in section 5 we present the performance of our proposed method.
2. The Difference method
To find an approximation to the solution of the problem 1.1, we discretize the domain [a, b] into 𝑁 equal
𝑏−𝑎
subintervals each of size ℎ = :
𝑁
𝑎 = 𝑥0 < 𝑥1 < 𝑥2 < ⋯ 𝑥𝑁−1 < 𝑥𝑁 = 𝑏 (2.1)
where the nodes are given by 𝑥𝑖 = 𝑎 + 𝑖ℎ, 𝑖 = 0,1, … , 𝑁, where 𝑁 is an even positive integer.
We want to determine the numerical approximation of the true solution 𝑢(𝑥) of the problem 1.1 at the nodal
point
𝑥𝑖 , 𝑖 = 1,2, … , 𝑁.
Let 𝑢𝑖 and 𝑓𝑖 denote the numerical approximations of 𝑢(𝑥) and 𝑓(𝑥, 𝑢(𝑥)) at 𝑥 = 𝑥𝑖 , 𝑖 = 0, 1, 2, … , 𝑁 which
allows us to write the boundary value problem 1.1 at node 𝑥 = 𝑥𝑖 as written as
𝑢𝑖′′′ = 𝑓𝑖 , 𝑎 ≤ 𝑥𝑖 ≤ 𝑏 (2.2)
subject to the boundary conditions
𝑢0′′ = 𝛼, 𝑢𝑁 = 𝛽, 𝑢𝑁 ′
= 𝛾, 𝑁 even
2
We define the nodes as
ℎ
𝑥𝑖±1 = 𝑥𝑖 ± , 𝑖 = 1,2, … , 𝑁 − 1
2 2
and denote the solution of the problem 2.2 at 𝑥𝑖±1 by
2
𝑢𝑖±1 .
2
Using the method of undetermined coefficients and Taylor’s series expansion [7, 8, 9], we get the following
scheme:
Slovak international scientific journal # 81, (2024) 43
′′ ℎ3 ′′′ ′′′
𝑢𝑖−1 − 2𝑢𝑖+1 + 𝑢𝑖+3 = ℎ2 𝑢𝑖−1 + (25𝑢𝑖− 1 + 11𝑢 1 ) + 𝑇𝑖 , 𝑖 = 1
𝑖+
2 2 2 24 2 2
ℎ3 ′′′ ′′′ 𝑁
−𝑢𝑖−3 + 3𝑢𝑖−1 − 3𝑢𝑖+1 + 𝑢𝑖+3 = (𝑢𝑖− 1 + 𝑢𝑖+ 1) + 𝑇𝑖 , 1 < 𝑖 <
2 2 2 2 2 2 2
2
ℎ3 ′′′ ′′′ 𝑁
−𝑢𝑖−3 + 6𝑢𝑖−1 + 3𝑢𝑖+1 = 8𝑢𝑖 − (𝑢𝑖− 3 − 9𝑢 1 ) + 𝑇𝑖 , 𝑖 =
𝑖−
(2.3)
2 2 2 16 2 2
2
ℎ3 ′′′ ′′′ 𝑁
−𝑢𝑖−5 + 3𝑢𝑖−3 − 3𝑢𝑖−1 + 𝑢𝑖+1 = (𝑢𝑖− 3 + 𝑢 1 ) + 𝑇𝑖 ,
𝑖−
<𝑖<𝑁
2 2 2 2 2 2 2
2
ℎ3 ′′′ ′′′
𝑢𝑖−5 − 3𝑢𝑖−3 + 2𝑢𝑖−1 = ℎ𝑢𝑖′ − (25𝑢𝑖− 3 + 21𝑢 1 ) + 𝑇𝑖 , 𝑖 = 𝑁
𝑖−
2 2 2 48 2 2
where
𝑇𝑖 , 𝑖 = 1, 2, … , 𝑁
is the truncation error.
After neglecting the truncation errors 𝑇𝑖 at the nodes 𝑥𝑖−1 , 𝑖 = 1,2, … , 𝑁, in 2.3, we obtain a system of 𝑁 × 𝑁
2
equations in the unknowns 𝑢𝑖−1 , which may be linear or non-linear according as 𝑓(𝑥, 𝑢) is linear or non-linear.
2
Using the values 𝑢𝑖−1 , we compute the values 𝑢𝑖 , 𝑖 = 0, 1, … , 𝑁 according to the second-order approximation
2
3ℎ2 ′′ 1
𝑢𝑗−1 − (𝑢𝑗+1 − 3𝑢𝑗−1 ) if 𝑗 = 1
8 2 2 2
1 𝑁 𝑁
(𝑢𝑗−3 + 𝑢𝑗−1 ) if 𝑗 = 2, … , − 1, + 3, … , 𝑁
2 2 2 2 2
𝑁
𝑢𝑗−1 = (2𝑢𝑗−1 − 𝑢𝑗 ) if 𝑗 = (2.4)
2 2
𝑁
(2𝑢𝑗−3 − 𝑢𝑗−2 ) if 𝑗 = +2
2 2
ℎ ′
(𝑢𝑗−3 + 𝑢𝑗−1 ) if 𝑗 = 𝑁 + 1
{ 2 2
3. Convergence Analysis
Let 𝑈𝑖−1 , 𝑖 = 1, … , 𝑁, denote the true solution of the problem 1.1 at the 𝑥𝑖−1 , 𝑖 = 1, … , 𝑁 and let 𝐔 be the
2 2
column vector
𝐔 = [𝑈𝑖−1 ] (3.1)
2
Also let, 𝐮 be the column vector consisting of the approximations 𝑢𝑖−1 at the nodes 𝑥𝑖−1 , 𝑖 = 1, … , 𝑁 ,
2 2
𝐮 = [𝑢𝑖−1 ] (3.2)
2
and the errors at the nodes 𝑥𝑖−1 , 𝑖 = 1, … , 𝑁 be denoted by
2
𝜖𝑖−1 = 𝑈𝑖−1 − 𝑢𝑖−1 , 𝑖 = 1, … , 𝑁 (3.3)
2 2 2
and the error vector in column form be denoted by
𝐞 = [𝜖𝑖−1 ] = [𝑈𝑖−1 − 𝑢𝑖−1 ] (3.4)
2 2 2
Then, we have the following equations
𝐀𝐔 = 𝐛 + 𝐭 (3.5)
𝐀𝐮 = 𝐛 (3.6)
where the 𝑁 × 𝑁 matrix 𝐀 and column vectors 𝐛 and 𝐭 are given by
1 −2 1 0 … 0
−1 3 −3 1 0 …
0 −1 3 −3 1 0 …
0 0 −1 3 −3 1 0 …
𝐀= 0 0 0 −1 6 3 0 … (3.7)
0 0 0 −1 3 −3 1 0 …
⋮ ⋱
⋱
… 0 −1 3 −3 1
[0 … 0 0 1 −3 2 ]𝑁×𝑁
𝐛 = [𝑏𝑖 ] (3.8)
𝐭 = [𝑇𝑖 ] (3.9)
44 Slovak international scientific journal # 81, (2024)
and the 𝑏𝑖 ’s and 𝑇𝑖 ’s are given by
ℎ3
ℎ2 𝛼 + (25𝑓1 + 11𝑓3 ) if 𝑖 = 1
24 2 2
ℎ3
(𝑓1 + 𝑓3 ) if 𝑖 = 2
2 2 2
⋮
ℎ3 𝑁
𝑏𝑖 = 8𝛽 − (𝑓𝑁−3 − 9𝑓𝑁−1 ) 𝑖= (3.10)
16 2 2 2 2 2
ℎ3 𝑁
(𝑓𝑁−1 + 𝑓𝑁+1 ) 𝑖= +1
2 2 2 2 2 2
⋮
ℎ3
ℎ𝛾 + (25𝑓𝑁−3 + 21𝑓𝑁−1 ) if 𝑖 = 𝑁
{ 48 2 2
and
1 (5)
ℎ5 𝑢 1 if 𝑖 = 1
24 𝑖−
2
1 (7)
ℎ7 𝑢 1 if 𝑖 = 2
240 𝑖−
2
⋮
1 (5) 𝑁
𝑇𝑖 = ℎ5 𝑢 1 if 𝑖 = (3.11)
16 𝑖− 2
2
1 (7) 𝑁
ℎ7 𝑢 1 if 𝑖 = +1
240 𝑖− 2
2
⋮
31 (5)
ℎ5 𝑢 1 if 𝑖 = 𝑁
{1920 𝑖−
2
The matrix 𝐀 is nonsingular [4, 5] and its inverse 𝐀−1 = 𝐁 = [𝑏𝑖𝑗 ] is given by
1
if 𝑖 = 𝑀, 𝑖 = 1, … , 𝑁
8
(𝑁−1)
− if 𝑖 = 1, 𝑗 = 𝑁
2
𝑏𝑖𝑗 = (𝑁−𝑗+1)(𝑁+1) (3.12)
if 𝑖 = 1, 𝑗 = 𝑁 − 𝑀 + 1, 𝑁 − 𝑀 + 2, … , 𝑁 − 1
2
(2𝑁2 +2𝑁−7)
if 𝑖 = 1, 𝑗 = 𝑀 − 1
8
{ ⋮
𝑁
where = , and
2
8𝑁3 −3𝑁2 −11𝑁−6
‖𝐀−1 ‖ ≤ (3.13)
48
Here ‖𝐀−1 ‖ denotes the maximum row sum norm of 𝐀−1 .
Now, for every even integer 𝑁 ≥ 4,
𝑁3
‖𝐀−1 ‖ ≤ (3.14)
6
From equations 3.5 and 3.6, we have
𝐀𝐞 = 𝐭 (3.15)
which gives
𝐞 = 𝐀−𝟏 𝐭 (3.16)
Therefore,
‖𝐞‖ ≤ ‖𝐀−𝟏 ‖ ‖𝐭‖ (3.17)
where ‖𝐭‖ is the maximum norm of 𝐭.
If we let,
𝑀 = max |𝑢(5) (𝑥)| (3.18)
𝑎≤𝑥≤𝑏
Then
‖𝐭‖ ≤ 𝑀ℎ5 (3.19)
Hence
𝑁3 𝑀ℎ5 (𝑏−𝑎)3 𝑀ℎ5 𝑀(𝑏−𝑎)3
‖𝐞‖ ≤ = = ℎ2 (3.20)
6 6ℎ3 6
which shows that the our proposed scheme 2.3, 2.4 has second order convergence.
Slovak international scientific journal # 81, (2024) 45
4. Numerical Examples
The following problems illustrate the performance of our method. We compute the maximum absolute error
MAE in the true solution u(x), namely:
MAE = max |𝑢(𝑥𝑖 ) − 𝑢𝑖 |
0≤𝑖≤𝑁
All the computations were performed on Ubuntu 20.04.4 LTS GNU linux operating system with IDLE 3.8.10
running Python version 3.8.10 on Intel® Corei5-9400 CPU @ 2.90GHz × 6 PC.
Example 4.1. Consider the linear model problem in [10] given by:
𝑢′′′ − 𝑥𝑢(𝑥) = (𝑥 3 − 2𝑥 2 − 5𝑥 − 3) exp(𝑥) , 0 ≤ 𝑥 ≤ 1 (4.1)
with the boundary conditions
1 1 1
𝑢′′ (0) = 0, 𝑢( ) = exp( ), 𝑢′ (1) = −exp(1) (4.2)
2 4 2
with the exact solution
𝑢(𝑥) = 𝑥(1 − 𝑥)exp(𝑥) (4.3)
The MAE computed by method 2.3 for different values of N are given below:
N MAE
8 0.02033525883171955
16 0.00519953085188235
32 0.0013138297770312474
64 0.0003301567064563117
128 8.274841440109558e-05
256 2.0713042321846876e-05
512 5.181456980633825e-06
1024 1.295625032227913e-06
2048 3.2373742114572956e-07
4096 8.399874251030373e-08
Example 4.2. Consider the linear model problem in [11] given by:
𝑢′′′ + 𝑢(𝑥) = (𝑥 2 − 6𝑥 − 1) sin(𝑥) + (7 − 𝑥 2 ) cos 𝑥 , 0 ≤ 𝑥 ≤ 1, (4.4)
with the boundary conditions
1 3 1
𝑢′′ (0) = 0, 𝑢 ( ) = − sin ( ) , 𝑢′ (1) = 2sin(1) (4.5)
2 4 2
with the exact solution
𝑢(𝑥) = (𝑥 2 − 1)sin(𝑥) (4.6)
The MAE computed by method 2.3 for different values of N are given below:
N MAE
8 0.01309914189714495
16 0.00313906340317055
32 0.0007675591677256399
64 0.00018974008936684106
128 4.716684442868102e-05
256 1.1758236153014412e-05
512 2.9353782288188413e-06
1024 7.333225403582944e-07
2048 1.8326568407278643e-07
4096 4.58072807463239e-08
Example 4.3. Consider the nonlinear model problem in [12] given by:
𝑢′′′ + 2exp(−3𝑢(𝑥)) = 4(1 + 𝑥)−3 , 0 ≤ 𝑥 ≤ 1, (4.7)
with the boundary conditions
1 3 1
𝑢′′ (0) = −1, 𝑢( ) = ln( ), 𝑢′ (1) = (4.8)
2 2 2
with the exact solution
𝑢(𝑥) = ln(1 + 𝑥) (4.9)
The MAE computed by method 2.3 for different values of N are given below:
46 Slovak international scientific journal # 81, (2024)
N MAE
8 0.001908417848461852
16 0.0004972795863560087
32 0.0001244093908235669
64 3.089767560763429e-05
128 7.68280713981783e-06
256 1.91441954876595e-06
512 4.778146070493795e-07
1024 1.1958167929156972e-07
2048 3.036098347931242e-08
4096 7.3120751675759266e-09
7. P. K. Pandey. The numerical solution of third
5. Conclusion order differential equation containing the first deriva-
In this paper we have proposed a numerical tive, Neural Parallel and Scientific Comp., Vol. 13,
method to solve third order boundary value problems 297–304, (2005).
having quadratic convergence. We have estimated the 8. P. K. Pandey, An efficient numerical method for
error involved. We have also given several numerical the solution of third order boundary value problem in
examples which confirms our claim. ordinary differential equations, Int. J. Computing Sci-
ence and Mathematics, Vol.9, No. 2, 171-180, (2018).
References 9. P. K. Pandey, The Numerical Solution Of Three
1. Ravi P. Agarwal, Boundary value problems for Point Third Order Boundary Value Problems In Odes,
higher order differential equations, World-Scientific, Journal of Science and Arts, Year 20, No. 3(52), 529-
Singapore, (1986). 536, (2020).
2. Gregus M., Third order linear differential equa- 10. Calgar, H. N., Calgar, S. H. and Twizell, E. H.,
tions, Series: Mathematics and its Applications, The Numerical Solution of Third-Order Boundary-
Springer Netherlands, Vol. 22, (1987). Value Problems with Fourth-Degree B-Spline Func-
3. Gupta C. P. and Lakshmikantham V., Existence tions, Intern. J. Computer Math., Vol. 71, 373-381
and uniqueness theorems for a third-order threepoint (1999).
boundary value problem, Nonlinear Analysis: Theory, 11. El-Danaf, T. S., Quartic Nonpolynomial
Methods and Applications, Vol. 16, No. 11, pp.949– Spline Solutions for Third Order Two-Point Boundary
957, (1991). Value Problem, World Academy of Science, Engineer-
4. M. K. Jain, Numerical Solution of Differential ing and Technology, International Journal of Mathe-
Equations, New Age International, (2018). matical, Computational, Physical, Electrical and Com-
5. Horn, R. A. and Johnson C. R., Matrix Analysis, puter Engineering 2(9), 637-640 (2008).
Cambridge University Press, New York, NY 10011, 12. Ghazala, A., Muhammad, T., Shahid, S. S. and
USA, (1990). Hamood, U. R., Solution of a Linear Third order Multi-
6. Murty, K.N. and Rao, Y.S., A theory for exist- Point Boundary Value Problem using RKM, British
ence and uniqueness of solutions to three-point bound- Journal of Mathematics and Computer Science 3(2):
ary value problems, Journal of Mathematical Analysis 180-194 (2013).
and Applications, Vol. 167, No. 1, 43–48, (1992).