Volume 2013, Issue 1 482050
Research Article
Open Access

Solution of Boundary Value Problems by Approaching Spline Techniques

P. Kalyani

P. Kalyani

Kakatiya Institute of Technology and Sciences, Warangal 506001, India kitswgl.org

Search for more papers by this author
P. S. Rama Chandra Rao

Corresponding Author

P. S. Rama Chandra Rao

Kakatiya Institute of Technology and Sciences, Warangal 506001, India kitswgl.org

Search for more papers by this author
First published: 30 September 2013
Academic Editor: Shuli Sun

Abstract

In the present work a nonpolynomial spline function is used to approximate the solution of the second order two point boundary value problems. The classes of numerical methods of second order, for a specific choice of parameters involved in nonpolynomial spline, have been developed. Numerical examples are presented to illustrate the applications of this method. The solutions (u(x)) of these examples are found at the nodal points with various step sizes and with various parameters (α, β). The absolute errors in each example are estimated, and the comparison of approximate values, exact values, and absolute errors of u(x) at the nodal points are shown graphically. Further, shown that nonpolynomial spline produces accurate results in comparison with the results obtained by the B-spline method and finite difference method.

1. Introduction

There are many linear and nonlinear problems in science and engineering, namely, second order differential equations with various types of boundary conditions, which are solved either analytically or numerically. Numerical simulation in engineering science and in applied mathematics has become a powerful tool to model the physical phenomena, particularly when analytical solutions are not available, then very difficult to obtain. The numerical solution of two-point boundary value problems (BVPs) is of great importance due to its wide application in scientific research. Several authors like Bickley [1] and Khan [2] have considered the applications of cubic spline functions for the solution of two point boundary value problems. Detailed explanation of theory of splines is given in [3, 4]. Some of already established methods to solve the boundary value problems are shooting method, finite difference method, finite volume method, variational iteration method, and Adomian decomposition method. Chawla and Katti [5] employed finite difference method for a class of singular two-point BVPs; a class of BVPs was solved by using numerical integration [6]; Ravi kanth and Reddy dealt with cubic spline [7]; the variational iteration method was proposed originally by He [8] in 1999; Adomian et al. solved a generalization of Airy’s equation by decomposition method [9]. In the present communication we apply nonpolynomial spline functions to develop numerical method for obtaining the approximations to the solution of second order two point boundary value problem of the form
()

This type of problem (by missing the term containing u (x)) is proposed by the authors in [10, 11]. Numerical solution of (1) based on finite difference, finite element, and finite volume methods has been proposed by Fang et al. [10]; Hikmet Caglar et al. [11] applied B-spline interpolation in two-point BVPs and compared results with finite difference, finite element, and finite volume methods.

Briefly, outline is as follows. In Section 2, we develop a numerical technique based on nonpolynomial spline function for solving second order linear and nonlinear two point boundary value problems (1). To demonstrate the efficiency of the method some numerical examples have been solved and compared with exact solution and also with other known methods [12] in Section 3 and conclusions have been presented in Section 4.

2. Description of the Method

We consider a uniform mesh Δ with nodal points xi  on [a,  b] such that
()
A nonpolynomial function sΔ(x) of class c2 [a,  b] which interpolates u(x) at the mesh points xi, for i = 0,1, …, N, depends on a parameter τ and reduces to ordinary cubic spline in [a,  b] as τ → 0. The spline function we propose has the following form: T3 = Span {1, x, cos  τx, sin τx}, where τ is the frequency of the trigonometric part of the spline function which can be real or pure imaginary and which will be used to raise the accuracy of the method.
When correlation between polynomial and nonpolynomial spline basis functions are investigated in the following manner:
()
It follows that lim τ→0T3 = {1, x, x2, x3}. Thus in each subinterval xixxi+1, we have
()
For each segment [xi, xi+1], i = 0,1, 2, …, N − 1 the non-polynomial sΔ(x) has the following form:
()
where ai, bi, ci, and di are constants and τ is a free parameter. Let ui be an approximation to u(xi), obtained by the segment sΔ(x) of mixed spline function passing through the points (xi, ui) and (xi+1, ui+1). To obtain the necessary conditions for the coefficients introduced in (5), we not only require sΔ(x) to satisfie interpolate conditions at xi and xi+1, but also the continuity of first derivative at the common nodes (xi,, ui) to be fulfilled.
To derive an expression for the coefficients of (5) in terms of ui, ui+1, Mi, Mi+1, we first denote
()
From algebraic simplification we get the following expression:
()
where θ = τh and i = 0,1, 2, …, N − 1 using the continuity of the first derivative at (xi, ui); that is, , we obtain the following relations for i = 0,1, 2, …, N − 1
()
and θ = τh whenever τ → 0; then α → 1/6 and β → 1/3. Therefore (8) reduces to the consistency relation of cubic splines:
()
Equation (1) can be rewritten as
()
The proposed differential equation (10) can be discretized at the nodal point xi by
()
By using moment of the spline in (11) we obtain
()
Taking approximations for the first derivative of u we have
()
Substituting (12), (13) in (8) and simplifying, we get the following tridiagonal system which gives the approximations u1, u2, u3, …,uN−1 of the solution u(x) at  x1, x2, x3, …,xN−1:
()
with u(a) = u(b) = 0, i = 1(1)N − 1.
The tridiagonal linear system (14) can be written in the following matrix form:
()
A is a tridiagonally dominant matrix of order (N − 1).
P = (Pij) is a tridiagonal matrix defined by
()
BQ = (Zij), BR = (Rij) are tridiagonal matrices defined as
()
()
The tridiagonal matrix D is defined by
()

3. Numerical Illustrations

In the present work four linear boundary value problems with h = 0.1 and one nonlinear boundary value problem with h = 0.2 for different values of α and β have been solved, whose exact solutions are known. The approximate solution, exact solutions, and absolute errors at the nodal points are tabulated in Tables 17, and comparisons are shown in Figures 15. The results of the present work are compared with the exact solution of all the problems and with finite difference method, B-spline method of Example 4.

Table 1. Approximate solution (series 1), exact solution (series 2), and absolute errors of Example 1.
x values Approximate solution (U) Exact solution u(x) Absolute error
2.1 0.018809 0.018609 0.0002
2.2 0.032904 0.032536 0.00037
2.3 0.042537 0.042048 0.00049
2.4 0.047925 0.047368 0.00056
2.5 0.049252 0.048684 0.00057
2.6 0.046680 0.046154 0.00053
2.7 0.040350 0.039912 0.00044
2.8 0.030389 0.030075 0.00031
2.9 0.016908 0.016742 0.00017
Table 2. Approximate solution (series 1), exact solution (series 2), and absolute errors of Example 2.
x values Approximate solution Exact solution Absolute error
0.1 0.307797 0.309017 0.00122
0.2 0.585475 0.587785 0.00231
0.3 0.805863 0.809017 0.003154
0.4 0.947402 0.951052 0.003654
0.5 0.996253 1 0.003747
0.6 0.947656 0.951057 0.003401
0.7 0.806396 0.809018 0.002622
0.8 0.586341 0.587787 0.001446
0.9 0.309083 0.309019 0.00006
Table 3. (a) Approximate solution, exact solution, and absolute errors of Example 2 Case 2(a). (b) Approximate solution, exact solution, and absolute errors of Example 2 Case 2(b).
x values Approximate solution Exact solution Absolute error
0.1 0.306536 0.309017 0.002481
0.2 0.583081 0.587785 0.004704
0.3 0.802581 0.809017 0.006436
0.4 0.943571 0.951056 0.007485
0.5 0.992273 1 0.007727
0.6 0.943954 0.951057 0.007103
0.7 0.803386 0.809018 0.005632
0.8 0.584388 0.587787 0.003399
0.9 0.308477 0.309019 0.000542
x values Approximate solution Exact solution Absolute error
0.1 0.30922 0.309017 0.000203
0.2 0.588176 0.587785 0.000391
0.3 0.809565 0.809017 0.000548
0.4 0.951724 0.951056 0.000668
0.5 1.000742 1 0.000742
0.6 0.951832 0.951057 0.000775
0.7 0.809792 0.809018 0.000774
0.8 0.588544 0.587787 0.000757
0.9 0.309766 0.309019 0.000747
Table 4. Approximate solutions (series 1), exact solution (series 2), and absolute errors of Example 3.
x values Approximate solution Exact solution Absolute error
0.1 0.100030 0.099465 0.00056462
0.2 0.196479 0.195424 0.00105456
0.3 0.284928 0.28347 0.00145765
0.4 0.359797 0.358038 0.00175907
0.5 0.414122 0.41218 0.00194168
0.6 0.439290 0.437309 0.00198149
0.7 0.424738 0.422888 0.00184993
0.8 0.357597 0.356087 0.00151045
0.9 0.222286 0.221364 0.00092172
Table 5. Approximate solution (series 1), exact solution (series 2), and absolute errors of Example 4.
x values Approximate solution Exact solution Absolute error
0.1 0.057301 0.0572 0.000101
0.2 0.106357 0.1061 0.000257
0.3 0.146421 0.1460 0.000421
0.4 0.176383 0.1758 0.000583
0.5 0.194657 0.1940 0.00065
0.6 0.199044 0.1983 0.000744
0.7 0.186544 0.1858 0.000744
0.8 0.153113 0.1524 0.00071
0.9 0.093335 0.0928 0.000535
Table 6. Comparison of present method (series 3) with B-spline method (series 2), finite difference method (series 1) and with exact solution (series 4) for Example 4.
x values Finite difference method B-Spline method Present method Exact solution
0.1 0.0399 0.05657 0.05730 0.0572
0.2 0.0897 0.104297 0.106357 0.1061
0.3 0.1302 0.1464167 0.146421 0.1460
0.4 0.1604 0.1763667 0.176383 0.1758
0.5 0.1787 0.193999 0.194657 0.1940
0.6 0.1827 0.1982966 0.199044 0.1983
0.7 0.1695 0.18655 0.186544 0.1858
0.8 0.1350 0.153771 0.15311 0.1524
0.9 0.0735 0.909366 0.093335 0.0928
Table 7. Approximate solution, exact solution, and absolute errors of Example 5
x values Approximate solution Exact solution Absolute error
0.2 −0.08874 −0.08888 0.00014
0.4 −0.14974 −0.15 0.00026
0.6 −0.17111 −0.17143 0.00032
0.8 −0.13306 −0.13333 0.00027
Details are in the caption following the image
Comparison of approximate values and exact values for Example 1.
Details are in the caption following the image
(a) Comparison of approximate values and exact values for Example 2. (b) Comparison of errors in 2 cases for Example 2.
Details are in the caption following the image
(a) Comparison of approximate values and exact values for Example 2. (b) Comparison of errors in 2 cases for Example 2.
Details are in the caption following the image
Comparison of approximate values and exact values for Example 3.
Details are in the caption following the image
(a) Comparison of approximate values and exact values for Example 4. (b) Comparison of results obtained by our method of Example 4 with the values obtained by other methods (Table 6).
Details are in the caption following the image
(a) Comparison of approximate values and exact values for Example 4. (b) Comparison of results obtained by our method of Example 4 with the values obtained by other methods (Table 6).
Details are in the caption following the image
Comparison of approximate values and exact values for Example 5.

Example 1. Consider the boundary value problem:

()
The analytical solution of (20) is
()
By comparing the given equation with (10) we have
()
Here
()
and the function values at the nodal points are given by ; that is,
()
Substituting the values of pi, qi, ri at i = 0,1, 2 … , 10 in (16), (17), and (18) we get the values of (Pij), (Zij), (Rij), and taking these values in (15) we get the tridiagonal matrix A. From (23), (24) we have G and F so we obtain a system of linear equations. This system in the matrix form is AU + h2DF = G; that is,
()

Solving this we get the solution matrix U. The approximate values (U), exact values (u(x) of (21)), and the absolute errors are summarized in Table 1, and the comparison is given in Figure 1.

Example 2. Consider the boundary value problem:

()
Comparing the given equation with (10) we have
()
Here h = 0.1, so the nodal points are x0, x1, x2, …, x10.

Case  1 (choosing α = 1/6, β = 1/3). From (19) we have
()
and the function values at the nodal points are given by ; that is,
()
Substituting the values of pi, qi, and ri at i = 0,1, 2 … 10 in (16), (17), and (18) we get the values of (Pij), (Zij), (Rij), and substituting these values in (15) we get the tridiagonal matrix A. From (28), (29) we have G and F. So we obtain a system of linear equations. This system in the matrix form is AU + h2DF = G; solving this we get the solution matrix U.
The analytical solution of the given equation is
()
The approximate values (U), exact values (u(x) from (30)), and the absolute errors at the nodal points are summarized in Table 2 and the comparison is given in Figure 2.

Case  2 ((a) choosing α = 1/4, β = 1/4 (b) choosing α = 1/14, β = 3/7). For the values of α, β the procedure followed in Case 1 is used to determine the approximate solution of (24). The approximate values (U), exact values (u(x) from (30)), and the absolute errors at the nodal points of Case 2 are summarized in Tables 3(a) and 3(b), respectively. The comparison of errors in the two cases at the nodal points is given in Figure 2(b).

Example 3. Consider the boundary value problem:

()
Comparing the given equation with (10) we have
()
Here h = 0.1, so the nodal points are x0, x1, x2, …, x10. Solution of (31) is given by (15). Here
()
and the function values at the nodal points is given by ; that is,
()
Substituting the values of pi, qi, and ri at i = 0,1, 2 … , 10 in (16), (17), and (18) we get the values of (Pij), (Zij), and (Rij), and substituting these values in (15) we get the tridiagonal matrix A. From (33), (34) we have G and F. So we obtain a system of linear equations. This system in the matrix form is AU + h2DF = G, solving this we get the solution matrix U.

The analytical solution of the given differential equation is

()
Approximate values, exact values (35), and the absolute errors at the nodal points of u(x) are given in Table 4, and the comparison is given in Figure 3.

Example 4. Consider the boundary value problem:

()
Comparing the given equation with (10) we have qi = q(xi) = −2, r(x) = −2,   fi = f(xi) = −2.  

Here h = 0.1, so the nodal points are x0, x1, x2, …, x10. Solution of (36) is given by (15). Here , where g1 = 0.00333333, g9 = 0.00333333, and the function values at the nodal points is −2. That is,

()
Substituting the values of pi, qi, and ri at i = 0,1, 2, …, 10 in (16), (17), and (18) we get the values of (Pij), (Zij), and (Rij), and substituting these values in (15) we get the tridiagonal matrix A. From (37) we have G and F. So we obtain a system of linear equations. This system in the matrix form is AU + h2DF = G; solving this we get the solution matrix U.

The analytical solution of (36) is commutation

()
Approximate solution, the exact solution, and the absolute errors at the nodal points of u(x) are given in Table 5, and the comparison is given in Figure 4. Comparative results obtained by our method of Example 4 with the values obtained by other methods are given in Table 6 and shown in Figure 4(b).

Example 5. Consider the non linear boundary value problem:

()
Comparing the given equation with (10) by taking g(x) = g(x, u) in (1) we have
()
and the nodal points with h = 0.2 are xi = 0, 0.2, 0.4, 0.6, 0.8, 1 for i = 0,1, 2,3, 4,5.

Now by choosing α = 1/14 and β = 3/7 and substituting these values in (16) and (19) we get the tridiagonal matrices P, D and

()
From (18) we have
()
Substituting P, D, (41), and (42) in (15), we obtain a system of nonlinear equations:
()
Solving these equations by Newton method we get the solution matrix U.

The analytical solution of (39) is

()
The approximate solution (U), exact solution (u(x) of (44)) and the absolute errors are summarized in Table 7, and the comparison is given in Figure 5.

4. Conclusions

In the present work it has been described and demonstrated the applicability and efficiency of the nonpolynomial spline method for solving second order linear and nonlinear two point boundary value problems. The nonpolynomial spline method is tested on different problems. Numerical results for Examples 1, 2, 3, 4, and 5 are presented in Tables 1, 2, 3, 4, 5, 6, and 7, and graphs between the exact solution and approximate solution have been plotted for all the 5 examples. In Example 2 the solution is obtained by choosing different values for α and β, and a comparison of errors is given in Figure 2(b) from which we can say that the error is reduced more rapidly with the choice of α = 1/14 and β = 3/7 than the other choices of α and β, and for Example 4 the graph (Figure 4(b)) is plotted by comparing with the results obtained by other known methods. This shows that the accuracy of our method is better than the accuracy of finite difference method and of B-spline method. All the tables and figures clearly indicate that our numerical solution converges to the exact solution. We conclude that the present method is an applicable technique and approximates the solution very well, and the numerical solutions are in very good agreement with the exact solution. Moreover non-polynomial spline method has less computational cost over other polynomial spline methods. The implementation of the present method is very easy, acceptable, and valid scheme.

    The full text of this article hosted at iucr.org is unavailable due to technical difficulties.