Next Article in Journal
A Novel Optical Path for Enhancing the Performance of High-Power Semiconductor Laser in Packaging
Next Article in Special Issue
A Review on Some Linear Positive Operators Defined on Triangles
Previous Article in Journal
S-Score Table-Based Parameter-Reduction Approach for Fuzzy Soft Sets
Previous Article in Special Issue
A Constrained Shepard Type Operator for Modeling and Visualization of Scattered Data
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Highly Accurate Compact Finite Difference Schemes for Two-Point Boundary Value Problems with Robin Boundary Conditions

Department of Mathematics and Applied Mathematics, University of Johannesburg, P.O. Box 17011, Johannesburg 2028, South Africa
*
Author to whom correspondence should be addressed.
Symmetry 2022, 14(8), 1720; https://doi.org/10.3390/sym14081720
Submission received: 28 May 2022 / Revised: 20 June 2022 / Accepted: 8 July 2022 / Published: 18 August 2022
(This article belongs to the Special Issue Numerical Analysis, Approximation Theory, Differential Equations)

Abstract

:
In this study, a high-order compact finite difference method is used to solve boundary value problems with Robin boundary conditions. The norm is to use a first-order finite difference scheme to approximate Neumann and Robin boundary conditions, but that compromises the accuracy of the entire scheme. As a result, new higher-order finite difference schemes for approximating Robin boundary conditions are developed in this work. Six examples for testing the applicability and performance of the method are considered. Convergence analysis is provided, and it is consistent with the numerical results. The results are compared with the exact solutions and published results from other methods. The method produces highly accurate results, which are displayed in tables and graphs.

1. Introduction

Boundary value problems (BVPs) are paramount in the modeling of several real-life problems with diverse applications. Boundary conditions of different types often accompany these problems. Dirichlet boundary conditions are the most common and more straightforward to implement. The Neumann boundary conditions are also not too complicated to deal with. On the other hand, the implementation of Robin boundary conditions poses significant difficulties to many researchers. As a result, BVPs with Robin boundary conditions have not received much attention. The Robin boundary condition, also referred to as the third-type boundary condition, was named after Victor Gustave Robin, who was behind its inception [1]. The Robin boundary condition is a linear combination of the solution and its derivative at the boundary point. It arises in diverse physical situations.
If a differential equation is to be solved over a domain Ω , where Ω denotes the domain’s boundary, the Robin boundary condition is:
a u + b u n = g
on the Ω boundary. Our focus, in this work, is to solve second-order boundary value problems of the form
y ( x ) = f x , y , y for a x b
subject to the Robin boundary conditions
α a y ( a ) + β a y ( a ) = γ a , α b y ( b ) + β b y ( b ) = γ b ,
where α a , α b , β a , β b , γ a , and γ b are constants.
Numerous approximation methods have been developed and implemented to solve Equation (2). They include the homotopy perturbation method [2], homotopy analysis method [3], Adomian decomposition method [4], variational iteration method [5], spectral method [6], shooting method [7], and finite differences [8], to name a few. The Robin boundary conditions have not been covered that extensively because they are difficult to deal with. Some of the methods that have been utilized to solve Equation (2) with Robin boundary conditions include the diagonal block method [9], modified Adomian decomposition method [10], Bernoulli polynomials [11], the compact finite difference method [12].
Compact finite difference schemes (CFDSs) have gained popularity in the field of numerical approximations in recent years. In [13], Lele gave an in-depth description of CFDSs for various applications such as interpolation, filtering, and evaluating derivatives. They have been applied to solve differential equations such as Poisson’s equation [14], Burger’s equation [15,16], American option pricing problems [17], Navier–Stokes equation [18], integro-differential equation [19,20], Korteweg–de Vries equation [21], Black–Scholes equation [22,23], dynamical systems [24,25], and many more [26,27,28,29,30]. Their main advantage is that, with few grid points, they attain very high-order accuracy.
In this work, we use the higher-order compact finite difference schemes to solve two-point boundary value problems with Robin boundary conditions. Usually, when finite difference methods are used to solve differential equations subjected to Neumann or Robin boundary conditions, the first-order finite difference formula is used to approximate the derivative in the boundary condition, even if a higher-order method is being used to solve the equation. The disadvantage with that is that the overall accuracy is compromised because of the lower-order approximation at the boundaries. Hence, we develop new higher-order finite difference schemes to approximate the Robin boundary conditions in this work. This enhances the overall accuracy. We consider some examples of boundary value problems that are subjected to Robin boundary conditions to test the applicability and accuracy of the new schemes.
The rest of the paper is laid out as follows. In Section 2, we discuss the quasilinearization technique. In Section 3, we present the derivations of the sixth-order compact finite difference schemes. In Section 4 we discuss the development of CFDSs with Robin boundary conditions. We discuss the convergence of method in Section 5. The results and discussion are presented in Section 6, followed by the conclusions in Section 7.

2. Quasilinearization

Before applying the CFDM, we need to linearize Equation (2) first. To this end, we use the quasilinearization (QLM) technique that was introduced by Bellman and Kalaba [31]. The QLM reduces the nonlinear BVP into a sequence of linear BVPs, which we solve iteratively until a set tolerance level is reached.
We expand the nonlinear function f ( x , y , y ) in Equation (2) using Taylor’s series up to the first-order terms, to obtain
y = f ( x , y r , y r ) + ( y r + 1 y r ) f ( x , y r , y r ) y r + ( y r + 1 y r ) f ( x , y r , y r ) y r ,
y r + 1 + a 1 y r + 1 + a 0 y r + 1 = G ( x ) ,
where
a 1 = f ( x , y r , y r ) y r ,
a 0 = f ( x , y r , y r ) y r ,
G ( x ) = f ( x , y r , y r ) + a 1 y r + a 0 y r .

3. Compact Finite Difference Schemes at Interior Nodes

In this section, we present the derivations of the sixth-order compact finite difference schemes for approximating first and second derivatives. We consider a function f ( x ) defined on x [ a , b ] , where a and b are arbitrary constants. We discretize the domain into N number of nodes with a uniform step size h = ( b a ) / ( N 1 ) and nodes x i = a + ( i 1 ) h , 1 i N .

3.1. First Derivative Approximation

The general formula for approximating first derivatives is given by
A f i 1 + f i + A f i + 1 = a 1 f i 2 + a 2 f i 1 + a 3 f i + a 4 f i + 1 + a 5 f i + 2 + T 1 ,
where f i = f ( x i ) and T 1 is the truncation error. A and a i ( i = 1 , 5 ) are constants to be determined. The values of these constants are obtained by expanding both sides of Equation (9) using the Taylor series expansion about x i and matching the coefficients of f i ( n ) , with n = 1 , 2 , , 6 for a sixth-order accurate scheme. That results in six algebraic equations that are solved to obtain the following constants:
A = 1 3 , a 1 = 1 36 h , a 2 = 7 9 h , a 3 = 0 , a 4 = 7 9 h , a 5 = 1 36 h .
Therefore, the scheme for approximating the first derivative is given by
1 3 f i 1 + f i + 1 3 f i + 1 = 1 36 h f i 2 + 7 9 h f i 1 7 9 h f i + 1 1 36 h f i + 2 + T 1 ( i ) .
The first unmatched coefficients of the Taylor series expansion are used to determine the truncation error, which is given by
T 1 ( i ) = h 7 5040 128 a 1 f ( 7 ) ( x ) + a 2 f ( 7 ) ( x ) a 4 f ( 7 ) ( x ) 128 a 5 f ( 7 ) ( x ) = h 6 1260 f ( 7 ) ( x )

3.2. Second Derivative Approximation

The general formula for approximating second derivatives is given by
A f i 1 + f i + A f i + 1 = a 1 f i 2 + a 2 f i 1 + a 3 f i + a 4 f i + 1 + a 5 f i + 2 + T 2 ,
with T 2 being the truncation error. Similarly, the values of these constants are obtained by expanding both sides of Equation (13) using the Taylor series expansion about x i and matching the coefficients of f i ( n ) , with n = 1 , 2 , , 6 for a sixth-order-accurate scheme. That results in six algebraic equations that are solved to obtain the following constants:
A = 2 11 , a 1 = 3 44 h 2 , a 2 = 12 11 h 2 , a 3 = 51 22 h 2 , a 4 = 12 11 h 2 , a 5 = 3 44 h 2 .
Therefore, the scheme for approximating the second derivative is given by
2 11 f i 1 + f i + 2 11 f i + 1 = 3 44 h 2 f i 2 + 12 11 h 2 f i 1 51 22 h 2 f i + 12 11 h 2 f i + 1 + 3 44 h 2 f i + 2 + T 2 ( i )
Similarly, the first unmatched coefficients of the Taylor series expansion are used to determine the truncation error, which is given by
T 2 ( i ) = h 8 40,320 256 a 1 f ( 8 ) ( x ) a 2 f ( 8 ) ( x ) a 4 f ( 8 ) ( x ) 256 a 5 f ( 8 ) ( x ) = 23 h 6 55,440 f ( 8 ) ( x ) .

4. Compact Finite Difference Schemes for Robin Boundary Conditions

In this section, we develop sixth-order compact finite difference schemes for approximating first and second derivatives for arbitrary functions with Robin boundary conditions. To accommodate the Robin boundary conditions and maintain a sixth-order accuracy at the boundaries, the schemes are adjusted appropriately. To that end, we use one-sided compact finite difference schemes, specifically for the points x 0 , x 1 , x N 1 , and x N . The derivatives at the interior points x 2 , x 3 , , x N 2 are approximated using Equations (11) and (15).

4.1. First Derivative Approximation

We start by illustrating how the sixth-order compact schemes are formulated for first derivative approximations at the boundaries. The one-sided schemes for the first derivative at the boundary points are given as follows:
At i = 1 , we have
f 1 + 1 3 f 2 = a 0 ( α a f 1 + β a f 1 ) + a 1 f 1 + a 2 f 2 + a 3 f 3 + a 4 f 4 + a 5 f 5 + a 6 f 6 + T 1 ( 1 ) .
The constants a i ( i = 1 , 6 ) are obtained in a similar manner as in the previous section, and they are
a 0 = 14 15 β a , a 1 = 197 β a + 840 α a h 900 β a h , a 2 = 1 36 h , a 3 = 1 3 h , a 4 = 1 9 h , a 5 = 1 36 h , a 6 = 1 300 h .
The truncation error is
T 1 ( 1 ) = h 6 630 f ( 7 ) ( x ) .
At i = 2 , we have
1 3 f 1 + f 2 + 1 3 f 3 = b 0 ( α a f 1 + β a f 1 ) + b 1 f 0 + b 2 f 1 + b 3 f 2 + b 4 f 3 + b 5 f 4 + b 6 f 5 + T 1 ( 2 ) ,
with the constants obtained as
b 0 = 1 6 β a , b 1 = 203 β a + 60 α a h 360 β a h , b 2 = 5 12 h , b 3 = 19 18 h , b 4 = 1 9 h , b 5 = 1 24 h , b 6 = 1 180 h ,
and
T 1 ( 2 ) = h 6 315 f ( 7 ) ( x ) .
At i = N 1 , we have
1 3 f N + f N 1 + 1 3 f N 2 = c 0 ( α b f N + β b f N ) + c 1 f N + c 2 f N 1 + c 3 f N 2 + c 4 f N 3 + c 5 f N 4 + c 6 f N 5 + T 1 N 1 ,
where
c 0 = 1 6 β b , c 1 = 203 β b + 60 α b h 360 β b h , c 2 = 5 12 h , c 3 = 19 18 h , c 4 = 1 9 h , c 5 = 1 24 h , c 6 = 1 180 h ,
and
T 1 ( N 1 ) = h 6 315 f ( 7 ) ( x ) .
Finally, at i = N , we have
f N + 1 3 f N 1 = d 0 ( α b f N + β b f N ) + d 1 f N + d 2 f N 1 + d 3 f N 2 + d 4 f N 3 + d 5 f N 4 + d 6 f N 5 + T 1 ( N ) .
Here, the constants are
d 0 = 14 15 β b , d 1 = 197 β b + 840 α b h 900 β b h , d 2 = 1 36 h , d 3 = 1 3 h , d 4 = 1 9 h , d 5 = 1 36 h , d 6 = 1 300 h ,
and
T 1 ( N ) = h 6 630 f ( 7 ) ( x ) .
The sixth-order-accurate compact finite difference approximation for approximating the first derivative of an arbitrary function with the Robin boundary condition is obtained by combining Equation (11) with Equations (17), (20), (23), and (26), and is given by
A 1 f = B 1 f + K 1 + T 1 ,
where
A 1 = 1 1 3 0 0 0 0 0 0 1 3 1 1 3 0 0 0 0 0 0 1 3 1 1 3 0 0 0 0 0 0 0 0 1 3 1 1 3 0 0 0 0 0 0 1 3 1 1 3 0 0 0 0 0 0 1 3 1 N × N , K 1 = 14 15 β a γ a 1 6 β a γ a 0 0 1 6 β b γ b 14 15 β b γ b N × 1
B 1 = 1 h 840 α a h + 197 β a 900 β a 1 36 1 3 1 9 1 36 1 300 0 0 0 0 0 0 0 0 60 α a h + 203 β a 360 β a 5 12 19 18 1 9 1 24 1 180 0 0 0 0 0 0 0 0 1 36 7 9 0 7 9 1 36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 36 7 9 0 7 9 1 36 0 0 0 0 0 0 0 0 1 180 1 24 1 9 19 18 5 12 60 α b h 203 β b 360 β b 0 0 0 0 0 0 0 0 1 300 1 36 1 9 1 3 1 36 840 α b h 197 β b 900 β b N × N
and
T 1 = h 6 630 f ( 7 ) ( x ) , if   i = 1 h 6 315 f ( 7 ) ( x ) , if   i = 2 h 6 1260 f ( 7 ) ( x ) , if   3 i N 2 h 6 315 f ( 7 ) ( x ) , if   i = N 1 h 6 630 f ( 7 ) ( x ) , if   i = N .
The first derivative f is therefore approximated by
f = D 1 f + H 1 ,
where D 1 = A 1 1 B 1 and H 1 = A 1 1 K 1 .

4.2. Second Derivative Approximation

The one-sided schemes for the second derivative at the boundary points are given as follows:
At i = 1 , we have
f 1 + 2 11 f 2 = a 0 ( α a f 1 + β a f 1 ) + a 1 f 1 + a 2 f 2 + a 3 f 3 + a 4 f 4 + a 5 f 5 + a 6 f 6 + a 7 f 7 + T 2 ( 1 ) .
The constants a i ( i = 1 , 6 ) are obtained in a similar manner as in the previous section, and they are given as
a 0 = 217 45 h β a , a 1 = 70,933 β a + 4740 h α a 9900 β h 2 , a 2 = 3757 330 h 2 , a 3 = 947 132 h 2 , a 4 = 1307 297 h 2 , a 5 = 247 13 h 2 , a 6 = 793 1650 h 2 , a 7 = 331 5940 h 2 ,
and
T 2 ( 1 ) = 1997 h 6 55,440 f ( 8 ) ( x ) .
At i = 2 , we have
2 11 f 1 + f 2 + 2 11 f 3 = b 0 ( α a f 1 + β a f 1 ) + b 1 f 1 + b 2 f 2 + b 3 f 3 + b 4 f 4 + b 5 f 5 + b 6 f 6 + b 7 f 7 + T 2 ( 2 ) ,
where the constants are
b 0 = 21 44 h β a , b 1 = 351 β a + 420 α a h 880 β a h 2 , b 2 = 39 44 h 2 , b 3 = 9 88 h 2 , b 4 = 19 22 h 2 , b 5 = 63 176 h 2 , b 6 = 21 220 h 2 , b 7 = 1 88 ,
and
T 2 ( 2 ) = 899 h 6 110,880 f ( 8 ) ( x ) .
At i = N 1 , we have
2 11 f N + f N 1 + 2 11 f N 2 = c 0 ( α b f N + β b f N ) + c 1 f N + c 2 f N 1 + c 3 f N 2 + c 4 f N 3 + c 5 f N 4 + c 6 f N 5 + c 7 f N 6 + T 2 ( N 1 ) ,
and the constants are
c 0 = 21 44 h β b , c 1 = 351 β b + 420 α b h 880 β b h 2 , c 2 = 39 44 h 2 , c 3 = 9 88 h 2 , c 4 = 19 22 h 2 , c 5 = 63 176 h 2 , c 6 = 21 220 h 2 , c 7 = 1 88 h 2 ,
and
T 2 ( N 1 ) = 899 h 6 110,880 f ( 8 ) ( x ) .
Lastly, at i = N , we have
f N + 2 11 f N 1 = d 0 ( α b f N + β b f N ) + d 1 f N + d 2 f N 1 + d 3 f N 2 + d 4 f N 3 + d 5 f N 4 + d 6 f N 5 + d 7 f N 6 + T 2 ( N ) .
The constants are
d 0 = 217 45 h β b , d 1 = 70,933 β b 4740 h α b h 9900 β h 2 , d 2 = 3757 330 h 2 , d 3 = 947 132 h 2 , d 4 = 1307 297 h 2 , d 5 = 247 13 h 2 , d 6 = 793 1650 h 2 , d 7 = 331 5940 h 2 ,
and
T 2 ( N ) = 1997 h 6 55,440 f ( 8 ) ( x ) .
The sixth-order-accurate compact finite difference approximation for approximating the second derivative of an arbitrary function with the Robin boundary condition is obtained by combining Equation (15) with Equations (33), (36), (39), and (42) and is given by
A 2 f = B 2 f + K 2 + T 2 ,
where
A 2 = 1 2 11 0 0 0 0 0 0 2 11 1 2 11 0 0 0 0 0 0 2 11 1 2 11 0 0 0 0 0 0 0 0 2 11 1 2 11 0 0 0 0 0 0 2 11 1 2 11 0 0 0 0 0 0 2 11 1 N × N , K 2 = 1 h 217 415 β a γ a 21 44 β a γ a 0 0 21 44 β b γ b 217 415 β b γ b N × 1
B 2 = 1 h 2 47,740 α a h 70,933 β a 9900 β a 3757 330 947 132 1307 297 247 132 793 1650 331 5940 0 0 0 0 0 0 0 420 α a h + 351 β a 880 β a 39 44 9 88 19 22 63 176 21 220 1 88 0 0 0 0 0 0 0 3 44 12 11 51 22 12 11 3 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 44 12 11 51 22 12 11 3 44 0 0 0 0 0 0 0 1 88 21 220 63 176 19 22 9 88 39 44 420 α b h + 351 β b 880 β b 0 0 0 0 0 0 0 331 5940 793 1650 247 132 3071 247 947 132 3757 330 47,740 α b h + 70,933 β b 9900 β b N × N ,
T 2 = 1997 h 6 55,440 f ( 8 ) ( x ) , if   i = 1 899 h 6 110,880 f ( 8 ) ( x ) , if   i = 2 23 h 6 55,440 f ( 8 ) ( x ) , if   3 i N 2 899 h 6 110,880 f ( 8 ) ( x ) , if   i = N 1 1997 h 6 55,440 f ( 8 ) ( x ) , if   i = N .
The second derivative f is therefore approximated by
f = D 2 f + H 2 ,
where D 2 = A 2 1 B 2 and H 2 = A 2 1 K 2 .
Therefore, to solve Equation (5), we use Equations (32) and (48) to approximate the derivatives, and so, we have
D 2 Y + H 2 + a ˜ 1 ( D 1 Y + H 1 ) + a ˜ 0 Y = G ( x ) ,
( D 2 + a ˜ 1 D 1 + a ˜ 0 ) Y = G ( x ) H 2 a ˜ 1 H 1 ,
where
Y = y 1 ( x ) , y 2 ( x ) , , y N ( x ) T ,
a ˜ 1 = d i a g { a 1 } and a ˜ 0 = d i a g { a 0 } .

5. Convergence

In this section, we discuss the convergence of the proposed method described in Section 4 to solve Equation (5).
Theorem 1.
Let Y = y 1 ( x ) , y 2 ( x ) , , y N ( x ) and Y ¯ = y ¯ 1 ( x ) , y ¯ 2 ( x ) , , y ¯ N ( x ) be vectors of the numerical solution and exact solution obtained by solving the linear system (5), respectively. Then, provided h A 2 C 2 1 A 2 1 E 2 + a ˜ 1 A 1 1 C 1 h 2 A 2 C 2 1 a ˜ 1 A 1 1 E 1 + a ˜ 0 < 1 , we have
E O h 7 ,
where
a ˜ 1 = d i a g { a 1 } and a ˜ 0 = d i a g { a 0 } .
Proof. 
Applying the sixth-order compact schemes (29) and (45) to Equation (5), we obtain
A 2 1 B 2 Y + A 2 1 K 2 + A 2 1 T 2 + a 1 ( A 1 1 B 1 Y + A 1 1 K 1 + A 1 1 T 1 ) + a 0 Y = G ( x ) .
The exact solution, Y ¯ , of Equation (5) is given by
A 2 1 B 2 + a ˜ 1 ( A 1 1 B 1 ) + a ˜ 0 Y ¯ = A 2 1 k 2 a 1 A 1 1 k 1 + G + T ,
where T = A 2 1 T 2 A 1 1 T 1 and a ˜ 1 = d i a g ( a 1 ) and a ˜ 0 = d i a g ( a 0 ) . The approximate solution, Y, of Equation (5) is given by
A 2 1 B 2 + a ˜ 1 A 1 1 B 1 + a ˜ 0 Y = A 2 1 k 2 a 1 A 1 1 k 1 + G ,
Subtracting Equation (57) from Equation (56), we obtain
A 2 1 B 2 + a ˜ 1 A 1 1 B 1 + a ˜ 0 E = T ,
where E is given by
E = Y ¯ Y .
We can write B 1 and B 2 as
B 1 = 1 h C 1 + Q 1 , B 2 = 1 h 2 C 2 + 1 h Q 2 ,
where
C 1 = 197 900 1 36 1 3 1 9 1 36 1 300 0 0 0 0 0 0 0 0 203 360 5 12 19 18 1 9 1 24 1 180 0 0 0 0 0 0 0 0 1 36 7 9 0 7 9 1 36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 36 7 9 0 7 9 1 36 0 0 0 0 0 0 0 0 1 180 1 24 1 9 19 18 5 12 203 360 0 0 0 0 0 0 0 0 1 300 1 36 1 9 1 3 1 36 197 900 N × N ,
Q 1 = 840 α a 900 β a 0 0 60 α a 360 β a 0 0 0 0 0 60 α b 360 β b 0 0 840 α b 900 β b N × N ,
C 2 = 70,933 9900 3757 330 947 132 1307 297 247 132 793 1650 331 5940 0 0 0 0 0 0 0 351 880 39 44 9 88 19 22 63 176 21 220 1 88 0 0 0 0 0 0 0 3 44 12 11 51 22 12 11 3 44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 44 12 11 51 22 12 11 3 44 0 0 0 0 0 0 0 1 88 21 220 63 176 19 22 9 88 39 44 351 880 0 0 0 0 0 0 0 331 5940 793 1650 247 132 3071 247 947 132 3757 330 70,933 9900 N × N ,
Q 2 = 47,740 α a 9900 β a 0 0 420 α a 880 β a 0 0 0 0 420 α b 351 β b 0 0 47,740 α b 9900 β b N × N .
Substituting Equation (60) into Equation (58), we obtain
A 2 1 1 h 2 C 2 + 1 h Q 2 + a ˜ 1 A 1 1 1 h C 1 + Q 1 + a ˜ 0 E = T .
Multiplying Equation (61) by h 2 , we obtain
A 2 1 C 2 + h A 2 1 Q 2 + a ˜ 1 A 1 1 C 1 + h 2 a ˜ 1 A 1 1 Q 1 + a ˜ 0 E = h 2 T .
We then multiply Equation (62) by A 2 C 2 1 to obtain
I + h A 2 C 2 1 A 2 1 Q 2 + a ˜ 1 A 1 1 C 1 + h 2 A 2 C 2 1 a ˜ 1 A 1 1 Q 1 + a ˜ 0 E = h 2 A 2 C 2 1 T .
Solving for E in Equation (63), we obtain
E = I + h A 2 C 2 1 A 2 1 Q 2 + a ˜ 1 A 1 1 C 1 + h 2 A 2 C 2 1 a ˜ 1 A 1 1 Q 1 + a ˜ 0 1 h 2 A 2 C 2 1 T .
Recall that if · is a subordinate matrix norm and B is any matrix such that B < 1 , then the matrix I + B is invertible and
I + B 1 1 1 B .
Now, if h A 2 C 2 1 A 2 1 Q 2 + a ˜ 1 A 1 1 C 1 h 2 A 2 C 2 1 a ˜ 1 A 1 1 Q 1 + a ˜ 0 < 1 , then
I + h A 2 C 2 1 ( A 2 1 Q 2 + a ˜ 1 A 1 1 C 1 ) + h 2 A 2 C 2 1 ( a ˜ 1 A 1 1 Q 1 + a ˜ 0 ) is invertible, and it follows that the norm of E is
E h 2 A 2 C 2 1 T 1 h A 2 C 2 1 A 2 1 Q 2 + a ˜ 1 A 1 1 C 1 h 2 A 2 C 2 1 a ˜ 1 A 1 1 Q 1 + a ˜ 0 O ( h 8 ) O ( h ) O ( h 7 ) .

6. Numerical Examples

In this section, we consider several examples to highlight the applicability and high accuracy of the proposed algorithm in solving two-point boundary value problems subjected to Robin boundary conditions. To check the accuracy, we compute the maximum absolute error ( L ) between the exact and numerical solutions, i.e.,
L = max 0 i m y ˜ x i y x i ,
where y x i and y ¯ x i represent the CFDM solution and exact solution at the grid point x i , respectively. In addition, we compute the numerical rate of convergence, which is defined as
ROC = log E 1 E 2 log h 1 h 2 ,
where E 1 and E 2 are absolute errors corresponding to grids with step size h 1 and h 2 , respectively. We compare our results with published results obtained using other methods.
Example 1.
Consider the linear boundary value problem:
y = y 2 cos x , π 2 < x < π ,
with boundary conditions:
3 y π 2 + y π 2 = 1 and 4 y π + y π = 4 .
Exact solution : y = cos x .
We present the results of Example 1 in Table 1. We display the maximum absolute error computed using different values of grid points N. In this example, we obtain the maximum accuracy, with an error of about 10 14 , when N = 50 . When compared to the results in [9,11], our results are much more accurate. For instance, with a step size h = 0.01 , the error in [9] is about 10 10 , but our error is about 10 14 , with a slightly larger step size. Our results are also better compared to the results of [11] obtained using Bernoulli polynomials. The agreement between the exact and numerical solutions is depicted in Figure 1, with the errors from the different values of N again shown in Figure 2.
Example 2.
Consider the nonlinear second-order boundary value problem:
y = 1 2 e x y 2 + y 2 , 0 x 1 ,
with boundary conditions:
y ( 0 ) + y ( 0 ) = 0 and y ( 1 ) + y ( 1 ) = 2 e .
Exact solution : y = e x .
Figure 3 depicts the solution of Example 2. A good agreement between the exact and the numerical solution can be observed. In this example, N = 32 gives the maximum error of about 10 13 , and this is shown in Table 2. Again, when compared to the results in [9], the method shows remarkable accuracy on a slightly larger step size than in [9]. The errors are also shown in Figure 4 for the different values of N. Figure 5 shows that six iterations of the quasilinearization are required to reach full convergence.
Example 3.
Consider the nonlinear second-order boundary value problem:
y = 1 8 e 2 y + 4 y 2 , 0 x 1 ,
with boundary conditions:
2 y ( 0 ) + y ( 0 ) = 1 and y ( 1 ) + y ( 1 ) = 2 3 + log 3 2 .
Exact solution : y = log 2 + x / 2 .
The results of Example 3 are similar to those of the previous examples. Figure 6 shows the plots of the exact and numerical solution, which are in good agreement. The maximum absolute error, computational times, and rates of convergence (ROCs) are presented in Table 3, with results from Nasir et al. [9] included. As shown in the table, the proposed method gives accurate results with fewer grid points compared to the results in [9]. Plots of the maximum absolute errors for various values of N are shown in Figure 7. Finally, Figure 8 shows the convergence plots for the various N values. It can be seen from the plot that the method reaches full convergence after six iterations.
Example 4.
Consider the nonlinear second-order boundary value problem:
y = e 2 y , 0 x 1 ,
with boundary conditions:
y ( 0 ) y ( 0 ) = 1 and y ( 1 ) + y ( 1 ) = 0.5 + ln ( 2 ) .
Exact solution : y = ln ( 1 + x ) .
For Example 4, we also compute the approximate solution using the proposed CFDM for various values of N. Likewise, the error norm, rates of convergence, and computational times are presented in Table 4. As shown in the table, for h = 0.0159 , the CFDM has an error of about 10 13 , whereas in [9], the error is 10 11 for h = 0.01 . This comparison confirms that the CFDM gives accurate results with fewer grid points. A graphical comparison of the CFDM results and the exact solution is shown in Figure 9. Plots of the absolute errors for various N values is shown in Figure 10. Lastly, Figure 11 shows the convergence plots for the various N values. The plot indicates the method reaches full convergences after six iterations.
Example 5.
Consider the nonlinear second-order boundary value problem:
y = π 2 e y , 0 x 1 ,
with boundary conditions:
2 y ( 0 ) + y ( 0 ) = 2 π and y ( 1 ) + 2 y ( 1 ) = π .
Exact solution : y = 2 ln cos π 2 x π 4 ln ( 2 ) .
Likewise, in Example 5, we estimate the solution of the nonlinear differential equation using the CFDM for various values of N. The error norm, rates of convergence, and execution times of the proposed method are presented in Table 5, with results from Nasir et al. [9]. The table indicates that the CFDM achieves accuracy on a slightly larger step size than in [9]. A graphical comparison of the CFDM results and the exact solution is shown in Figure 12. The errors for various values of N are shown in Figure 13. Lastly, convergence plots for the different N values are depicted in Figure 14, depicting that the method reaches full convergence after about 6 to 8 iterations, depending on the value of N.
Example 6.
Consider the nonlinear second-order boundary value problem:
y = 0.5 1 + x + y 3 , 0 x 1 ,
with boundary conditions:
y ( 0 ) y ( 0 ) = 0.5 π and y ( 1 ) + y ( 1 ) = 1 .
Exact solution : y = 2 2 x x 1 .
Lastly, a graphical comparison of the CFDM results and the exact solution is shown in Figure 15. The maximum absolute errors of Example 6 obtained using various values of N are displayed in Table 6 and also shown in Figure 16. We observe that with the same step size, we obtain better accuracy than the results in [32,34]. Lastly, convergence plots for the different N values are depicted in Figure 17, depicting that the method reaches full convergence after 8 or 9 iterations, depending on the value of N used.
In Table 1, Table 2, Table 3, Table 4, Table 5 and Table 6, we present the computed rates of convergence for all the examples, which are consistent with the theoretical order of convergence obtained in Theorem 1.

7. Conclusions

In this paper, we presented a highly accurate compact finite difference method (CFDM) to solve both linear and nonlinear second-order boundary value problems subjected to Robin boundary conditions. The method utilizes sixth-order compact finite difference schemes. We successfully developed new sixth-order schemes to approximate the Robin boundary conditions, and this leads to a highly accurate method, as shown by the results. Nonlinear equations were first linearized using the quasilinearization (QLM) technique. Convergence of the CFDM was established by using the properties of the standard matrix norm. By computing the absolute error norm, and rates of convergence, the high accuracy of the CFDM was confirmed by comparing its numerical results against the numerical results of the diagonal block method presented in Nasir et al. [9] and Majid et al. [34], symmetric spline [32], Bernoulli polynomials [11], and quintic B-spline collocation [33]. We also observed that the CFDM approximate solution is in excellent agreement with the exact solution in all of the considered examples. Numerical results further confirmed that the rate of convergence of the presented CFDM is seven, consistent with the theoretical approximation.
We conclude that to solve linear and nonlinear boundary value problems subject to Robin boundary conditions, the CFDM is highly accurate and computationally efficient and a dependable method to utilize.

Author Contributions

Conceptualization, P.D. and S.S.; methodology, J.M.; software, J.M.; validation, J.M., P.D. and S.S.; investigation, J.M.; writing—original draft preparation, J.M.; writing—review and editing, P.D. and S.S.; supervision, P.D. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Okereki, M.; Keates, S. Finite Element Applications. A Practical Guide to the FEM Process; Springer: New York, NY, USA, 2018. [Google Scholar]
  2. Chun, C.; Sakthivel, R. Homotopy perturbation technique for solving two-point boundary value problems–Comparison with other methods. Comput. Phys. Commun. 2010, 181, 1021–1024. [Google Scholar] [CrossRef]
  3. Hassan, H.N.; El-Tawil, M.A. An efficient analytic approach for solving two-point nonlinear boundary value problems by homotopy analysis method. Math. Methods Appl. Sci. 2011, 34, 977–989. [Google Scholar] [CrossRef]
  4. Jang, B. Two-point boundary value problems by the extended Adomian decomposition method. J. Comput. Appl. Math. 2008, 219, 253–262. [Google Scholar] [CrossRef]
  5. Lu, J. Variational iteration method for solving two-point boundary value problems. J. Comput. Appl. Math. 2007, 207, 92–95. [Google Scholar] [CrossRef]
  6. Egidi, N.; Maponi, P. A spectral method for the solution of boundary value problems. Appl. Math. Comput. 2021, 409, 125812. [Google Scholar] [CrossRef]
  7. Ibraheem, K.I.; Khalaf, B.M. Shooting neural networks algorithm for solving boundary value problems in ODEs. Appl. Appl. Math. 2011, 6, 187–200. [Google Scholar]
  8. Chawla, M.M.; Subramanian, R.; Sathi, H.L. A fourth order method for a singular two-point boundary value problem. BIT Numer. Math. 1988, 28, 88–97. [Google Scholar] [CrossRef]
  9. Nasir, N.M.; Majid, Z.A.; Ismail, F.; Bachok, N. Diagonal Block Method for Solving Two-Point Boundary Value Problems with Robin Boundary Conditions. Math. Probl. Eng. 2018, 2018, 2056834. [Google Scholar]
  10. Duan, J.; Rach, R.; Wazwaz, A.; Chaolu, T.; Wang, Z. A new modified Adomian decomposition method and its multistage form for solving nonlinear boundary value problems with Robin boundary conditions. Appl. Math. Model. 2013, 37, 8687–8708. [Google Scholar] [CrossRef]
  11. Islam, M.S.; Shirin, A. Numerical Solutions of a Class of Second Order Boundary Value Problems on Using Bernoulli Polynomials. Appl. Math. 2011, 2011, 1059–1067. [Google Scholar] [CrossRef]
  12. Roul, P.; Goura, V.M.K.P.; Agarwal, R. A compact finite difference method for a general class of nonlinear singular boundary value problems with Neumann and Robin boundary conditions. Appl. Math. Comput. 2019, 350, 283–304. [Google Scholar] [CrossRef]
  13. Lele, S.K. Compact finite difference schemes with spectral-like resolution. J. Comput. Phys. 1992, 103, 16–42. [Google Scholar] [CrossRef]
  14. Gupta, M.M.; Kouatchou, J.; Zhang, J. Comparison of second-and fourth-order discretizations for multigrid Poisson solvers. J. Comput. Phys. 1997, 132, 226–232. [Google Scholar] [CrossRef]
  15. Sari, M.; Gürarslan, G. A sixth-order compact finite difference scheme to the numerical solutions of Burgers’ equation. Appl. Math. Comput. 2009, 208, 475–483. [Google Scholar] [CrossRef]
  16. Liao, W. An implicit fourth-order compact finite difference scheme for one-dimensional Burgers’ equation. Appl. Math. Comput. 2008, 206, 755–764. [Google Scholar] [CrossRef]
  17. Zhao, J.; Davison, M.; Corless, R.M. Compact finite difference method for American option pricing. J. Comput. Appl. Math. 2007, 206, 306–321. [Google Scholar] [CrossRef]
  18. Shah, A.; Yuan, L.; Khan, A. Upwind compact finite difference scheme for time-accurate solution of the incompressible Navier–Stokes equations. Appl. Math. Comput. 2010, 214, 320–3213. [Google Scholar] [CrossRef]
  19. Zhao, J.; Corless, R.M. Compact finite difference method for integro-differential equations. Appl. Math. Comput. 2006, 177, 271–288. [Google Scholar] [CrossRef]
  20. Zhao, J. Compact finite difference methods for high order integro-differential equations. Appl. Math. Comput. 2013, 221, 66–78. [Google Scholar] [CrossRef]
  21. Li, J.; Visbal, M.R. High-order compact schemes for nonlinear dispersive waves. J. Sci. Comput. 2006, 26, 1–23. [Google Scholar] [CrossRef]
  22. Düring, B.; Fournié, M.; Jüngel, A. High order compact finite difference schemes for a nonlinear Black–Scholes equation. Int. J. Theor. Appl. Financ. 2003, 6, 767–789. [Google Scholar] [CrossRef]
  23. Fournie, M. High Order Compact Finite Difference Schemes for a Nonlinear Black–Scholes Equation; University of Konstanz Center of Finance and Econometrics Discussion Paper, 01/07; University of Konstanz, Center of Finance and Econometrics (CoFE): Konstanz, Germany, 2001. [Google Scholar]
  24. Mathale, D.; Dlamini, P.G.; Khumalo, M. Compact finite difference relaxation method for chaotic and hyperchaotic initial value systems. Comput. Appl. Math. 2018, 37, 5187–5202. [Google Scholar] [CrossRef]
  25. Kouagou, J.N.; Dlamini, P.G.; Simelane, S.M. On the multi-domain compact finite difference relaxation method for high dimensional chaos: The nine-dimensional Lorenz system. Alex. Eng. J. 2020, 59, 2617–2625. [Google Scholar] [CrossRef]
  26. Dlamini, P.G.; Khumalo, M. A new compact finite difference quasilinearization method for nonlinear evolution partial differential equations. Open Math. 2017, 15, 1450–1462. [Google Scholar] [CrossRef]
  27. Zhao, J. Highly accurate compact mixed methods for two point boundary value problems. Appl. Math. Comput. 2007, 188, 1402–1418. [Google Scholar] [CrossRef]
  28. Zhao, J.; Zhang, T.; Corless, R.M. Convergence of the compact finite difference method for second-order elliptic equations. Appl. Math. Comput. 2006, 182, 1454–1469. [Google Scholar] [CrossRef]
  29. Pettigrew, M.F.; Rasmussen, H.A. Compact method for second-order boundary value problems on nonuniform grids. Comput. Math. Appl. 1996, 31, 1–16. [Google Scholar] [CrossRef]
  30. Holsapple, R.; Venkataraman, R.; Doman, D. New, fast numerical method for solving two-point boundary-value problems. J. Guid. Control. Dyn. 2004, 27, 301–304. [Google Scholar] [CrossRef]
  31. Bellman, R.E.; Kalaba, R.E. Quasilinearization and Nonlinear Boundary-Value Problems; Elsevier: New York, NY, USA, 1965. [Google Scholar]
  32. Bhatta, S.K.; Sastri, K.S. Symmetric spline procedures for boundary value problems with mixed boundary conditions. J. Comput. Appl. Math. 1993, 45, 237–250. [Google Scholar] [CrossRef]
  33. Lang, F.G.; Xu, X.P. Quintic B-spline collocation method for second order mixed boundary value problem. Comput. Phys. Commun. 2012, 183, 913–921. [Google Scholar] [CrossRef]
  34. Majid, Z.A.; Nasir, N.M.; Ismail, F.; Bachok, N. Two point diagonally block method for solving boundary value problems with Robin boundary conditions. Malays. J. Math. Sci. 2019, 13, 1–14. [Google Scholar]
Figure 1. Exact and approximate solution plots for Example 1.
Figure 1. Exact and approximate solution plots for Example 1.
Symmetry 14 01720 g001
Figure 2. Error plots for the approximation of Example 1 for varying values of N.
Figure 2. Error plots for the approximation of Example 1 for varying values of N.
Symmetry 14 01720 g002
Figure 3. Exact and approximate solution plots for Example 2.
Figure 3. Exact and approximate solution plots for Example 2.
Symmetry 14 01720 g003
Figure 4. Error plots for the approximation of Example 2 for varying values of N.
Figure 4. Error plots for the approximation of Example 2 for varying values of N.
Symmetry 14 01720 g004
Figure 5. Convergence plots for the approximation of Example 2 for varying values of N.
Figure 5. Convergence plots for the approximation of Example 2 for varying values of N.
Symmetry 14 01720 g005
Figure 6. Exact and approximate solution plots for Example 3.
Figure 6. Exact and approximate solution plots for Example 3.
Symmetry 14 01720 g006
Figure 7. Error plots for the approximation of Example 3 for varying values of N.
Figure 7. Error plots for the approximation of Example 3 for varying values of N.
Symmetry 14 01720 g007
Figure 8. Convergence plots for the approximation of Example 3 for varying values of N.
Figure 8. Convergence plots for the approximation of Example 3 for varying values of N.
Symmetry 14 01720 g008
Figure 9. Exact and approximate solution plots for Example 4.
Figure 9. Exact and approximate solution plots for Example 4.
Symmetry 14 01720 g009
Figure 10. Error plots for the approximation of Example 4 for varying values of N.
Figure 10. Error plots for the approximation of Example 4 for varying values of N.
Symmetry 14 01720 g010
Figure 11. Convergence plots for the approximation of Example 4 for varying values of N.
Figure 11. Convergence plots for the approximation of Example 4 for varying values of N.
Symmetry 14 01720 g011
Figure 12. Exact and approximate solution plots for Example 5.
Figure 12. Exact and approximate solution plots for Example 5.
Symmetry 14 01720 g012
Figure 13. Error plots for the approximation of Example 5 for varying values of N.
Figure 13. Error plots for the approximation of Example 5 for varying values of N.
Symmetry 14 01720 g013
Figure 14. Convergence plots for the approximation of Example 5 for varying values of N.
Figure 14. Convergence plots for the approximation of Example 5 for varying values of N.
Symmetry 14 01720 g014
Figure 15. Exact and approximate solution plots for Example 6.
Figure 15. Exact and approximate solution plots for Example 6.
Symmetry 14 01720 g015
Figure 16. Error plots for the approximation of Example 6 for varying values of N.
Figure 16. Error plots for the approximation of Example 6 for varying values of N.
Symmetry 14 01720 g016
Figure 17. Convergence plots for the approximation of Example 6 for varying values of N.
Figure 17. Convergence plots for the approximation of Example 6 for varying values of N.
Symmetry 14 01720 g017
Table 1. Maximum absolute error ( L ) for Example 1.
Table 1. Maximum absolute error ( L ) for Example 1.
Present Method (CFDM)Nasir et al. [9]Islam and Shirin [11]
NhError Norm (L)ROChError Norm (L)Error Norm (L)
100.1751.47278 × 10 8 0.18.47 × 10 7 1.525206 × 10 10
200.0835.65279 × 10 11 7.706410.012.47 × 10 10
300.0542.81286 × 10 12 7.02551
400.0403.52718 × 10 13 7.13829
500.0325.65024 × 10 14 6.95506
Table 2. Maximum absolute error ( L ) and ROC for Example 2.
Table 2. Maximum absolute error ( L ) and ROC for Example 2.
Present Method (CFDM)Nasir et al. [9]
NhError Norm (L)ROChError Norm (L)
80.1431.28214 × 10 8 0.14.90 × 10 7
160.0676.99112 × 10 11 6.838210.011.90 × 10 11
240.0433.94751 × 10 12 6.72948
320.0325.09370 × 10 13 6.782713
Table 3. Maximum absolute error ( L ) and ROC for Example 3.
Table 3. Maximum absolute error ( L ) and ROC for Example 3.
Present Method (CFDM)Nasir et al. [9]
NhError Norm (L)ROChError Norm (L)
80.14291.09973 × 10 7 0.14.47 × 10 8
160.06677.66028 × 10 10 6.516870.011.31 × 10 12
240.04354.35134 × 10 11 6.71
320.03235.61728 × 10 12 6.85852
400.02561.08691 × 10 12 7.15459
Table 4. Maximum absolute error ( L ) and ROC for Example 4.
Table 4. Maximum absolute error ( L ) and ROC for Example 4.
Present Method (CFDM)Nasir et al. [9]Bhatta and Sastri [32]
hError Norm (L)ROChError Norm (L)hError Norm (L)
1 8 4.94004 × 10 6 0.11.66 × 10 6 1 8 0.44886 × 10 5
1 16 6.07399 × 10 8 5.771290.011.201 × 10 11 1 16 0.12439 × 10 6
1 32 6.10962 × 10 10 6.3357 1 32 0.26496 × 10 8
1 64 4.76696 × 10 12 6.84389 1 64 0.48683 × 10 10
1 128 0.83165 × 10 12
Table 5. Maximum absolute error ( L ) and ROC for Example 5.
Table 5. Maximum absolute error ( L ) and ROC for Example 5.
Present Method (CFDM)Nasir et al. [9]Lang and Xu [33]
hError Norm (L)ROChError Norm (L)hError Norm (L)
0.17.08842 × 10 4 0.15.903279 × 10 4 0.13.405 × 10 4
0.051.43008 × 10 5 5.223820.052.478867 × 10 5 0.052.154 × 10 5
0.0251.95329 × 10 7 5.970310.0251.042691 × 10 7 0.0251.348 × 10 6
0.01251.99574 × 10 9 6.49350.01256.29665 × 10 9 0.01258.425 × 10 8
Table 6. Maximum absolute error ( L ) and ROC for Example 6.
Table 6. Maximum absolute error ( L ) and ROC for Example 6.
Present Method (CFDM)Bhatta and Sastri [32]Majid [34]
hError Norm (L)ROChError Norm (L)hError Norm (L)
1 8 4.21610 × 10 5 1 8 0.37366 × 10 4 0.105.9071 × 10 6
1 16 5.99955 × 10 7 5.57955 1 16 0.11160 × 10 5 0.051.9592 × 10 7
1 32 6.53844 × 10 9 6.22527 1 32 0.24812 × 10 7 0.011.1374 × 10 10
1 64 5.75249 × 10 11 6.67454 1 64 0.46645 × 10 9
1 128 2.86215 × 10 13 7.56467 1 128 0.80107 × 10 11
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Malele, J.; Dlamini, P.; Simelane, S. Highly Accurate Compact Finite Difference Schemes for Two-Point Boundary Value Problems with Robin Boundary Conditions. Symmetry 2022, 14, 1720. https://doi.org/10.3390/sym14081720

AMA Style

Malele J, Dlamini P, Simelane S. Highly Accurate Compact Finite Difference Schemes for Two-Point Boundary Value Problems with Robin Boundary Conditions. Symmetry. 2022; 14(8):1720. https://doi.org/10.3390/sym14081720

Chicago/Turabian Style

Malele, James, Phumlani Dlamini, and Simphiwe Simelane. 2022. "Highly Accurate Compact Finite Difference Schemes for Two-Point Boundary Value Problems with Robin Boundary Conditions" Symmetry 14, no. 8: 1720. https://doi.org/10.3390/sym14081720

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