ISRN Applied MathematicsVolume 2011 (2011), Article ID 787694, 15 pagesdoi:10.5402/2011/787694

Research Article

Approximate Solutions of Differential Equations by Using the Bernstein Polynomials

Y. Ordokhani and S. Davaei far

Department of Mathematics, Alzahra University, Tehran, Iran

Received 12 March 2011; Accepted 19 April 2011

Academic Editors: F. Ding and G. Psihoyios

Copyright © 2011 Y. Ordokhani and S. Davaei far. 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.

A numerical method for solving differential equations by approximating the solution in the Bernstein polynomial basis is proposed. At first, we demonstrate the relation between the Bernstein and Legendre polynomials. By using this relation, we derive the operational matrices of integration and product of the Bernstein polynomials. Then, we employ them for solving differential equations. The method converts the differential equation to a system of linear algebraic equations. Finally some examples and their numerical solutions are given; comparing the results with the numerical results obtained from the other methods, we show the high accuracy and efficiency of the proposed method.

1. Introduction

In recent years, the Bernstein polynomials (B-polynomials) have attracted the attention of many researchers. These polynomials have been utilized for solving different equations by using various approximate methods. For instance, B-polynomials have been used for solving Fredholm integral equations [1, 2], Volterra integral equations [3], differential equations [4–7], and integro-differential equations [8]. Singh et al. [6] and Yousefi and Behroozifar [7] have proposed an operational matrix in different ways for solving differential equations. In [6], the B-polynomials have been first orthonormalized by using Gram-schmidt orthonormalization process, and then the operational matrix of integration has been obtained. By the expansion of B-polynomials in terms of Taylor basis, Yousefi and Behroozifar have found the operational matrices of integration and product of B-polynomials. In this paper, firstly, we present operational matrices of integration and product for the B-polynomials, by the expansion of B-polynomials in terms of Legendre polynomials. Then, we use them for solving differential equation

with the initial conditions

where and , are given functions and is the unknown function to be determined. The main characteristic of this technique is that it reduces these equations to those of an easily soluble algebraic equation, thus greatly simplifying the equations. Special attention has been given to the applications of Legendre wavelets method [9–11], Homotopy perturbation method (HPM) [12], modified decomposition method (MDM) [13], Taylor matrix method [14], and Chebyshev wavelets method [15]. The organization of this paper is as follows: in Section 2, we introduce the B-polynomials and their properties. Section 3 is devoted to the function approximation by using B-polynomials basis. Section 4 introduces the expansion of B-polynomial in terms of Legendre basis, and vice versa. The operational matrices of integration and product will be derived in Section 5. Section 6 is devoted to the solution method of differential equations. In section 7, we present some numerical examples. Numerical solution of each equation based on the exact and approximate solutions are compared. And Section 8 offers our conclusion.

2. B-Polynomials and Their Properties

The B-polynomials of th degree are defined on the interval as [4]

where

There are ,th degree B-polynomials. For mathematical convenience, we usually set , if or . These polynomials are quite easy to write down: the coefficients can be obtained from Pascal’s triangle. It can easily be shown that each of the B-polynomials is positive and also the sum of all the B-polynomials is unity for all real , that is,

See [16] for complete details.

3. Function Approximation

B-polynomials defined above form a complete basis [1] over the interval . It is easy to show that any given polynomial of degree can be expressed in terms of linear combination of the basis functions. A function defined over may be expanded as

Equation (3.1) can be written as

where and are vectors given by

The use of an orthogonal basis on allows us to directly obtain the least-squares coefficients of in that basis, and also ensures permanence of these coefficients with respect to the degree of the approximant, that is, all the coefficients of agree with those of , except for that of the newly introduced term. The B-polynomials are not orthogonal. But, these can be expressed in terms of some orthogonal polynomials, such as the Legendre polynomials. The Legendre polynomials constitute an orthogonal basis that is well suited [17, 18] to least-squares approximation.

4. Expansion of B-Polynomials in Terms of Legendre Basis and Vice Versa

To use the Legendre polynomials for our purposes, it is preferable to map this to . A set of shifted Legendre polynomials, denoted by for , is orthogonal with respect to the weighting function over the interval . These polynomials satisfy the recurrence relation [19]

with

The orthogonality of these polynomials is expressed by the relation

When the approximant (3.1) is expressed in the Legendre form

by using (4.3), we can obtain the Legendre coefficients as

Lemma 4.1. The Legendre polynomial can be expressed in the kth degree Bernstein basis as [20]

Now consider a polynomial of degree , expressed in the th degree Bernstein and Legendre bases on

We write the transformation of the Legendre polynomials on into the th degree Bernstein basis functions as [21]

The elements , , form an basis conversion matrix . To compute them, we multiply (4.8) by , integrate over , and use (4.3) to obtain

We now replace (4.6) into (4.9) and obtain

The integrals of the products of Bernstein basis functions can be found using

as follows:

Therefore, we have the elements of as

Now, we write the transformation of the B-polynomials on into th degree Legendre basis functions as [21]

The elements form an basis conversion matrix . Replacing (4.14) into (4.7) and rearranging the order of summation, we obtain

Since we can express each th degree Bernstein basis function in the th degree Bernstein basis as [21]

replacing (4.16) into (4.6) and rearranging the order of summation, we find that the basis transformation (4.14) is defined by the elements

of the matrix for . If we denote the Legendre basis vector as

using (3.4), (4.8), (4.14), and (4.18), we have

5. Operational Matrices of Integration and Product of B-Polynomials

5.1. B-Polynomials Operational Matrix of Integration

Let be an operational matrix of integration, then

By using (4.19), we have

where the matrix is the operational matrix of integration of the shifted Legendre polynomials on the interval and can be obtained as [22]

and, therefore, by using (4.20)–(5.2), we have the operational matrix of integration as

5.2. B-Polynomials Operational Matrix of Product

In this subsection, we present a general formula for finding the operational matrix of product of th degree B-polynomials. Suppose that is an arbitrary vector, then is an operational matrix of product whenever

Using (4.19) and since , we have

Now, we approximate all functions in terms of for . Let

by (3.2), we have

Using (4.15), we can obtain the elements of vector , for . Therefore,

where

If we define a matrix , then by using (5.6) and (5.9), we have

and, therefore, we have the operational matrix of product as

6. Solution of the Linear Differential Equation

Consider the linear differential equation (1.1) with the initial conditions (1.2). If we approximate , , and as follows:

where , , , and are the coefficients which are defined similarly to (3.3). With -times integrating from (6.2) with respect to between to , using (5.1) and the initial conditions (1.2), we will have

Let

where

Substituting (6.4) into (6.3), we have

Replacing (6.6) and (6.7) into (1.1), we obtain

Using (5.5), we have

Therefore, we get

The unknown vector can be obtained by solving (6.10). Once is known, can be calculated from (6.7).

7. Illustrative Examples

Example 7.1. Consider the eighth-order linear differential equation given in [14] by with the initial conditions The exact solution for this example is . Using the method described in Section 6, we assume that is approximated by By using (5.1) and the initial conditions (7.2), we have where We can express function as Substituting (7.3)–(7.6) into (7.1), we obtain Therefore, we get where is the identity matrix and Equation (7.8) is a set of algebraic equations which can be solved for . Now, we apply the method presented in this paper with to solve (7.1) with the initial conditions (7.2). In Table 1, the numerical results obtained by the present method are compared with the results of the HPM [12] and MDM [13] and method in [14]. As we see from this table, it is clear that the result obtained by the present method is very superior to that by HPM, MDM methods, and method in [14]. The absolute difference between exact and approximate solutions is plotted in Figure 1. It is observed in this figure that the accuracy is of the order of .

Table 1: Numerical results for Example 7.1.

Exact solution
Method of [12]
Method of [13]
Method of [14]
Presented method

for
for
for
for

0
1
1
1
1
0.9999999992

0.1
0.9946538263
0.9946538263
0.9946538262
0.9946538266
0.9946538261

0.2
0.9771222065
0.9771222065
0.9771222014
0.9771222093
0.9771222065

0.3
0.9449011653
0.9449011653
0.9449010769
0.9449011752
0.9449011655

0.4
0.8950948186
0.8950948186
0.8950941522
0.8950948487
0.8950948184

0.5
0.8243606354
0.8243606356
0.8243574386
0.8243607328
0.8243606353

0.6
0.7288475202
0.728847522
0.7288359969
0.7288478604
0.7288475204

0.7
0.6041258122
0.6041258211
0.6040917111
0.6041269662
0.6041258121

0.8
0.4451081857
0.4451082201
0.4450208387
0.4451117669
0.4451081857

0.9
0.2459603111
0.2459604249
0.2457599482
0.2459703618
0.2459603113

1
0

Figure 1: Absolute difference between exact and approximate solutions of Example 7.1.

Example 7.2. Consider the Lane-Emden equation given in [10] by with the initial conditions The exact solution of this example is . We solve (7.9) with the initial conditions (7.10) by using the method in Section 6 with . The comparison among the present method, Legendre wavelets solution [10], and analytic solution for is shown in Table 2. As we see from this Table, it is clear that the result obtained by the present method is very superior to that by Legendre wavelets method. It is noted that the mean square error for this example, obtained in Legendre wavelets method, is ; but in the present method, the mean square error is . We display a plot of the approximate and exact solution of this example for in Figure 2.

Table 2: Numerical results for Example 7.2.

Exact solution
Method  of [10]
Presented method

for
for

0.01
1.00010001
0.9958
1.00010001

0.3
1.09417428
1.0942
1.09417428

0.5
1.28402542
1.2843
1.28402542

0.75
1.75505466
1.7551
1.75505466

0.9
2.24790799
2.2480
2.24790799

0.95
2.46575981
2.4658
2.46575981

1
2.71828183
2.7184
2.71828183

Figure 2: Approximate and exact solution of Example 7.2 for .

Example 7.3. Consider the Bessel differential equation of order zero given in [15] by with the initial conditions The exact solution of this example is Now, we solve (7.11) with the initial conditions (7.12) by using the method in Section 6 with . Table 3 shows the absolute difference between exact and approximate solutions of the present method and the methods in [11, 15] for equality basis functions. The results of [11] have been given in [15]. As we see from this table, the maximum error for this example, for the methods in [11, 15], is ; but in the present method, the maximum error is . We display a plot of the approximate and exact solution of this example for in Figure 3.

Table 3: Numerical results for Example 7.3.

Method of [11]
Method of [15]
Presented method

for ,
for ,
for

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Figure 3: Approximate and exact solution of Example 7.3 for .

8. Conclusion

In this article, at first, we demonstrate the relation between the Bernstein and Legendre polynomials. By using this relation, we derived the operational matrix of integration and product of B-polynomials. They are applied to solve ordinary differential equations. The present method reduces an ordinary differential equations into a set of algebraic equations. We applied the presented method on three test problems and compared the results with their exact solutions and the other methods, revealing that the present method is very effective and convenient.

Acknowledgment

The work was supported by Alzahra university.

References

B. N. Mandal and S. Bhattacharya, “Numerical solution of some classes of integral equations using Bernstein polynomials,” Applied Mathematics and Computation, vol. 190, no. 2, pp. 1707–1716, 2007.

A. Chakrabarti and S. C. Martha, “Approximate solutions of Fredholm integral equations of the second kind,” Applied Mathematics and Computation, vol. 211, no. 2, pp. 459–466, 2009.

S. Bhattacharya and B. N. Mandal, “Use of Bernstein polynomials in numerical solutions of Volterra integral equations,” Applied Mathematical Sciences, vol. 2, no. 36, pp. 1773–1787, 2008.

M. I. Bhatti and P. Bracken, “Solutions of differential equations in a Bernstein polynomial basis,” Journal of Computational and Applied Mathematics, vol. 205, no. 1, pp. 272–280, 2007.

D. D. Bhatta and M. I. Bhatti, “Numerical solution of KdV equation using modified Bernstein polynomials,” Applied Mathematics and Computation, vol. 174, no. 2, pp. 1255–1268, 2006.

A. K. Singh, V. K. Singh, and O. P. Singh, “The Bernstein operational matrix of integration,” Applied Mathematical Sciences, vol. 3, no. 49, pp. 2427–2436, 2009.

S. A. Yousefi and M. Behroozifar, “Operational matrices of Bernstein polynomials and their applications,” International Journal of Systems Science, vol. 41, no. 6, pp. 709–716, 2010.

S. Bhattacharya and B. N. Mandal, “Numerical solution of a singular integro-differential equation,” Applied Mathematics and Computation, vol. 195, no. 1, pp. 346–350, 2008.

S. Yousefi, “Legendre wavelets method for solving differential equations of Lane-Emden type,” Applied Mathematics and Computation, vol. 181, no. 2, pp. 1417–1422, 2006.

X. Zheng and X. Yang, “Techniques for solving integral and differential equations by Legendre wavelets,” International Journal of Systems Science, vol. 40, no. 11, pp. 1127–1137, 2009.

M. Razzaghi and S. Yousefi, “Legendre wavelets direct method for variational problems,” Mathematics and Computers in Simulation, vol. 53, no. 3, pp. 185–192, 2000.

A. Golbabai and M. Javidi, “Application of homotopy perturbation method for solving eighth-order boundary value problems,” Applied Mathematics and Computation, vol. 191, no. 2, pp. 334–346, 2007.

M. Mestrovic, “The modified decomposition method for eighth-order boundary value problems,” Applied Mathematics and Computation, vol. 188, no. 2, pp. 1437–1444, 2007.

N. Kurt and M. Sezer, “Polynomial solution of high-order linear Fredholm integro-differential equations with constant coefficients,” Journal of the Franklin Institute, vol. 345, no. 8, pp. 839–850, 2008.

E. Babolian and F. Fattahzadeh, “Numerical solution of differential equations by using Chebyshev wavelet operational matrix of integration,” Applied Mathematics and Computation, vol. 188, no. 1, pp. 417–426, 2007.

R. T. Farouki and V. T. Rajan, “Algorithms for polynomials in Bernstein form,” Computer Aided Geometric Design, vol. 5, no. 1, pp. 1–26, 1988.

P. J. Davis, Interpolation and Approximation, Dover, New York, NY, USA, 1975.

E. Isaacson and H. B. Keller, Analysis of Numerical Methods, Dover, New York, NY, USA, 1994.

K. B. Datta and B. M. Mohan, Orthogonal Functions in Systems and Control, World Scientific, River Edge, NJ, USA, 1995.

Y. M. Li and X. Y. Zhang, “Basis conversion among Bezier, Tchebyshev and Legendre,” Computer Aided Geometric Design, vol. 15, no. 6, pp. 637–642, 1998.

R. T. Farouki, “Legendre-Bernstein basis transformations,” Journal of Computational and Applied Mathematics, vol. 119, no. 1-2, pp. 145–160, 2000.

C. H. Hsiao, “Hybrid function method for solving Fredholm and Volterra integral equations of the second kind,” Journal of Computational and Applied Mathematics, vol. 230, no. 1, pp. 59–68, 2009.