Journal of Applied Mathematics

Volume 2013, Article ID 591636, 5 pages

http://dx.doi.org/10.1155/2013/591636

## A Legendre Wavelet Spectral Collocation Method for Solving Oscillatory Initial Value Problems

^{1}Institute for Mathematical Research, University Putra Malaysia, 43400 Serdang, Selangor, Malaysia^{2}Department of Mathematics, University Putra Malaysia, 43400 Serdang, Selangor, Malaysia^{3}Department of Mathematics, Khorasgan Branch, Islamic Azad University, Khorasgan, Isfahan, Iran^{4}School of Mathematical Sciences, National University of Malaysia (UKM), 43600 Bangi, Selangor, Malaysia

Received 26 January 2013; Revised 15 April 2013; Accepted 15 April 2013

Academic Editor: Srinivasan Natesan

Copyright © 2013 A. Karimi Dizicheh et al. 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 this paper, we propose an iterative spectral method for solving differential equations with initial values on large intervals. In the proposed method, we first extend the Legendre wavelet suitable for large intervals, and then the Legendre-Guass collocation points of the Legendre wavelet are derived. Using this strategy, the iterative spectral method converts the differential equation to a set of algebraic equations. Solving these algebraic equations yields an approximate solution for the differential equation. The proposed method is illustrated by some numerical examples, and the result is compared with the exponentially fitted Runge-Kutta method. Our proposed method is simple and highly accurate.

#### 1. Introduction

In this paper, we are concerned with the numerical solution of the initial value problem: with the initial conditions on a large domain . This kind of initial value problems appear in many practical life models and are fundamentally important in both theory and applications. It has applications in many branches of science including celestial mechanics, fluid mechanics, heat wave equations, astrophysics, quantum chemistry, and electronics; for example, see [1–4]. Therefore, it is worthwhile to develop numerical methods to approximate their solutions.

Spectral methods are very powerful tools for solving many kinds of differential equations (and recently integral equations) arising in various fields of science and engineering [5, 6]. There are two main advantages for spectral methods. One is associated with high accuracy, that is also called “exponential convergence" meaning that the errors are exponentially small. The second advantage is that they can be easily implemented. These are two effective properties which have encouraged many active researchers to use them for different equations. Among many types of spectral methods, collocation methods are specific approaches that are more applicable and widely used. Spectral collocation methods have been used by many authors; for examples, see [7–12].

In recent years, wavelets have found their way into many different fields of theoretical and practical sciences. Many researchers started using various wavelets [13–15] for analyzing problems of high computational complexity. It is proved that wavelets are powerful tools for exploring new problems and solving differential equations. The Haar wavelets are alternative tools that have been studied for similar purposes; see [16–19].

In this paper, we introduce a reliable algorithm based on the Legendre wavelets spectral method to obtain numerical solutions of nonlinear ordinary differential equations on large intervals. There is a difficulty involved with a direct usage of spectral methods and their numerical integration for this type of equations. By introducing a new Legendre wavelet interpolant approximation, these difficulties rest mainly with the improved Legendre waveletspectral method. The method of this paper solves the problem iteratively. The validation of this technique is especially tested for solutions having oscillatory behavior. Numerical examples are included to demonstrate the efficiency and high accuracy of the proposed method.

The remainder of the paper is organized as follows. In Section 2, we explain the basic properties of the Legendre wavelets and Legendre polynomials. The family of the Legendre wavelet is an important example; see Kajani and Vencheh [20]. Then we introduce an interpolation with the Legendre wavelet on shifted Legendre-gauss points and its coefficients. We apply the Legendre wavelets on the spectral method for solving differential equations in large intervals in Section 3. Section 4 is devoted to the numerical results, compared to the exponentially fitted Runge-Kutta method; see Berghe et al. [21, 22]. Finally, in Section 5, the report ends with a brief conclusion.

#### 2. The Legendre Wavelets Spectral Method

In this section, we describe spectral method on the Legendre wavelets. First, the Legendre wavelets on large domain and then spectral method are briefly introduced. Next, we state how the interpolation can be performed using the Legendre wavelets.

##### 2.1. Review of Legendre Wavelets and Legendre Polynomials

Continuous wavelets transform (see [20]) is defined by for any continuous function , where is called the scale and is referred by the shift. A discrete wavelet transform is given by in which the scale and shift are replaced by for any . Here, we intend to consider a family of discrete wavelets when is derived from a Legendre polynomial, and it depends on five arguments, namely, ; is a large integer, is the order of the Legendre polynomial, stands for the normalized time, Therefore, we define the Legendre wavelets on the interval by where is the famous th-order Legendre polynomial with the orthogonal weight function . An orthonormal set of the Legendre wavelets is presented in [20]. The Legendre polynomials are obtained by the recursive formulas: Further, the Legendre-Gauss quadrature formula is defined as follows where the Legendre-Gauss collocation points are the roots of in and are corresponding weights. While explicit formulas for the quadrature nodes are not known, the quadrature weights can be expressed by the following relation: Thanks to the property of the Legendre-Gauss quadrature formula, it follows that where For more details about the Legendre polynomials, see [6].

##### 2.2. Interpolation by the Legendre Wavelets

A function can be expanded in terms of the Legendre wavelets as where are the Legendre wavelets defined by (6) and are given by Equation (13) can be approximated using the quadrature rule in (8) as follows: where Substituting (13) into (12) gives rise to Equation (16) gives the “completeness relation” for the basis set, namely, and is therefore an identity. If (14) is substituted into (12) (truncated at and ) we have The discrete version of (17) is given by Equations (12) (truncated at and ), and (14) also supply interpolation functions governed by In particular, . This implies that since the following holds:

#### 3. Solving IVPs on a Large Domain

Consider the initial value problem governed by (1) and (2). In order to solve this problem, we divide the interval into some subintervals given by for . Consequently, implies that Thus, for all . As a result, the Legendre wavelet interpolant approximation to the function on the th subinterval follows (21) and is given by Inductively, we define that Applying the points into (1) leads to Besides, the initial conditions for the th subinterval can be approximated as follows:

Equations (26) and (27) give a system of algebraic equations. By solving this algebraic system, we obtain . Then, the approximate solution on the th subinterval is obtained by substituting into (24).

Our proposed procedure starts with setting . The initial conditions in (2) are used for the approximate solution for the first subinterval . This allows to obtain the initial conditions for the second subinterval from (27). Consequently, the approximate solution of the second subinterval is computed. The procedure is repeated till the last subinterval. Finally, the approximate solution of the IVP in (1) and (2) on the whole domain is obtained by

#### 4. Numerical Experiments

We apply the method presented in the last section and numerically solve five problems to demonstrate the efficiency of the proposed method. We also compare the results with exponentially fitted Runge-Kutta method [21, 22]. Further, the global errors evaluated at the end point of the interval are tabulated. The following notations are used in the tables.

LWSM stands for “the Legendre wavelets on spectral method,”

EFRKMB denotes “the exponentially fitted Runge-Kutta method using Vanden Berghe's technique with ”; see [21, 22].

*Example 1. *Consider the initial value problem
for , where .

The exact solutions of this problem are . In order to obtain a solid criterion for a global error assessment, we estimate the error at the endpoints. The Euclidean norms of the end-point global errors are provided in Table 1. Table 1 demonstrates that LWSM gives a better approximation than that of EFRKMB.

*Example 2. *Let
for , where .

The exact solution of this initial value problem is given by . Table 2 represents the Euclidean norms of the numerical errors at the endpoints associated with LWSM and EFRKMB. It indicates that our approach is highly more accurate than EFRKMB in this example. Furthermore, the error decreases for any increase in and as it is also the case for Example 1.

*Example 3. *Let
for , where . The exact solution of this initial value problem is . The numerical data associated with the end-point global errors are provided in Table 3 which give us similar conclusions to Examples 1 and 2 as expected.

*Example 4. *Let
where , , and .

The exact solution is governed by The numerical comparison of the two methods using the Euclidean norms of the end-point global errors is provided in Table 4. Similar conclusions to those of previous examples are drawn in this table.

#### 5. Conclusions

We define an interpolation using the Legendre wavelets for the shifted Legendre-Guass collocation points. Then, this gives rise to a set of algebraic equations, and finally its solution constitutes the desired approximate solutions. Our approach is based on a partitioning of the domain interval and solving a given IVP iteratively on each interval. This approach is called an iterative spectral method and is suitable for solving IVP on large intervals.

The main characteristic behind this technique is that it iteratively solves the IVP and the defined interpolation substantially reduces the computational effort. This leads to highly accurate numerical results as depicted by several examples. The proposed method is simple and easy to implement in practical problems. It can be applied for solving other mathematical equations, such as integral equations, integro-differential equations and partial differential equations.

#### References

- E. Fehlberg, “Low-order classical Runge-Kutta formulas with stepsize control and their application to some heat transfer problems,”
*NASA Technical Report*315, 1969. View at Google Scholar - A. D. Raptis and A. C. Allison, “Exponential-fitting methods for the numerical solution of the schrodinger equation,”
*Computer Physics Communications*, vol. 14, no. 1-2, pp. 1–5, 1978. View at Google Scholar · View at Scopus - R. B. Berstein, A. Dalgarno, H. Massey, and J. C. Percival, “Thermal scattering of atoms by homonuclear diatomic molecules,”
*Proceedings of the Royal Society of London A*, vol. 274, no. 1359, pp. 427–442, 1963. View at Google Scholar - A. C. Allison, “The numerical solution of coupled differential equations arising from the Schrödinger equation,”
*Journal of Computational Physics*, vol. 6, pp. 378–391, 1970. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - J. P. Boyd,
*Chebyshev and Fourier Spectral Methods*, Dover, New York, NY, USA, 2nd edition, 2000. View at MathSciNet - C. Canuto, M. Y. Hussaini, A. Quarteroni, and T. A. Zang,
*Spectral Methods in Fluid Dynamics*, Springer Series in Computational Physics, Springer, New York, NY, USA, 1988. View at MathSciNet - J. P. Boyd, C. Rangan, and P. H. Bucksbaum, “Pseudospectral methods on a semi-infinite interval with application to the hydrogen atom: a comparison of the mapped Fourier-sine method with Laguerre series and rational Chebyshev expansions,”
*Journal of Computational Physics*, vol. 188, no. 1, pp. 56–74, 2003. View at Publisher · View at Google Scholar · View at Scopus - W. Bao and J. Shen, “A generalized-Laguerre-Hermite pseudospectral method for computing symmetric and central vortex states in Bose-Einstein condensates,”
*Journal of Computational Physics*, vol. 227, no. 23, pp. 9778–9793, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - D. Olmos and B. D. Shizgal, “A pseudospectral method of solution of Fisher's equation,”
*Journal of Computational and Applied Mathematics*, vol. 193, no. 1, pp. 219–242, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - D. Olmos and B. D. Shizgal, “Pseudospectral method of solution of the Fitzhugh-Nagumo equation,”
*Mathematics and Computers in Simulation*, vol. 79, no. 7, pp. 2258–2278, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - C. Canuto, A. Quarteroni, M. Y. Hussaini, and T. A. Zang,
*Spectral Methods Fundamentals in Single Domains*, Scientific Computation, Springer, New York, NY, USA, 2006. View at MathSciNet - B. D. Shizgal, “Spectral methods based on nonclassical basis functions: the advection-diffusion equation,”
*Computers & Fluids*, vol. 31, no. 4–7, pp. 825–843, 2002. View at Publisher · View at Google Scholar · View at MathSciNet - G. Beylkin, R. Coifman, and V. Rokhlin, “Fast wavelet transforms and numerical algorithms. I,”
*Communications on Pure and Applied Mathematics*, vol. 44, no. 2, pp. 141–183, 1991. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - C. F. Chen and C. H. Hsiao, “Haar wavelet method for solving lumped and distributedparameter systems,”
*IEE Proceedings Control Theory and Applications*, vol. 144, no. 1, pp. 87–94, 1997. View at Publisher · View at Google Scholar - 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. View at Publisher · View at Google Scholar · View at MathSciNet - H. R. Karimi, “A computational method for optimal control problem of time-varying state-delayed systems by Haar wavelets,”
*International Journal of Computer Mathematics*, vol. 83, no. 2, pp. 235–246, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. R. Karimi, P. J. Maralani, B. Moshiri, and B. Lohmann, “Haar wavelet-based approach for optimal control of second-order linear systems in time domain,”
*Journal of Dynamical and Control Systems*, vol. 11, no. 2, pp. 237–252, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. R. Karimi, B. Moshiri, B. Lohmann, and P. J. Maralani, “Numerically efficient approximations to the optimal control of linear singularly perturbed systems based on Haar wavelets,”
*International Journal of Computer Mathematics*, vol. 82, no. 4, pp. 495–507, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. R. Karimi, B. Lohmann, P. J. Maralani, and B. Moshiri, “A computational method for solving optimal control and parameter estimation of linear systems using Haar wavelets,”
*International Journal of Computer Mathematics*, vol. 81, no. 9, pp. 1121–1132, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. T. Kajani and A. H. Vencheh, “Solving linear integro-differential equation with Legendre wavelets,”
*International Journal of Computer Mathematics*, vol. 81, no. 6, pp. 719–726, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - G. V. Berghe, H. de Meyer, M. van Daele, and T. van Hecke, “Exponentially-fitted explicit Runge-Kutta methods,”
*Computer Physics Communications*, vol. 123, no. 1–3, pp. 7–15, 1999. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - G. V. Berghe, H. de Meyer, M. van Daele, and T. van Hecke, “Exponentially fitted Runge-Kutta methods,”
*Journal of Computational and Applied Mathematics*, vol. 125, no. 1-2, pp. 107–115, 2000. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet