`ISRN Applied MathematicsVolume 2011, Article ID 787694, 15 pageshttp://dx.doi.org/10.5402/2011/787694`
Research Article

## Approximate Solutions of Differential Equations by Using the Bernstein Polynomials

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 , differential equations , and integro-differential equations . Singh et al.  and Yousefi and Behroozifar  have proposed an operational matrix in different ways for solving differential equations. In , 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 , Homotopy perturbation method (HPM) , modified decomposition method (MDM) , Taylor matrix method , and Chebyshev wavelets method . 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 

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  for complete details.

#### 3. Function Approximation

B-polynomials defined above form a complete basis  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 

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 

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 

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 

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 

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 

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  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  and MDM  and method in . 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 . 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 .

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

Example 7.2. Consider the Lane-Emden equation given in  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 , 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.

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

Example 7.3. Consider the Bessel differential equation of order zero given in  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  have been given in . 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.

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

1. 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.
2. 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.
3. 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.
4. 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.
5. 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.
6. 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.
7. 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.
8. 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.
9. 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.
10. 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.
11. 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.
12. 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.
13. M. Mestrovic, “The modified decomposition method for eighth-order boundary value problems,” Applied Mathematics and Computation, vol. 188, no. 2, pp. 1437–1444, 2007.
14. 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.
15. 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.
16. 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.
17. P. J. Davis, Interpolation and Approximation, Dover, New York, NY, USA, 1975.
18. E. Isaacson and H. B. Keller, Analysis of Numerical Methods, Dover, New York, NY, USA, 1994.
19. K. B. Datta and B. M. Mohan, Orthogonal Functions in Systems and Control, World Scientific, River Edge, NJ, USA, 1995.
20. 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.
21. R. T. Farouki, “Legendre-Bernstein basis transformations,” Journal of Computational and Applied Mathematics, vol. 119, no. 1-2, pp. 145–160, 2000.
22. 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.