International Journal of Pure and Applied Mathematics Volume 98 No. 4 25, 457-469 ISSN: 3-88 (printed version); ISSN: 34-3395 (on-line version) url: http://www.ijpam.eu doi: http://dx.doi.org/.2732/ijpam.v98i4.4 PAijpam.eu NUMERICAL SOLUTION OF WAVE EQUATION USING HAAR WAVELET Inderdeep Singh, Sangeeta Arora 2, Sheo Kumar 3,3 Department of Mathematics Dr. B.R. Ambedkar National Institute of Technology Jalandhar, 44, Punjab, INDIA 2 PG Department Computer Science and IT HMV College Jalandhar 448, Punjab, INDIA Abstract: Haar wavelet is a powerful mathematical tool used to solve various type of partial differential equations. The solutions obtained by Haar wavelet are more accurate and efficient. We present here a Haar wavelet method for numerical solution of wave equation. The numerical solution obtained here by the present method, are more accurate and better than that are presented in Shi [5]. AMS Subject Classification: 65M99 Key Words: wave equation, Haar wavelet, function approximation. Introduction Wavelet, being a powerful mathematical tool, has been widely used in image digital processing, quantum field theory and numerical analysis. Wave equation is a special partial differential equation arising in numerous engineering problems. Wave equation is a second order hyperbolic partial differential equation and it describes the phenomenon of wave vibration and wave propagation. Consider the partial differential equation of the form Received: June 24, 24 Correspondence author c 25 Academic Publications, Ltd. url: www.acadpubl.eu
458 I. Singh, S. Arora, S. Kumar with initial conditions and boundary conditions 2 u t 2 = u c2 2 2 +f(x,t), < x <,t >, () x u t= = g(x), u t t= =, < x <, (2) u x= =,u x= =,t >, (3) where u(x,t) represents the displacement of every point at time t, c 2 = F/σ, F represents the tension of every point in the media, σ represents medium density, F and σ are constant, so c 2 is also constant, f(x,t) represents the external force on per unit mass. In Section 2, we briefly describe Haar wavelet method. In Section 3, we have described function approximation. Methods for solving wave equation have been presented in Section 4 and in Section 5, numerical examples have been solved using the Haar wavelet method to illustrate the efficiency and accuracy of present method over the method described in Shi [5]. 2. Haar Wavelet Method In recent decades the field of Haar wavelets for solving partial differential equations have attracted interest of researchers in several areas of science and engineering. A survey on differential equation is presented in Hariharan[6]. Wavelet analysis ia a new branch of mathematics and widely applied in differential and integral equations. Several methods have been proposed to find the numerical solution of different linear and nonlinear partial differential equations. Wavelets have been applied extensively in mathematical problems related to scientific and engineering fields. There are many wavelet families such as Daubechies wavelet [8], Hermite-type trigonometric wavelet and many more. In 9, Haar [7] introduced a function which presents a rectangular pulse pair. After that various generalizations were proposed. Among all these wavelet families, it is the simplest orthonormal wavelet with compact support. Haar wavelet is Daubechies wavelet of order one. Hariharan et al. [3] presented the numerical solution of Fisher s equation using Haar wavelet. Further using Haar wavelet, Hariharan and Kannan [4] solved numerically Fitzhugh-Nagumo equation. Berwal et al. [2] presented the numerical solution of Telegraph equation using Haar wavelet.
NUMERICAL SOLUTION OF WAVE EQUATION... 459 Lepik [9] and [] presented methods based on Haar wavelet for numerical solution of differential and integral equations. The Haar functions are an orthogonal family of switched rectangular waveforms where amplitudes can differ from one function to another. They are defined in the interval [,]., α x < β, h i (x) =, β x < γ,, otherwise. where α = k m, β = k+.5 k+ m and γ = m. Integer m = 2j, (j =,,2,3,4,...J) indicates the level of the wavelet, and k =,,2,3,...,m is the translation parameter. Maximal level of resolution is J. The index i is calculated according to the formula i = m+k +. In the case of minimal values, m =, k = we get i = 2. The maximal value of i is i = 2M, where M = 2 J. It is assumed that the value i =, corresponding to the scaling function in [,]. {, x, h (x) = (5), otherwise. Let us define the collocation points x l = (l.5) 2M, where l =,2,3,...,2M and discretise the Haar function h i (x). Using the following four notations of Haar functions: h (x) = [,,,], h 2 (x) = [,,, ], h 3 = [,,,] and h 4 = [,,, ], we introduce the following notation: H 4 (x) = [h (x),h 2 (x),h 3 (x),h 4 (x)] T =. (6) Here H 4 (x) is called Haar coefficient matrix. It is a square matrix of order 4, and is defined as H(i,l) = (h i (x l )), which has dimension 2M 2M. Let us integrate equation (4), we get q i (x) = x (4) h i (t)dt. (7) In the collocation points, equation (7) gets the form Q(i,l) = q i (x l ), where Q is a 2M 2M matrix. Chen and Hsiao [] presented this matrix in the form Q n = P n H n, where P n H n is interpreted as the product of the matrices
46 I. Singh, S. Arora, S. Kumar P n and H n, called Haar integration and coefficient matrix, respectively. The operational matrix of integration P, which is a 2M square matrix, is defined by the relations: P i, (x) = P i,n+ (x) = x x h i (t)dt, (8) P i,n (t)dt, (9) where n =,2,3,4... These integrals can be evaluated using equation (4) and first four of them are given below:- x α, xǫ[α,β), P i, (x) = γ x, xǫ[β,γ),, elsewhere. 2 (x α)2, xǫ[α,β), P i,2 (x) = 4m 2 2 (γ x)2, xǫ[β,γ), 4m, xǫ[γ,), 2, elsewhere. 6 (x α)3, xǫ[α,β), (x β) P i,3 (x) = 4m 2 6 (γ x)3, xǫ[β,γ), (x β), xǫ[γ,), 4m 2, elsewhere. 24 (x α)4, xǫ[α,β), (x β) 2 P i,4 (x) = 8m 2 24 (γ x)4 +, xǫ[β,γ), 92m 4 (x β) 2 +, xǫ[γ,), 8m 2 92m 4, elsewhere. () () (2) (3) 3. Function Approximation We know that all the Haar wavelets are orthogonal to each other: { 2 j, i = l = 2 j +k, h i (x)h l (x)dx =, i l. (4)
NUMERICAL SOLUTION OF WAVE EQUATION... 46 Therefore, they construct a very good transform basis. Any square integrable function y(x) in the interval [,] can be expanded by a Haar series of infinite terms as: y(x) = c i h i (x), (5) where the Haar coefficients c i are determined as: c = y(x)h (x)dx, (6) c i = 2 j y(x)h i (x)dx, (7) where i = 2 j +k, j and k < 2 j, xǫ[,] such that the following integral square error ε is minimized: ε = [y(x) m c i h i (x)] 2 dx, (8) where m = 2 j and j =,,2,3,... Usually the series expansion of (5) contains infinite terms. If y(x) is piecewise constant by itself or may be approximated as piecewise constant during each subinterval, then y(x) will be terminated at finite m terms. This means y(x) m = c i h i (x) = c T m h m (x), (9) where the coefficients c m T and the Haar function vectors h m (x) are defined as: c m T = [c,c 2,c 3,...,c m ]andh m (x) = [h (x),h 2 (x),h 3 (x),...,h m (x)] T, where T is the transpose. 4. Method for Solving Wave Equation ConsidertheWaveequation()withinitialconditionsu(x,) = f (x), u t (x,) = f (x) and boundary conditions u(,t) = g (t), u(,t) = g (t). Assume that ü (x,t) can be expanded in terms of Haar wavelets as follows: ü (x,t) = a i h i (x), tǫ(t s,t s+ ]. (2)
462 I. Singh, S. Arora, S. Kumar Integrating the above equation twice with respect to t from t s to t, and twice with respect to x, from to x, we get, u (x,t) = (t t s ) a i h i (x)+ u (x,t s ), (2) u (x,t) = 2 (t t 2M s) 2 a i h i (x)+(t t s ) u (x,t s )+u (x,t s ), (22) u (x,t) = 2 (t t 2M s) 2 a i P,i (x)+(t t s )[ u (x,t s )+ u (,t s )] +u (x,t s ) u (,t s )+u (,t), (23) u(x,t) = 2 (t t 2M s) 2 a i P 2,i (x)+(t t s )[ u(x,t s ) u(,t s ) x u (,t s )] +u(x,t s ) u(,t s )+x[u (,t) u (,t s )]+u(,t). (24) Differentiating the above equation twice with respect to t, we get u(x,t) = (t t s ) a i P 2,i (x)+ u(x,t s )+ u(,t) u(,t s )+x[ u (,t) u (,t s )], ü(x,t) = (25) a i P 2,i (x)+ü(,t)+xü (,t). (26) From the initial and boundary conditions, we have the following equations as: u(x,) = f (x), u (x,) = f (x), u(,t) = g (t), u(,t) = g (t), u(,t s ) = g (t s ), u(,t s ) = g (t s ), u(,t) = ġ (t), u(,t) = ġ (t), ü(,t) = g (t), ü(,t) = g (t), ü(,t s ) = g (t s ), ü(,t s ) = g (t s ). At x = in the formulae (24), (25) and (26) and by using conditions, we have u (,t) u (,t s ) = 2 (t t s) 2 2M a i P 2,i () (t t s )[ g (t s ) g (t s ) u (,t s )]
NUMERICAL SOLUTION OF WAVE EQUATION... 463 +g (t) g (t)+g (t s ) g (t s ), (27) u (,t) u (,t s ) = g (t) g (t)+ g (t s ) g 2M (t s ) (t t s ) 2 a i P 2,i (), (28) ü (,t) = a i P 2,i () g (t)+ g (t). (29) If the equations (27), (28) and (29) are substituted into equations (22) (26), and the results are discriticized by assuming x x l and t t s+, we obtain u (x l,t s+ ) = 2 (t 2M s+ t s ) 2 a i h i (x l )+(t s+ t s ) u (x l,t s )+u (x l,t s ), (3) u (x l,t s+ ) = 2 (t 2M s+ t s ) 2 a i P,i (x l )+(t s+ t s ) u (x l,t s )+u (x l,t s ) 2 (t s+ t s ) 2 2M a i P 2,i () (t s+ t s )[ g (t s ) ġ (t s )]+g (t s+ ) g (t s )+g (t s ) g (t s+ ), (3) u(x l,t s+ ) = 2 (t s+ t s ) 2 2M +u(x l,t s ) u(,t s ) x l 2 (t s+ t s ) 2 a i P 2,i (x l )+(t s+ t s )[ u(x l,t s ) g (t s )] a i P 2,i () x l (t s+ t s )[ġ (t s ) ġ (t s )] x l [g (t s ) g (t s )+g (t s+ ) g (t s+ )]+g (t s+ ), (32) u(x l,t s+ ) = (t s+ t s ) a i P 2,i (x l )+ u(x l,t s ) g (t s ) x l [ g (t s ) g (t s )] x l (t s+ t s ) a i P 2,i () x l [ġ (t s+ ) ġ (t s+ )] +ġ (t s+ ), (33)
464 I. Singh, S. Arora, S. Kumar ü(x l,t s+ ) = But, we know that hence, in the given scheme a i [P 2,i (x l ) x l P 2,i ()] x l [ g (t s+ ) g (t s+ )]+ g (t s+ ). P 2,i () = {.5, i =, 4m 2, i >, (34) (35) ü(x l,t s+ ) = a 2 u (x l,t s+ )+f(x l,t s+ ), (36) which leads us, that the time layer t s to t s+ is used. From here, wavelet coefficients are calculated and solution of wave equation is obtained. 5. Numerical Examples Example. Consider the wave equation of the form with initial conditions and boundary conditions 2 u t 2 = u c2 2 x 2, < x <,t >, (37) u t= = u sin(πx), u t t= =, < x <, (38) The exact solution of the given problem is: u x= =,u x= =,t >. (39) u(x,t) = u.cos(πct).sin(πx). (4) The process is started with u(x l,) = u sin(πx l ), u (x l,) = π 2 u sin(πx l ), u (x l,) =, u(x l ) =. Numerical results are presented in the Table for t =.2, u =, c = 3, J = 4, t =.. Table 2, shows the comparison of absolute errors for both the Haar wavelet solutions. Example 2. Consider the wave equation of the form 2 u t 2 = u c2 2 2 +x, < x <,t >, (4) x
NUMERICAL SOLUTION OF WAVE EQUATION... 465 xl/64 Exact solution Haar solution in Present Paper Haar solution in [5] -.56e-2 -.55e-2 -.53e-2 3-4.534e-2-4.53e-2-4.524e-2 5-7.59e-2-7.53e-2-7.49e-2 7 -.4e- -.4e- -.39e- 29-3.57e- -3.55e- -3.5e- 3-3.86e- -3.84e- -3.79e- 33-3.86e- -3.84e- -3.79e- 35-3.57e- -3.55e- -3.5e- 57 -.4e- -.4e- -.39e- 59-7.59e-2-7.53e-2-7.49e-2 6-4.534e-2-4.53e-2-4.524e-2 63 -.56e-2 -.55e-2 -.53e-2 Table : Comparison of Haar wavelet solutions. xl/64 Absolute error in Present Paper Absolute error in Paper [5] 9.9e-6 3.434e-5 3 2.96e-5.27e-4 5 4.92e-5.7e-4 7 6.797e-5 2.358e-4 29.995e-4 6.923e-4 3 2.5e-4 6.99e-4 33 2.5e-4 6.99e-4 35.995e-4 6.923e-4 57 6.797e-5 2.358e-4 59 4.92e-5.7e-4 6 2.96e-5.27e-4 63 9.9e-6 3.434e-5 Table 2: Comparison of absolute error in both Haar wavelet solutions. with initial conditions and boundary conditions u t= =, u t t= =, < x <, (42) u x= =,u x= =,t >. (43)
466 I. Singh, S. Arora, S. Kumar.5 Haar wavelet solution Exact solution. Numerical solutions.5.2.25.3.35..2.3.4.5.6.7.8.9 Collocation points Figure : Numerical solution of Example for J = 4. xl/64 Exact solution Haar solution in Present Paper Haar solution in [5] 3.293e-5 3.253e-5 3.33e-5 3 9.772e-5 9.689e-5 9.345e-5 5.595e-4.586e-4.539e-4 7 2.7e-4 2.63e-4 2.8e-4 29 5.55e-4 5.53e-4 5.499e-4 3 5.545e-4 5.547e-4 5.549e-4 33 5.545e-4 5.547e-4 5.549e-4 35 5.55e-4 5.53e-4 5.53e-4 57 2.7e-4 2.64e-4 2.56e-4 59.595e-4.6e-4.597e-4 6 9.772e-5 9.925e-5 9.923e-5 63 3.293e-5 3.48e-5 3.389e-5 Table 3: Comparison of Haar wavelet solutions.
NUMERICAL SOLUTION OF WAVE EQUATION... 467 6 x 4 5 4 Numerical solutions 3 2 Haar wavelet solution Exact solution..2.3.4.5.6.7.8.9 Collocation points Figure 2: Numerical solution of Example 2 for J = 4. The exact solution of the this problem is: u(x,t) = 2 π 3 c 2 ( ) k k 3 [ cos(kπct)]sin(kπx). (44) The process is started with u(x l,) =, u (x l,) =, u (x l,) =, u(x l ) =. Numerical results are presented in the Table 3 for t =.2, c = 5, J = 4, t =.. Table 4 shows the comparison of absolute errors for both the Haar wavelet solutions. Conclusion It is concluded that Haar wavelet method is more accurate, simple, fast and computationally attractive than other known methods to solve wave equation. The above examples, demonstrate the simplicity of the Haar wavelet solution.
468 I. Singh, S. Arora, S. Kumar xl/64 Absolute error in Present Paper Absolute error in Paper [5] 4.e-7.592e-6 3 8.3e-7 4.27e-6 5 8.999e-7 5.67e-6 7 6.999e-7 5.224e-6 29 2.e-7 6.2e-7 3 2.e-7 3.3e-7 33 2.e-7 4.2e-7 35 2.e-7.698e-7 57 5.999e-7.399e-6 59 5.e-7.656e-7 6.52e-6.53e-6 63.25e-6 9.588e-7 Table 4: Comparison of absolute error in both Haar wavelet solutions. For getting the necessary accuracy the number of calculation points may be increased. Further, it is also clear from the above examples that numerical results obtained by the present method are better than that obtained in Shi [5]. References [] C.F. Chen and C.H. Hsiao, Haar wavelet method for solving lumped and distributed-parameter systems, IEE Proc., Control Theory Appl., 44 (997), 87-94. [2] N. Berwal, D. Panchal and C.L. Parihar, Haar wavelet method for numerical solution of Telegraph equation, Italian Journal of Pure and Applied Mathematics, 3 (23), 37-328. [3] G. Hariharan, K. Kannan and R. K. Sharma, Haar wavelet method for solving Fisher s equation, Applied Mathematics and Computational Science, 2 (29), 284-292. [4] G. Hariharan and K. Kannan, Haar wavelet method for solving Fitzhugh- Nagumo equation, World Academy of Sciences, Engineering and Technology, 43 (2), 56-563.
NUMERICAL SOLUTION OF WAVE EQUATION... 469 [5] Zhi Shi, Tao Liu and Ba Gao, Haar wavelet method for solving wave equation, International Conference on Computer Application and System Modeling, 2 (2), 56-564. [6] G. Hariharan, An overview of Haar wavelet method for solving differential and integral equations, World Applied Sciences Journal, 23 (23), -4. [7] A. Haar, Zur theorie der orthogonalen Funktionsysteme, Math.Annal, 69 (9), 33-37. [8] I. Daubechies, Ten Lectures on wavelets, CBMS-NCF, SIAM, Philadelphia, (992). [9] Ü. Lepik, Application of Haar wavelet transform to solving integral and differential equations, Proc. Estonian Acad. Sci. Phys. Math., 56, No. (27), 28-46. [] Ü. Lepik, Solving differential and integral equations by Haar wavelet method, revisted, International Journal of Mathematics and Computation,, No. 8 (28), 43-52.
47