Next Article in Journal
Machine Learning-Based Detection Technique for NDT in Industrial Manufacturing
Previous Article in Journal
A Multidimensional Principal Component Analysis via the C-Product Golub–Kahan–SVD for Classification and Face Recognition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

New Cubic B-Spline Approximation for Solving Linear Two-Point Boundary-Value Problems

by
Busyra Latif
1,2,
Samsul Ariffin Abdul Karim
3 and
Ishak Hashim
2,*
1
Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA, Cawangan Negeri Sembilan, Kampus Seremban, Seremban 70300, Negeri Sembilan, Malaysia
2
Department of Mathematical Sciences, Faculty of Science & Technology, Universiti Kebangsaan Malaysia, UKM, Bangi 43600, Selangor, Malaysia
3
Fundamental and Applied Sciences Department and Centre for Systems Engineering (CSE), Institute of Autonomous System, Universiti Teknologi PETRONAS, Bandar Seri Iskandar, Seri Iskandar 32610, Perak DR, Malaysia
*
Author to whom correspondence should be addressed.
Mathematics 2021, 9(11), 1250; https://doi.org/10.3390/math9111250 (registering DOI)
Submission received: 26 April 2021 / Revised: 17 May 2021 / Accepted: 27 May 2021 / Published: 29 May 2021

Abstract

:
In this study, we introduce a new cubic B-spline (CBS) approximation method to solve linear two-point boundary value problems (BVPs). This method is based on cubic B-spline basis functions with a new approximation for the second-order derivative. The theoretical new approximation for a second-order derivative and the error analysis have been successfully derived. We found that the second-order new approximation was O ( h 3 ) accurate. By using this new second-order approximation, the proposed method was O ( h 5 ) accurate. Four numerical problems consisting of linear ordinary differential equations and trigonometric equations with different step sizes were performed to validate the accuracy of the proposed methods. The numerical results were compared with the least squares method, finite difference method, finite element method, finite volume method, B-spline interpolation method, extended cubic B-spline interpolation method and the exact solutions. By finding the maximum errors, the results consistently showed that the proposed method gave the best approximations among the existing methods. We also found that our proposed method involved simple implementation and straightforward computations. Hence, based on the results and the efficiency of our method, we can say that our method is reliable and a promising method for solving linear two-point BVPs.

1. Introduction

Boundary value problems (BVPs) have been extensively investigated in the fields of physics, chemistry and engineering. Numerous methods have been implemented throughout the years to approximate the solutions of linear and nonlinear two-point BVPs, such as the variational approach, finite difference (FDM), finite element (FEM), finite volume (FVM) and shooting (LSM) [1,2,3]. Bickley first employed cubic splines to solve a simple two-point BVP [4], followed by Albasiny and Hoskins [5]. Fyfe continued Bickley’s work and established the fourth-order accuracy of the cubic spline interpolation scheme [6]. Since then, spline functions have been frequently used for solving BVPs [7,8,9,10].
In 2006, Caglar et al. [11] replaced the cubic spline with a cubic B-spline basis function to solve two-point BVPs and named it the cubic B-spline interpolation method (BSI). Several cubic B-spline based numerical approaches have been widely applied to solve linear and nonlinear BVPs [12,13,14,15]. The extended cubic B-spline and cubic trigonometric B-spline were studied by Hamid et al. [16,17] as solutions to linear two-point BVPs. It was found that the cubic trigonometric B-spline provided better results compared with the cubic BSI method if the problems had trigonometric functions. Heilat and Ismail [18] developed a hybrid cubic B-spline method to deal with nonlinear two-point boundary value problems.
This study focuses on numerically solving linear two-point BVPs using a new cubic B-spline (CBS) approximation. These functions are flexible enough to approximate the solution at any point of the domain with high accuracy while maintaining a high degree of smoothness at the knots. In recent years, the new CBS approximation method has been applied for solving BVPs. Iqbal et al. [19] investigated the numerical solutions of second-order singular BVPs using a new approximation for the second-order derivative. A new approximation for the second-order derivative of the extended cubic B-spline basis was developed by Wasim et al. [20] for solving second-order singular BVPs. Iqbal et al. [21] employed a new CBS approximation for solving several third-order Emden–Flower type equations. Nazir et al. [22] used the new CBS approximation for the numerical solutions of coupled viscous Burgers equations. Abbas et al. [23] proposed a new CBS approximation to approximate the solutions to nonlinear third-order Korteweg–de Vries equations. A new quintic B-spline approximation was studied by Nazir et al. [24] as a method for solving Boussinesq equations. Motivated by these works, this study was conducted to solve linear second-order ordinary differential equations (ODEs) based on a new CBS approximation to figure out whether this method would perform equally well. This paper is organized as follows. In Section 2, we present the typical definition of cubic B-spline basis functions. The formulation of a new approximation to second-order derivatives is developed in Section 3. The numerical method is presented in Section 4. In Section 5, the error analysis is investigated. The results and discussion are demonstrated in Section 6 and Section 7, respectively. Section 8 summarizes this paper with a brief conclusion.

2. Cubic B-Spline Functions

Let there be a finite interval [ a , b ] , where a = x 0 < x 1 < < x N = b is divided into equidistant partitions with a mesh point x i = x 0 + i h , i = 0 : 1 : N using a step size h = b a N , N + . The typical CBS basis function is defined as [23]
B i ( x ) = 1 6 h 3 { ( x x i 2 ) 3 , x [ x i 2 , x i 1 ] h 3 + 3 h 2 ( x x i 1 ) + 3 h ( x x i 1 ) 2 3 ( x x i 1 ) 3 , x [ x i 1 , x i ] h 3 + 3 h 2 ( x i + 1 x ) + 3 h ( x i + 1 x ) 2 3 ( x i + 1 x ) 3 , x [ x i , x i + 1 ] ( x i + 2 x ) 3 , x [ x i + 1 , x i + 2 ] 0 , otherwise ,
where i = 1 : 1 : N + 1 . For a sufficiently smooth function y ( x ) , there exists a unique third-degree spline Y ( x ) that satisfies the prescribed interpolating conditions:
Y ( x i ) = y ( x i ) , i = 0 , 1 , 2 , , N Y ( a ) = y ( a ) , Y ( b ) = y ( b ) Y ( a ) = y ( a ) , Y ( b ) = y ( b )
in which
Y ( x ) = i = 1 N + 1 σ i B i ( x )
where σ i is the set of unknown real coefficients to be computed. The values of B i ( x ) and the first and second derivatives B i ( x ) and B i ( x ) at mesh point x i are tabulated in Table 1. For simplicity, we denote the CBS approximations Y ( x j ) , Y ( x j ) and Y ( x j ) as Y j , s j and S j , respectively. Hence, Equation (2) is a linear combination of B i ( x ) for i = 1 : 1 : N + 1 .
From Equations (1) and (2) and Table 1, the following relations can be obtained:
Y j = i = j 1 j + 1 σ i B i ( x ) = 1 6 ( σ j 1 + 4 σ j + σ j + 1 )
s j = i = j 1 j + 1 σ i B i ( x ) = 1 2 h ( σ j 1 + σ j + 1 )
S j = i = j 1 j + 1 σ i B i ( x ) = 1 h 2 ( σ j 1 2 σ j + σ j + 1 )
Using the relations from Equations (3–5), the following expressions can be established [6]:
s j = y ( x j ) 1 180 h 4 y ( 5 ) ( x j ) +
S j = y ( x j ) 1 12 h 2 y ( 4 ) ( x j ) + 1 360 h 4 y ( 6 ) ( x j ) +
Hence, the truncation error in S j is O ( h 2 ) . Consequently, a better approximation for y ( x ) can be constructed.

3. The New Approximation for y ( x )

To construct a new approximation for y ( x ) , we used Equation (7) to demonstrate the following expression for S j 1 at the knot x j for j = 1 , 2 , 3 , , N 1 [25]:
S j 1 = y ( x j 1 ) 1 12 h 2 y ( 4 ) ( x j 1 ) + 1 360 h 4 y ( 6 ) ( x j 1 ) + = y ( x j ) h y ( 3 ) ( x j ) + 5 12 h 2 y ( 4 ) ( x j ) 1 12 h 3 y ( 5 ) ( x j ) +
Similarly, for S j + 1 at x j , we have
S j + 1 = y ( x j ) + h y ( 3 ) ( x j ) + 5 12 h 2 y ( 4 ) ( x j ) + 1 12 h 3 y ( 5 ) ( x j ) +
Now consider S j ˜ as the new approximation for y ( x ) such that
S ˜ j = Z 1 S j + Z 2 S j 1 + Z 3 S j + 1
where Z 1 , Z 2 and Z 3 are the three parameters to be chosen so that the error order of S j ˜ is as high as possible. From the linear combination, we have
Z 1 + Z 2 + Z 3 = 1
Z 2 + Z 3 = 0
Z 1 + 5 Z 2 + 5 Z 3 = 0
By solving Equations (9–11) simultaneously, we get Z 1 = 5 6 , Z 2 = 1 12 and Z 3 = 1 12 . Using Equation (5) and the parameters’ values, Equation (8) can be expressed as
S ˜ j = 1 12 h 2 ( σ j 2 + 8 σ j 1 18 σ j + σ j + 2 )
Next, at the knot x 0 , the linear combination of four neighboring knots can be written as
S ˜ 0 = Z 1 S 0 + Z 2 S 1 + Z 3 S 2 + Z 4 S 3
where
S 1 = y ( x 0 ) + h y ( x 0 ) + 5 12 h 2 y ( 4 ) ( x 0 ) + 1 12 h 3 y ( 5 ) ( x 0 ) +
S 2 = y ( x 0 ) + 2 h y ( x 0 ) + 23 12 h 2 y ( 4 ) ( x 0 ) + 7 6 h 3 y ( 5 ) ( x 0 ) +
S 3 = y ( x 0 ) + 3 h y ( x 0 ) + 53 12 h 2 y ( 4 ) ( x 0 ) + 17 4 h 3 y ( 5 ) ( x 0 ) +
The linear combination in Equation (13) produces the following four expressions:
Z 1 + Z 2 + Z 3 + Z 4 = 1 Z 2 + 2 Z 3 + 3 Z 4 = 0 Z 1 + 5 Z 2 + 23 Z 3 + 53 Z 4 = 0 Z 2 + 14 Z 3 + 51 Z 4 = 0
Hence, we get Z 1 = 7 6 , Z 2 = 5 12 , Z 3 = 1 3 and Z 4 = 1 12 . By substituting the parameter values, Equation (13) takes the following form:
S ˜ 0 = 1 12 h 2 ( 14 σ 1 33 σ 0 + 28 σ 1 14 σ 2 + 6 σ 3 σ 4 )
Similarly, the approximation to y ( x n ) can be written as
S ˜ n = 1 12 h 2 ( σ n 4 + 6 σ n 3 14 σ n 2 + 28 σ n 1 33 σ n + 14 σ n + 1 )
Therefore, the new approximation for y ( x ) can be defined as
S ˜ j = 1 12 h 2 { 14 σ j 1 33 σ j + 28 σ j + 1 14 σ j + 2 + 6 σ j + 3 σ j + 4 , for   j = 0 σ j 2 + 8 σ j 1 18 σ j + σ j + 2 , for   j = 1 : 1 : N 1 σ n 4 + 6 σ n 3 14 σ n 2 + 28 σ n 1 33 σ n + 14 σ n + 1 , for   j = N .

4. Description of the Numerical Method

In this section, the numerical scheme for solving linear second-order ordinary differential equations using the new CBS approximation is discussed. Let us consider the general form of a linear second order of a two-point boundary value problem [26]:
p 1 ( x ) y ( x ) + p 2 ( x ) y ( x ) + p 3 ( x ) y ( x ) = f ( x )
with boundary conditions
y ( a ) = η 1 ,   y ( b ) = η 2
where a x b , η 1 and η 2 are constants. In addition, f ( x ) and p i ,   i = 1 , 2 , 3 are continuous and sufficiently smooth functions on the interval I [26]. Assume the CBS solution to Equation (15) is given as
Y ( x ) = i = 1 N + 1 σ i B i ( x )
where σ i is the constants to be calculated.
Discretizing Equation (15) at the knot x j yields the following form:
p 1 ( x j ) S k + 1 ( x j ) + p 2 ( x j ) s k + 1 ( x j ) + p 3 ( x j ) Y k + 1 ( x j ) = f k ( x j )
where k = 0 , 1 , 2 , . By substituting Equations (3), (4) and (14) into Equation (18) for j = 0 , 1 , 2 , , N 1 , N , we obtain the following N + 1 linear equations involving N + 3 unknowns:
p 1 ( x 0 ) ( 14 σ 1 33 σ 0 + 28 σ 1 14 σ 2 + 6 σ 3 σ 4 12 h 2 ) + p 2 ( x 0 ) ( σ 1 + σ 1 2 h ) + p 3 ( x 0 ) ( σ 1 + 4 σ 0 + σ 1 6 ) = f k ( x 0 ) , p 1 ( x 2 ) ( σ j 2 + 8 σ j 1 18 σ j + 8 σ j + 1 + σ j + 2 12 h 2 ) + p 2 ( x 2 ) ( σ j 1 + σ j + 1 2 h ) + p 3 ( x 2 ) ( σ j 1 + 4 σ j + σ j + 1 6 ) = f k ( x j ) , j = 1 : 1 : N 1 p 1 ( x 2 ) ( σ N 4 + 6 σ N 3 14 σ N 2 + 28 σ N 1 33 σ N + 14 σ N + 1 12 h 2 ) + p 2 ( x 2 ) ( σ N 1 + σ N + 1 2 h ) + p 3 ( x 2 ) ( σ N 1 + 4 σ N + σ N + 1 6 ) = f k ( x N )  
In addition, we need two additional equations, which can be obtained from the boundary conditions of Equation (16) as shown below:
σ 1 + 4 σ 0 + σ 1 = 6 η 1 σ N 1 + 4 σ N + σ N + 1 = 6 η 2
Hence, this will give the following ( N + 3 ) × ( N + 3 ) dimensional matrix form:
A c = b
given by
( 1 4 1 0 0 0 0 0 0 0 0 0 a 1 a 2 a 3 a 4 a 5 a 6 0 0 0 0 0 0 q 1 r 1 s 1 t 1 u 1 0 0 0 0 0 0 0 0 q 2 r 2 s 2 t 2 u 2 0 0 0 0 0 0 0 0 0 0 0 0 q N 2 r N 2 s N 2 t N 2 u N 2 0 0 0 0 0 0 0 0 q N 1 r N 1 s N 1 t N 1 u N 1 0 0 0 0 0 0 z 1 z 2 z 3 z 4 z 5 z 6 0 0 0 0 0 0 0 0 0 1 4 1 ) ( c 1 c 0 c 1 c N 2 c N 1 c N c N + 1 ) = ( 6 η 1 12 h 2 f ( x 0 ) 12 h 2 f ( x 1 ) 12 h 2 f ( x N 2 ) 12 h 2 f ( x N 1 ) 12 h 2 f ( x N ) 6 η 2 )
where
a 1 = 14 p 1 ( x 0 ) 6 h p 2 ( x 0 ) + 2 h 2 p 3 ( x 0 ) , a 2 = 33 p 1 ( x 0 ) + 8 h 2 p 3 ( x 0 ) , a 3 = 28 p 1 ( x 0 ) + 6 h p 2 ( x 0 ) + 2 h 2 p 3 ( x 0 ) , a 4 = 14 p 1 ( x 0 ) , a 5 = 6 p 1 ( x 0 ) , a 6 = 6 p 1 ( x 0 ) , z 1 = p 1 ( x N ) , z 2 = 6 p 1 ( x N ) , z 3 = 14 p 1 ( x N ) , z 4 = 28 p 1 ( x N ) 6 h p 2 ( x N ) + 2 h 2 p 3 ( x N ) , z 5 = 33 p 1 ( x N ) + 8 h 2 p 3 ( x N ) , z 6 = 14 p 1 ( x N ) + 6 h p 2 ( x N ) + 2 h 2 p 3 ( x N ) , and   for   j = 1 , 2 , , N 1 , q j = p 1 ( x j ) , r j = 8 p 1 ( x j ) 6 h p 2 ( x j ) + 2 h 2 p 3 ( x j ) , s j = 18 p 1 ( x j ) + 8 h 2 p 3 ( x j ) , t j = 8 p 1 ( x j ) + 6 h p 2 ( x j ) + 2 h 2 p 3 ( x j ) , and   u j = p 1 ( x j ) .
The unknown column vector c is determined by a well-known Thomas algorithm, and its components are plugged into Equation (17) to obtain the CBS approximation. The solutions to the tridiagonal linear system of equations given in Equation (17) are guaranteed to be unique. This is because the matrix is strictly dominant and nonsingular.

5. Error Analysis

The estimation of a truncation error for the proposed method is presented. By using the new CBS approximations in Equations (3), (4) and (12), the following relations can be obtained:
h [ Y ( x j 1 ) + 4 Y ( x j ) + Y ( x j + 1 ) ] = 3 [ Y ( x j + 1 ) Y ( x j 1 ) ]
h 2 Y ( x j ) = 1 2 [ 7 Y ( x j 1 ) 8 Y ( x j ) + Y ( x j + 1 ) ] + h [ Y ( x j 1 ) + 2 Y ( x j ) ]
Furthermore, we have [6]
h 3 Y ( x j + ) = 12 [ Y ( x j ) Y ( x j + 1 ) ] + 6 h [ Y ( x j ) + Y ( x j + 1 ) ]
h 3 Y ( x j ) = 12 [ Y ( x j 1 ) Y ( x j ) ] + 6 h [ Y ( x j 1 ) + Y ( x j ) ]
where Y ( x j + ) and Y ( x j ) are the approximate values of y ( x j ) in [ x j , x j + 1 ] and [ x j 1 , x j ] , respectively.
Let E μ be the shift operator; in other words, E μ ( Y ( x j ) ) = Y ( x j + μ ) . Then, Equation (19) can be expressed as [6]
h [ E 1 + 4 + E ] Y ( x j ) = 3 [ E E 1 ] y ( x j ) .
Thus, we have
h Y ( x j ) = 3 [ E E 1 ] [ E 1 + 4 + E ] 1 y ( x j ) .
Using E = e h D , D d / d x , we have
E + E 1 = e h D + e h D = [ 1 + h D + h 2 D 2 2 ! + h 3 D 3 3 ! + ] + [ 1 h D + h 2 D 2 2 ! h 3 D 3 3 ! + ] = 2 [ 1 + h 2 D 2 2 ! + h 4 D 4 4 ! + h 6 D 6 6 ! + ] E E 1 = e h D e h D = [ 1 + h D + h 2 D 2 2 ! + h 3 D 3 3 ! + ] [ 1 h D + h 2 D 2 2 ! h 3 D 3 3 ! + ] = 2 [ h D + h 3 D 3 3 ! + h 5 D 5 5 ! + ]
Hence, Equation (23) can be written as
Y ( x j ) = 3 [ 2 ( D + h 2 D 3 3 ! + h 4 D 5 5 ! + ) ] [ 2 ( 1 + h 2 D 2 2 ! + h 4 D 4 4 ! + ) + 4 ] 1 y ( x j ) = [ D + h 2 D 3 3 ! + h 4 D 5 5 ! + ] [ 1 + ( h 2 D 2 6 + h 4 D 4 72 + h 6 D 6 2160 + ) ] 1 y ( x j ) = [ D + h 2 D 3 3 ! + h 4 D 5 5 ! + ] [ 1 ( h 2 D 2 6 + h 4 D 4 72 + h 6 D 6 2160 + ) + ( h 2 D 2 6 + h 4 D 4 72 + h 6 D 6 2160 + ) 2 ] y ( x j ) = [ D + h 2 D 3 3 ! + h 4 D 5 5 ! + ] [ 1 h 2 D 2 6 + h 4 D 4 72 h 6 D 6 2160 ] y ( x j ) = [ D h 4 D 5 180 + h 6 D 7 1512 ] y ( x j )
Therefore, we have
Y ( x j ) = y ( x j ) 1 180 h 4 y ( 5 ) ( x j ) +
Similarly, Equations (20) and (21) give the following:
Y ( x j ) = y ( x j ) + 1 60 h 3 y ( 5 ) ( x j ) 1 360 h 4 y ( 6 ) ( x j ) + 1 1260 h 5 y ( 7 ) ( x j ) +
Y ( x j ) = 1 2 [ Y ( x j + ) + Y ( x j ) ] = y ( x j ) + 1 12 h 2 y ( 5 ) ( x j ) +
Thus, the following theorem have been proven.
Theorem 1.
Let y ( x ) be a sufficiently smooth function for a x b and further assume that Y ( x ) is the cubic B-spline approximation defined by Equation (17) for y ( x ) . Then, at the mesh points x i for i = 0 , 1 , 2 , , N , we have
Y ( x j ) = y ( x j ) 1 180 h 4 y ( 5 ) ( x j ) + , Y ( x j ) = y ( x j ) + 1 60 h 3 y ( 5 ) ( x j ) 1 360 h 4 y ( 6 ) ( x j ) + 1 1260 h 5 y ( 7 ) ( x j ) + , Y ( x j ) = 1 2 [ Y ( x j + ) + Y ( x j ) ] = y ( x j ) + 1 12 h 2 y ( 5 ) ( x j ) + .
Let us consider e ( x ) = Y ( x ) y ( x ) as the error term. By substituting Equations (24–26) into the Taylor series expansion of e ( x j + θ h ) , we have
e ( x j + θ h ) = θ ( θ + 1 ) ( 5 θ 2 ) 360 h 5 y ( 5 ) ( x j ) θ 2 720 h 6 y ( 6 ) ( x j ) +
where θ [ 0 , 1 ] . Hence, it is clear that the proposed new CBS approximation is O ( h 5 ) accurate.

6. Results

In this section, the accuracy of the new CBS approximation method was measured and compared with exact solutions and existing methods. The accuracy was measured using the maximum error, defined as
L = max j | Y ( x j ) y ( x j ) | .
The numerical computations were performed using Matlab R2018a running on an Intel(R) CORE(TM) i7 CPU 1.30GHz processor, 8.00GB RAM.

6.1. Problem 1

Consider the following linear second-order differential equation [11]:
y ( x ) y ( x ) = e x 1 1 , x [ 0 , 1 ]
which is subject to the following boundary conditions:
y ( 0 ) = 0 ,         y ( 1 ) = 0
The exact solution is y ( x ) = x ( 1 e x 1 ) .
Table 2 lists the absolute error when h = 1 / 10 . It is clear that the proposed method agreed with the exact solutions.
In Table 3, the comparison of maximum errors between the proposed method, FDM, FEM, FVM, BSI, extended cubic B-Spline interpolation using Newton’s method (ECBI(N)) and extended cubic B-Spline interpolation using a built-in function (ECBI(B)) are given with different values of N to show the impact of N . Evidently, our results were better than the others.

6.2. Problem 2

Consider the following problem [3]:
y ( x ) y ( x ) = 2 e x 1 , x [ 0 , 1 ]
having the boundary conditions
y ( 0 ) = 0 ,         y ( 1 ) = 1
The true solution is y ( x ) = x e x 1 .
Table 4 displays the absolute error when h = 1 / 10 . We can say that the proposed method fit well with the exact solutions.
Problem 2 was studied using LSM, FDM and BSI. As can be seen in Table 5, a comparison of the maximum errors between the proposed method and the mentioned methods is given with different values of N . Obviously, our method generated more accurate results compared with the others.

6.3. Problem 3

Consider the following equation [27]:
y ( x ) + y ( x ) 6 y ( x ) = x , x [ 0 , 1 ]
subject to the initial conditions
y ( 0 ) = 0 ,         y ( 1 ) = 1 .
The analytical solution is y ( x ) = ( 43 e 2 ) e 3 x ( 43 e 3 ) e 2 x 36 ( e 3 e 2 ) 1 6 x 1 36 .
The absolute errors when h = 1 / 20 are presented in Table 6. We can say that the proposed method was in good agreement with the exact solutions.
The maximum errors between the proposed method and BSI method for N = 20 , 50 and 100 are presented in Table 7. Clearly, our method produced better approximations compared with BSI.

6.4. Problem 4

Consider the following equation [27]:
y ( x ) + 2 y ( x ) + 5 y ( x ) = 6 cos ( 2 x ) 7 sin ( 2 x ) , x [ 0 , π 4 ]
with boundary conditions
y ( 0 ) = 4 ,         y ( π 4 ) = 1
The analytical solution is y ( x ) = 2 ( 1 + e x ) cos ( 2 x ) + sin ( 2 x ) .
In Table 8, the absolute errors for h = 1 / 20 are provided. Clearly, the proposed method worked well with the exact solutions.
The maximum errors between the proposed method and the BSI method for N = 20 , 50 and 100 are demonstrated in Table 9. Again, our method produced better approximations compared with BSI.

7. Discussion

The numerical results, exact solution and absolute error for each problem at specific values of subintervals are presented in Table 2, Table 4, Table 6 and Table 8. Additionally, for each problem, the details of the maximum errors of the existing methods at different values of N are given in Table 3, Table 5, Table 7 and Table 9. From our derivations, the truncation error of the proposed method was O ( h 5 ) accurate. On the other hand, LSM produced truncation errors that were O ( h 4 ) accurate, while FDM, FEM, FVM, BSI and ECBI were O ( h 2 ) accurate. Due to this fact, the approximation obtained by the proposed method was more accurate compared with the others. One potential extension to the present study is the generation of optimal trajectories, obtained from variational calculus to optimal control problems when the boundary conditions are given.

8. Conclusions

This study set out to numerically solve linear two-point BVPs. The method presented was based on a CBS basis function that used the new approximation for the second-order derivative. Four examples were considered and compared with the exact solutions to validate the accuracy of the proposed method. Investigation of the proposed method as a solution to the four problems also showed that it gave more precise and accurate results compared with FDM, FEM, FVM, ECBI(N), ECBI(B), BSI and LSM by calculating the maximum error. We found that the errors decreased, which led to higher accuracy as the step size increased. By performing the error analysis, we found that the proposed method provided fifth-order accuracy. Hence, it was concluded that the proposed method was effective to solve linear two-point BVPs.

Author Contributions

Conceptualization, B.L., S.A.A.K. and I.H.; methodology, B.L., S.A.A.K. and I.H.; software, B.L. and S.A.A.K.; validation, B.L., S.A.A.K. and I.H.; formal analysis, B.L., S.A.A.K. and I.H.; investigation, B.L.; writing—original draft preparation, B.L.; writing—review and editing, B.L., S.A.A.K. and I.H.; supervision, S.A.A.K. and I.H.; funding acquisition, I.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by I.H.’s UKM grant number GP-2020-K006388.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors thank the anonymous referees for their expert advice and suggestions, which helped to improve this paper. Latif, B. is thankful to the Ministry of Higher Education (MOHE) of Malaysia and Universiti Teknologi MARA (UiTM) for the full scholarship (SLAB).

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

a , b End points of the interval
h Step size
B i ( x ) Cubic b-spline basis function
B i ( x ) First derivative of the cubic b-spline basis function
B i ( x ) Second derivative of the cubic b-spline basis function
σ i Unknown real coefficients
x i Mesh point
N Number of mesh points
Y ( x j ) Cubic b-spline approximation, Y j
Y ( x j ) First-order cubic b-spline approximation, s j
Y ( x j ) Second-order cubic b-spline approximation, S j
O ( h 2 ) Truncation error (order two)
S j ˜ New approximation for y ( x )
Z 1 , Z 2 , Z 3 Parameters
η 1 , η 2 Constants
f ( x ) Continuous function
A Coefficient matrix of order n + 3
c Unknown column vector
b Column matrix of order n + 3
E μ ( Y ( x j ) ) Operator notation of Y ( x j + μ )
Integer
D Derivative with respect to x , d / d x
O ( h 6 ) Truncation error (order six)
O ( h 4 ) Truncation error (order four)
O ( h 5 ) Truncation error (order five)
e ( x ) Error term
L Maximum error

References

  1. Wang, S.Q. A variational approach to nonlinear two-point boundary value problems. Comput. Math. Appl. 2009, 58, 2452–2455. [Google Scholar] [CrossRef] [Green Version]
  2. Fang, Q.; Tsuchiya, T.; Yamamoto, T. Finite difference, finite element and finite volume methods applied to two-point boundary value problems. J. Comput. Appl. Math. 2002, 139, 9–19. [Google Scholar] [CrossRef] [Green Version]
  3. Shafie, S.; Majid, A.A. Approximation of Cubic B-spline Interpolation Method, Shooting and Finite Difference Methods for Linear Problems on Solving Linear Two -Point Boundary Value Problems. World Appl. Sci. J. 2012, 17, 1–9. [Google Scholar]
  4. Bickley, W.G. Piecewise Cubic Interpolation and Two-Point Boundary Value Problems. Comput. J. 1968, 11, 206–208. [Google Scholar] [CrossRef] [Green Version]
  5. Albasiny, E.L.; Hoskins, W.D. Cubic Spline solutions to two-point boundary value problems. Comput. J. 1969, 12, 151–153. [Google Scholar] [CrossRef] [Green Version]
  6. Fyfe, D.J. The use of cubic splines in the solution of two-point boundary value problems. Comput. J. 1968, 12, 188–192. [Google Scholar] [CrossRef] [Green Version]
  7. Al-Said, E.A. Cubic spline method for solving two-point boundary-value problems. J. Appl. Math. Comput. 1998, 5, 669–680. [Google Scholar] [CrossRef]
  8. Müllenheim, G. Solving two-point boundary value problems with spline functions. IMA J. Numer. Anal. 1992, 12, 503–518. [Google Scholar] [CrossRef]
  9. Khalifa, A.K.A.; Eilbeck, J.C. Collocation with quadratic and cubic splines. IMA J. Numer. Anal. 1982, 2, 111–121. [Google Scholar] [CrossRef]
  10. Al-Said, E.A.; Noor, M.A.; Al-Shejari, A.A. Numerical solutioons for system of second order boundary value problems. Korean J. Comput. Appl. Math. 1998, 5, 659–667. [Google Scholar] [CrossRef]
  11. Caglar, H.; Caglar, N.; Elfaituri, K. B-spline interpolation compared with finite difference, finite element and finite volume methods which applied to two-point boundary value problems. Appl. Math. Comput. 2006, 175, 72–79. [Google Scholar] [CrossRef]
  12. Tassaddiq, A.; Khalid, A.; Naeem, M.N.; Ghaffar, A.; Khan, F.; Karim, S.A.A.; Nisar, K.S. A new scheme using cubic B-spline to solve non-linear differential equations arising in visco-elastic flows and hydrodynamic stability problems. Mathematics 2019, 7, 1078. [Google Scholar] [CrossRef] [Green Version]
  13. Khalid, A.; Ghaffar, A.; Naeem, M.N.; Nisar, K.S.; Baleanu, D. Solutions of BVPs arising in hydrodynamic and magnetohydro-dynamic stability theory using polynomial and non-polynomial splines. Alex. Eng. J. 2021, 60, 941–953. [Google Scholar] [CrossRef]
  14. Heilat, A.S.; Hailat, R.S. Extended cubic B-spline method for solving a system of nonlinear second-order boundary value problems. J. Math. Comput. Sci. 2020, 21, 231–242. [Google Scholar] [CrossRef]
  15. Khalid, A.; Naeem, M.N.; Ullah, Z.; Ghaffar, A.; Baleanu, D.; Nisar, K.S.; Al-Qurashi, M.M. Numerical solution of the boundary value problems arising in magnetic fields and cylindrical shells. Mathematics 2019, 7, 508. [Google Scholar] [CrossRef] [Green Version]
  16. Hamid, N.N.A.; Majid, A.A.; Ismail, A.I.M. Extended cubic B-spline method for linear two-point boundary value problems. Sains Malays. 2011, 40, 1285–1290. [Google Scholar]
  17. Hamid, N.N.A.; Majid, A.A.; Md Ismail, A.I. Cubic trigonometric B-spline applied to linear two-point boundary value problems of order two. World Acad. Sci. Eng. Technol. 2010, 46, 797–802. [Google Scholar]
  18. Heilat, A.S.; Ismail, A.I.M. Hybrid cubic b-spline method for solving non-linear two-point boundary value problems. Int. J. Pure Appl. Math. 2016, 110, 369–381. [Google Scholar] [CrossRef] [Green Version]
  19. Iqbal, M.K.; Abbas, M.; Khalid, N. New Cubic B-spline Approximation for Solving Non-linear Singular Boundary Value Problems Arising in Physiology. Commun. Math. Appl. 2018, 9, 377–392. [Google Scholar]
  20. Wasim, I.; Abbas, M.; Iqbal, M.K. A new extended B-spline approximation technique for second order singular boundary value problems arising in physiology. J. Math. Comput. Sci. 2019, 19, 258–267. [Google Scholar] [CrossRef]
  21. Iqbal, M.K.; Abbas, M.; Wasim, I. New cubic B-spline approximation for solving third order Emden–Flower type equations. Appl. Math. Comput. 2018, 331, 319–333. [Google Scholar] [CrossRef]
  22. Nazir, T.; Abbas, M.; Iqbal, M.K. New cubic B-spline approximation technique for numerical solutions of coupled viscous Burgers equations. Eng. Comput. Swans. Wales 2020, 38, 83–106. [Google Scholar] [CrossRef]
  23. Abbas, M.; Kashif Iqbal, M.; Zafar, B.; Mat Zin, S.B. New Cubic B-spline Approximations for Solving Non-linear Third-order Korteweg-de Vries Equation. Indian J. Sci. Technol. 2019, 12, 1–9. [Google Scholar] [CrossRef]
  24. Nazir, T.; Abbas, M.; Iqbal, M.K. A new quintic B-spline approximation for numerical treatment of Boussinesq equation. J. Math. Comput. Sci. 2019, 20, 30–42. [Google Scholar] [CrossRef] [Green Version]
  25. Lang, F.G.; Xu, X.P. A new cubic B-spline method for approximating the solution of a class of nonlinear second-order boundary value problem with two dependent variables. Sci. Asia 2014, 40, 444–450. [Google Scholar] [CrossRef] [Green Version]
  26. Zill, D.G.; Cullen, M.R. Differential Equations With Boundary-Value Problems, 7th ed.; Brooks/Cole: Belmont, CS, USA, 2009. [Google Scholar]
  27. Munguia, M.; Bhatta, D. Use of Cubic B-Spline in Approximating Solutions of Boundary Value Problems. Appl. Appl. Math. Int. J. 2015, 10, 750–771. [Google Scholar]
Table 1. Coefficients of B i ( x ) , B i ( x ) and B i ( x ) at the nodes.
Table 1. Coefficients of B i ( x ) , B i ( x ) and B i ( x ) at the nodes.
x i 2 x i 1 x i x i + 1 x i + 2
B i ( x ) 01410
B i ( x ) 0 1 / 2 h 0 1 / 2 h 0
B i ( x ) 0 1 / h 2 2 / h 2 1 / h 2 0
Table 2. Absolute errors for Problem 1 at h = 1 / 10 .
Table 2. Absolute errors for Problem 1 at h = 1 / 10 .
x Proposed MethodExact SolutionAbsolute Error
0.00.00000000000.0000000000 0
0.10.05934295310.0593430340 8.095 × 10 8
0.20.11013403720.1101342072 1.699 × 10 7
0.30.15102416420.1510244089 2.447 × 10 7
0.40.18047504260.1804753456 3.030 × 10 7
0.50.19673433030.1967346701 3.398 × 10 7
0.60.19780762290.1978079724 3.495 × 10 7
0.70.18142692010.1814272455 3.254 × 10 7
0.80.14501513750.1450153975 2.600 × 10 7
0.90.08564618460.0856463238 1.392 × 10 7
1.01.00000000001.00000000000
Table 3. Comparison of maximum errors for Problem 1.
Table 3. Comparison of maximum errors for Problem 1.
N Max-Norm
FDM [2]FEM [2]FVM [2]BSI [11]ECBI(N) [16]
λ = 2.9097 × 10 3
ECBI(B) [16]
λ = 2.9375 × 10 3
Proposed Method
10 8.24 × 10 5 6.35 × 10 5 3.18 × 10 5 2.9 × 10 4 7.92 × 10 6 5.74 × 10 6 3.50 × 10 7
100 8.31 × 10 7 6.36 × 10 7 3.18 × 10 7 2.89 × 10 6 -- 3.74 × 10 11
1000 8.31 × 10 9 6.39 × 10 9 3.18 × 10 9 2.9 × 10 8 -- 6.76 × 10 14
Table 4. Absolute errors for Problem 2 at h = 1 / 10 .
Table 4. Absolute errors for Problem 2 at h = 1 / 10 .
x Proposed MethodExact SolutionAbsolute Error
0.00.00000000000.00000000000
0.10.04065698880.0406569660 2.281 × 10 8
0.20.08986584900.0898658490 5.619 × 10 8
0.30.14897567180.1489756718 8.0638 × 10 8
0.40.21952475180.2195247518 9.735 × 10 8
0.50.30326543510.3032654351 1.052 × 10 7
0.60.40219213080.4021921308 1.032 × 10 7
0.70.51857284430.5185728443 8.983 × 10 8
0.80.65498466640.6549846664 6.398 × 10 8
0.90.81435369510.8143536951 1.887 × 10 8
1.01.00000000001.00000000000
Table 5. Comparison of maximum errors for Problem 2.
Table 5. Comparison of maximum errors for Problem 2.
NMax-Norm
LSM [3]FDM [3]BSI [3]Proposed Method
10 3.66 × 10 7 2.66 × 10 4 2.66 × 10 4 1.05 × 10 7
100 4.01 × 10 11 2.68 × 10 10 6 2.68 × 10 6 1.28 × 10 11
Table 6. Absolute errors for Problem 3 at h = 1 / 20 .
Table 6. Absolute errors for Problem 3 at h = 1 / 20 .
x Proposed MethodExact SolutionAbsolute Error
0.00.00000000000.00000000000
0.10.05425696440.0542570003 3.587 × 10 8
0.20.10742850580.1074285617 5.592 × 10 8
0.30.16362548120.1636255435 6.234 × 10 8
0.40.22674115400.2267412146 6.063 × 10 8
0.50.30069531490.3006953693 5.433 × 10 8
0.60.38965668910.3896567348 4.567 × 10 8
0.70.49825846290.4982584988 3.594 × 10 8
0.80.63181995310.6318199790 2.587 × 10 8
0.90.79658655450.7965865702 1.573 × 10 8
1.01.00000000001.00000000000
Table 7. Comparison of maximum errors for Problem 3.
Table 7. Comparison of maximum errors for Problem 3.
NMax-Norm
BSI [27]Proposed Method
20 9.53 × 10 5 6.23 × 10 8
50 1.52 × 10 5 1.63 × 10 9
100 3.81 × 10 6 1.02 × 10 10
Table 8. Absolute errors for Problem 4 at h = 1 / 20 .
Table 8. Absolute errors for Problem 4 at h = 1 / 20 .
xProposed MethodExact SolutionAbsolute Error
04.00000000004.00000000000
π 40 3.95797828973.9579782444 4.523 × 10 8
π 20 3.83674437383.8367442991 7.468 × 10 8
3 π 40 3.64393879323.6439387036 8.959 × 10 8
π 10 3.38763571383.3876356206 9.313 × 10 8
π 8 3.07624255173.0762424637 8.804 × 10 8
3 π 20 2.71841211032.7184120337 7.666 × 10 8
7 π 40 2.32296298542.3229629245 6.091 × 10 8
π 5 1.89880432021.8988042779 4.227 × 10 8
9 π 40 1.45486149611.4548614743 2.189 × 10 8
π 4 1.00000000001.00000000000
Table 9. Comparison of maximum errors for Problem 4.
Table 9. Comparison of maximum errors for Problem 4.
NMax-Norm
BSI [27]Proposed Method
20 6.30 × 10 5 9.31 × 10 8
50 1.01 × 10 5 2.40 × 10 9
100 2.52 × 10 6 1.50 × 10 10
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Latif, B.; Abdul Karim, S.A.; Hashim, I. New Cubic B-Spline Approximation for Solving Linear Two-Point Boundary-Value Problems. Mathematics 2021, 9, 1250. https://doi.org/10.3390/math9111250

AMA Style

Latif B, Abdul Karim SA, Hashim I. New Cubic B-Spline Approximation for Solving Linear Two-Point Boundary-Value Problems. Mathematics. 2021; 9(11):1250. https://doi.org/10.3390/math9111250

Chicago/Turabian Style

Latif, Busyra, Samsul Ariffin Abdul Karim, and Ishak Hashim. 2021. "New Cubic B-Spline Approximation for Solving Linear Two-Point Boundary-Value Problems" Mathematics 9, no. 11: 1250. https://doi.org/10.3390/math9111250

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop