International Journal of Engineering MathematicsVolume 2013 (2013), Article ID 482050, 9 pageshttp://dx.doi.org/10.1155/2013/482050

Research Article

Solution of Boundary Value Problems by Approaching Spline Techniques

P. Kalyani and P. S. Rama Chandra Rao

Kakatiya Institute of Technology and Sciences, Warangal 506001, India

Received 23 March 2013; Revised 3 July 2013; Accepted 6 August 2013

Academic Editor: Shuli Sun

Copyright © 2013 P. Kalyani and P. S. Rama Chandra Rao. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

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 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 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 ) 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   on such that A nonpolynomial function of class which interpolates at the mesh points , for , depends on a parameter and reduces to ordinary cubic spline in as . The spline function we propose has the following form: , 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 . Thus in each subinterval , we have

For each segment , the non-polynomial has the following form: where , , , and are constants and is a free parameter. Let be an approximation to , obtained by the segment of mixed spline function passing through the points and . To obtain the necessary conditions for the coefficients introduced in (5), we not only require to satisfie interpolate conditions at and , but also the continuity of first derivative at the common nodes to be fulfilled.

To derive an expression for the coefficients of (5) in terms of , , , , we first denote From algebraic simplification we get the following expression: where and using the continuity of the first derivative at ; that is, , we obtain the following relations for and whenever ; then and . 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 by By using moment of the spline in (11) we obtain Taking approximations for the first derivative of we have Substituting (12), (13) in (8) and simplifying, we get the following tridiagonal system which gives the approximations of the solution at : with , .

The tridiagonal linear system (14) can be written in the following matrix form: is a tridiagonally dominant matrix of order .

is a tridiagonal matrix defined by , are tridiagonal matrices defined as The tridiagonal matrix is defined by

3. Numerical Illustrations

In the present work four linear boundary value problems with and one nonlinear boundary value problem with 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 1–7, and comparisons are shown in Figures 1–5. 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
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).

(a)  

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

(b)  

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

Figure 1: Comparison of approximate values and exact values for Example 1.

(a)

(b)

Figure 2: (a) Comparison of approximate values and exact values for Example 2. (b) Comparison of errors in 2 cases for Example 2.

Figure 3: Comparison of approximate values and exact values for Example 3.

(a)

(b)

Figure 4: (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).

Figure 5: 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 , , at in (16), (17), and (18) we get the values of , , , and taking these values in (15) we get the tridiagonal matrix . From (23), (24) we have and so we obtain a system of linear equations. This system in the matrix form is ; that is,

Solving this we get the solution matrix . The approximate values , exact values ( 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 , so the nodal points are

Case  1 (choosing , ). From (19) we have

and the function values at the nodal points are given by ; that is, Substituting the values of , , and at in (16), (17), and (18) we get the values of , , , and substituting these values in (15) we get the tridiagonal matrix . From (28), (29) we have and . So we obtain a system of linear equations. This system in the matrix form is ; solving this we get the solution matrix .

The analytical solution of the given equation is The approximate values , exact values ( 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 , (b) choosing , ). For the values of , the procedure followed in Case 1 is used to determine the approximate solution of (24). The approximate values , exact values ( 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 , so the nodal points are 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 , , and at in (16), (17), and (18) we get the values of , , and , and substituting these values in (15) we get the tridiagonal matrix . From (33), (34) we have and . So we obtain a system of linear equations. This system in the matrix form is , solving this we get the solution matrix . The analytical solution of the given differential equation is Approximate values, exact values (35), and the absolute errors at the nodal points of 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 , , Here , so the nodal points are . Solution of (36) is given by (15). Here , where , , and the function values at the nodal points is −2. That is, Substituting the values of , , and at in (16), (17), and (18) we get the values of , , and , and substituting these values in (15) we get the tridiagonal matrix . From (37) we have and . So we obtain a system of linear equations. This system in the matrix form is ; solving this we get the solution matrix .The analytical solution of (36) is commutation Approximate solution, the exact solution, and the absolute errors at the nodal points of 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 in (1) we have and the nodal points with are for .Now by choosing and and substituting these values in (16) and (19) we get the tridiagonal matrices , and From (18) we have Substituting , , (41), and (42) in (15), we obtain a system of nonlinear equations: Solving these equations by Newton method we get the solution matrix .The analytical solution of (39) is The approximate solution , exact solution ( 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 and 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.

References

W. G. Bickley, “Piecewise cubic interpolation and two-point boundary problems,” Computer Journal, vol. 11, no. 2, pp. 206–208, 1968.

A. Khan, “Parametric cubic spline solution of two point boundary value problems,” Applied Mathematics and Computation, vol. 154, no. 1, pp. 175–182, 2004.

TNE Greville, Introduction to Spline Functions in: Theory and Applications of Spline Functions, Academic Press, New York, NY, USA, 1967.

J. H. Ahlberg, E. N. Nilson, and J. I. Walsh, The Theory of Splines and Their Applications, Academic Press, New York, NY, USA, 1967.

M. M. Chawla and C. P. Katti, “A finite-difference method for a class of singular two-point boundary-value problems,” IMA Journal of Numerical Analysis, vol. 4, no. 4, pp. 457–466, 1984.

P. S. Rama Chandra Rao, “Solution of a class of boundary value problems using numerical integration,” Indian Journal of Mathematics and Mathematical Sciences, vol. 2, no. 2, pp. 137–146, 2006.

A. S. V. Ravi Kanth and Y. N. Reddy, “Cubic spline for a class of singular two-point boundary value problems,” Applied Mathematics and Computation, vol. 170, no. 2, pp. 733–740, 2005.

J. H. He, “Variational iteration method-a kind of non-linear analytical technique: some examples,” International Journal of Non-Linear Mechanics, vol. 34, no. 4, pp. 699–708, 1999.

G. Adomian, M. Elrod, and R. Rach, “A new approach to boundary value equations and application to a generalization of Airy's equation,” Journal of Mathematical Analysis and Applications, vol. 140, no. 2, pp. 554–568, 1989.

Q. Fang, T. Tsuchiya, and T. Yamamoto, “Finite difference, finite element and finite volume methods applied to two-point boundary value problems,” Journal of Computational and Applied Mathematics, vol. 139, no. 1, pp. 9–19, 2002.

H. Caglar, N. Caglar, and K. Elfaituri, “B-spline interpolation compared with finite difference, finite element and finite volume methods which applied to two-point boundary value problems,” Applied Mathematics and Computation, vol. 175, no. 1, pp. 72–79, 2006.

J. Chang, Q. Yang, and L. Zhao, “Comparison of B-spline method and finite difference method to solve BVP of linear ODEs,” Journal of Computers, vol. 6, no. 10, pp. 2149–2155, 2011.