Applied Mathematical Sciences, Vol. 7, 2013, no. 2, 93 - 102
Development of an Efficient Numerical Method for Solving Heat Equations Applying He’s Variational Iteration Method Yucheng Liu and Manoj Chand Department of Mechanical Engineering University of Louisiana at Lafayette Lafayette, LA 70503, USA
[email protected] [email protected] Abstract This paper presents a numerical method that solves heat equations using He’s variational iteration method (HVIM). It showed that the solutions obtained from the developed method converged rapidly to the exact solutions within three iterations. It is also found that HVIM gives very trivial solutions for the nonlinear differential equations with zero initial condition. Mathematics Subject Classification: 35A09 Keywords: Heat equation, He’s variational iteration method, differential equation, numerical algorithm, initial condition
1. Introduction Heat equation is an important partial differential equation which describes the distribution of heat (or variation in temperature) in a given region over time. Many important engineering processes, such as the heat transferring and cooling process, are described through heat equations, and nowadays, heat equations have been applied in thermal-based damage detection in porous materials. Due to its importance in engineering design and research, a number of investigators have proposed analytical methods to find promising approximate solutions for such
94
Yucheng Liu and Manoj Chand
equations. Dawson et al. [3] presented a finite difference domain decomposition algorithm for numerical solution of the heat equation. That method was later developed and proposed by Dehghan [4] for solving the one-dimensional heat equation subject to the specification of mass. Similarly, Khan et al. [9] used twostep Adomian decomposition method (ADM) to solve for the heat equation and Alizadeh et al. [2] found solutions for the cooling problem using ADM. Lu et al. [13], however, developed a novel analytical approach for heat equations in a multi-dimensional composite slab subject to time-dependent boundary changes of the first kind. It was found that the presented method involves no iterative computation such as numerically searching for eigenvalues and no residue evaluation, therefore it is considered very efficient. Besides the existing numerical methods, an analytical method, He’s variational iteration method (HVIM), is considered as an effective and convenient method for solving both weakly and strongly nonlinear equations. HVIM was originally developed by a Chinese Mathematician, He, for solving different differential equation systems [5-8]. One author of this paper has extensively applied HVIM for solving broad types of analytical problems, such as nonlinear differential difference equations [10], Blasius equation [11], and the free vibration of Euler-Bernoulli beam [12]. Based on the current progress made in applying HVIM for solving nonlinear differential equations and the author’s experience, we plan to develop an efficient algorithm for solving the heat equations by employing HVIM. The developed algorithm can later be implemented into computer programs so as to significantly improve the computer’s performance in design and simulation of heat systems. The remaining sections of this paper is organized as follows: section 2 introduces the heat equation that will be solved in this paper; section 3 briefly reviews HVIM; section 4 explains detailed approach of solving the heat equations using HVIM and validates the presented method; the paper is concluded and ended by section 5.
2. Heat Equation The heat equation is an important partial differential equation which describes the distribution of heat in a given region over time. In this paper, we only consider the one-dimensional heat equation with variable properties, as shown in Eq. (1). The developed analytical method then can be expanded to solve for a real heat equation with three spatial variables (x, y, z). ∂u ⎞ ∂u ∂ ⎛ (1) = ⎜ k( x ) ⎟ , t > 0 cρ( x ) ∂x ⎠ ∂t ∂x ⎝ where c; specific heat capacity of the material, ρ; the mass density and k; the thermal conductivity are taken as functions of x. Eqn. (1) becomes a standard one dimensional heat equation if ρ and k are constants, which had been successfully solved by variational iteration methods including HVIM [14-17]. In this paper, we will continue to apply HVIM to develop numerical solutions for Eqn. (1), where ρ and k are functions of x and
Efficient numerical method for solving heat equations
95
such equation has a wide application in material design. Eqn. (1) with zero initial condition had been solved by Khan et al. [9] using modified ADM. Unfortunately, if HVIM was used to solve such equation with zero initial condition, only trivial solutions would be obtained. This is because that in using HVIM, the successive terms of iterations fully depend upon the initial condition, which could not be zero if meaningful iterations are wanted. A new technique for finding initial conditions has been proposed by Ali [1].In this paper, the heat equation Eqn. (1) with nonzero initial conditions will be solved by HVIM, which will lead to significant results. Specifically, If ρ(x) = 1/x and k(x) = x, and assume x varies from 1 to eπ, then Eqn. (1) takes the form c ∂u ∂ ⎛ ∂u ⎞ (2) = ⎜ x ⎟ , 1 < x < eπ , t > 0 x ∂t ∂x ⎝ ∂x ⎠ Considering the following boundary and initial conditions u(1, t) = 0, t ≥ 0; u(eπ, t) = kt, t ≥ 0; u(x, 0) = sin(lnx), 1≤ x ≤ eπ. 1 Alternatively, if ρ ( x) = and k ( x) = 1 − x 2 , and assume x varies 2 1− x from -1 to 1, then Eqn. (1) takes the form c ∂u ∂ ⎛ ∂u ⎞ = ⎜ 1− x2 (3) ⎟ , -1 < x < 1, t > 0 2 ∂t ∂x ⎝ ∂x ⎠ 1− x with the boundary and initial conditions given by u(-1, t) = 0, t ≥ 0; u(1, t) = 0, t ≥ 0; u(x, 0) = 1 − x 2 , 1≤ x ≤ 1. In the following sections, HVIM will be applied to solve for Eqns. (2) and (3), and the numerical solutions will be compared to the exact solutions to validate the accuracy and efficiency of the presented method.
3. He’s Variational Iteration Method (HVIM) In this section, the concept of He’s variational iteration method is briefly introduced. Consider the general nonlinear differential equation given in the form Lu(t) + Nu(t) = g(t) (4) where L is a linear operator, N is a nonlinear operator, and g(t) is a known function. By using the variational iteration method, a correction functional can be constructed as t u n +1 (t ) = u n (t ) + ∫ λ ( Lu n (ξ ) + Nu~n (ξ ) − g (ξ ))dξ 0 (5) where λ is a general Lagrange multiplier, which can be determined optimally via variational theory; the subscript n means the nth approximation; Un is a restricted variation and δUn = 0. u1 (t), u2 (t) … un(t) can then be found from Eqn. (5). The solution to the Eqn. (5) then can be obtained as
96
Yucheng Liu and Manoj Chand u(t) = limn→∞un( t)
(6)
4. Technical Approach and Validation The steps of solving the heat equations using HVIM can be summarized as: 1) find the correctional function and simplify it (Eqn. (5)); 2) take variation on both sides of the simplified correctional function with respect to un and from there to derive the stationary conditions; 3) find an appropriate Lagrange multiplier λ from the stationary conditions; 4) substitute λ back to the correctional function and the final solution then can be found using Eqn. (6). Following this procedure, analytical solutions will be found for Eqns. (2) and (3) and will be compared with the exact solutions for validation. Example 1: solution of Eqn. (2) Comparing Eqn. (2) with (5), the correctional function can be written as t u n +1 ( x, t ) = u n ( x, t ) + ∫ λ ( Lu n ( x, ξ ) + Nu~n ( x, ξ ) − g ( x, ξ )) dξ 0 (7) Substituting Eqn. (5) into (7) and we obtain t ⎡ ( ∂u ( x , ξ ) x⎧∂ ∂ ⎫⎤ n − ⎨ x u n ( x , ξ ) ⎬ ⎥ dξ u n +1 ( x, t ) = u n ( x, t ) + ∫ λ ⎢ 0 ∂ξ c ⎩ ∂x ∂x ⎭⎦ ⎣ (8) where λ is the Lagrange multiplier, which can be identified by imposing stationary condition. Next, variation was taken on both sides of correctional function with respect to un to derive the stationary conditions t ⎡ ( ∂u ( x , ξ ) x ⎧ ∂ ∂ ~ ⎫⎤ (9) − ⎨ x u n ( x , ξ ) ⎬ ⎥ dξ δu n +1 ( x, t ) = δu n ( x, t ) + ∫ δλ ⎢ n 0 ∂ξ c ⎩ ∂x ∂x ⎭⎦ ⎣ ⎡ ( ∂u n ( x , ξ ) ⎤ − 0 ⎥ dξ ∂ξ ⎣ ⎦ ~ where δu is considered as restricted variation, i.e. δu~n = 0 t
δu n +1 ( x, t ) = δu n ( x, t ) + ∫ δλ ⎢ 0
(10) .
Integrating Eqn. (10) by part and we can have t
δun +1 ( x, t ) = δun ( x, t ) + δλun ( x, ξ ) ξ = t − ∫ δλ ' un ( x, ξ )dξ
(11) The stationary conditions then can be found based on Eqn. (11), which are 1 + λ (ξ ) = 0 ξ =t 0
λ ' (ξ ) = 0 ξ =t
(12) From Eqn. (12), the Lagrange multiplier λ was therefore determined as -1. Substituting it back to Eqn. (8) and the variational iteration formula can be obtained as t ⎡ ( ∂u ( x , ξ ) x⎧∂ ∂ ⎫⎤ n − ⎨ x u n ( x , ξ ) ⎬⎥ dξ u n +1 ( x, t ) = u n ( x, t ) − ∫ ⎢ 0 ∂ξ c ⎩ ∂x ∂x ⎭⎦ ⎣ (13)
Efficient numerical method for solving heat equations
97
Taking the initial condition u0(x, t) = sin( lnx ), the other u(x, t) can be determined from the iteration formula Eqn. (5) as t ⎡ ( ∂u ( x , ξ ) x⎧∂ ∂ ⎫⎤ 0 u1 ( x , t ) = u 0 ( x , t ) − ∫ ⎢ − ⎨ x u 0 ( x , ξ ) ⎬ ⎥ dξ = 0 c ⎩ ∂x ∂x ∂ξ ⎭⎦ ⎣
t ⎡ ∂ (sin (ln x )) x⎧∂ ∂ ⎫⎤ ⎛t⎞ sin (ln x ) − ∫ ⎢ − ⎨ x sin (ln x )⎬⎥ dξ = sin (ln x ) − ⎜ ⎟ sin (ln x ) 0 c ⎩ ∂x ∂x ∂ξ ⎭⎦ ⎝c⎠ ⎣ (14)
⎛ t ⎞ sin (ln x ) ⎛ t ⎞ sin (ln x ) u 2 ( x, t ) = sin (ln x ) − ⎜ ⎟ +⎜ ⎟ 1! 2! ⎝c⎠ ⎝c⎠ 2
⎛ t ⎞ sin (ln x ) ⎛ t ⎞ sin (ln x ) ⎛ t ⎞ sin (ln x ) u 3 ( x, t ) = sin (ln x ) − ⎜ ⎟ +⎜ ⎟ +⎜ ⎟ 1! 2! 3! ⎝c⎠ ⎝c⎠ ⎝c⎠ and so on. 2
(15)
3
(16)
Based on Eqn. (6), un(x, t) will converge to the exact solution when t→∞. The numerical solutions un(x, t) are compared with the exact solution u(x,t) = sin(lnx)e-t/c and listed in Table 1 and plotted in Fig. 1 to validate the present method.
Table1. Comparison between the HVIM results and the exact solutions for Eqn. (2) with c = 500 t 0.25
0.50
0.75
1.00
x 0.3 0.6 0.9 0.3 0.6 0.9 0.3 0.6 0.9 0.3 0.6 0.9
Exact solution -0.93300468439 -0.48865325131 -0.10511312245 -0.93253829865 -0.48840898575 -0.10506057902 -0.93207214605 -0.48816484230 -0.10500806186 -0.93160622647 -0.48792082089 -0.10495557096
u1(x,t) -0.93300456773 -0.48865319020 -0.10511310930 -0.93253783207 -0.48840874139 -0.10506052646 -0.93207109642 -0.48816429257 -0.10500794361 -0.93160436077 -0.48791984375 -0.10495536077
u2(x,t) -0.93300468441 -0.48865325132 -0.10511312245 -0.93253829881 -0.48840898583 -0.10506057904 -0.93207214658 -0.48816484258 -0.10500806192 -0.93160622771 -0.48792082154 -0.10495557110
u3(x,t) -0.93300468439 -0.48865325131 -0.10511312245 -0.93253829865 -0.48840898575 -0.10506057902 -0.93207214605 -0.48816484230 -0.10500806186 -0.93160622647 -0.48792082089 -0.10495557096
98
Yucheng Liu and Manoj Chand
(a)
(b)
Figure1. Surface generated from (a) the exact solution and (b) HVIM result u1(x, t) for Eqn. (2) Example 2: solution of Eqn. (3) Comparing Eqn. (3) with (5), the correctional function is obtained as Eqn. (7); after substituting Eqn. (3) into Eqn.(7),we have t ⎡ ( ∂u ( x , ξ ) 1− x2 ⎧ ∂ ∂ ⎫⎤ n u n +1 ( x, t ) = u n ( x, t ) + ∫ λ ⎢ }⎨ ( 1 − x 2 ) u n ( x, ξ ) ⎬⎥ dξ −{ 0 c ∂x ∂ξ ⎭⎥⎦ ⎩ ∂x ⎢⎣ (17) Similarly, by taking variation on both sides of Eqn. (17) with respect to un, the stationary conditions were derived as ⎡ (∂u ( x, ξ ) t 1− x2 ⎧ ∂ ⎫⎤ 2 ∂ ~ − − δu n +1 ( x, t ) = δu n ( x, t ) + ∫ δλ ⎢ n 1 x u ( x , ξ ) ⎨ ⎬ ⎥ dξ n 0 ∂ξ ∂x c ⎩ ∂x ⎭⎥⎦ ⎢⎣ (18) t ⎡ (∂u ( x, ξ ) ⎤ δu n +1 ( x, t ) = δu n ( x, t ) + ∫ δλ ⎢ n − 0 ⎥ dξ 0 ∂ξ ⎣ ⎦ (19) ~ Just like Example 1, δu is set as 0. To determine the Lagrange multiplier λ, Eqn. (19) was integrated by part to obtain t
δun +1 ( x, t ) = δun ( x, t ) + δλun ( x, ξ ) ξ = t − ∫ δλ ' un ( x, ξ )dξ 0
(20)
The stationary conditions are found as (which is same as Example 1) 1 + λ (ξ ) = 0 ξ =t
λ ' (ξ ) = 0 ξ =t
(12) The Lagrange multiplier was therefore determined as λ = -1. Substituting λ back to Eqn. (17) and the variational iteration formula was obtained as
Efficient numerical method for solving heat equations
99
t ⎡ ( ∂u ( x, ξ ) ∂ 1− x2 ⎧ ∂ ⎫⎤ n − u n +1 ( x, t ) = u n ( x, t ) − ∫ ⎢ 1− x2 u n ( x , ξ ) ⎬⎥ dξ ⎨ 0 ∂ξ ∂x c ⎩ ∂x ⎭⎦⎥ ⎣⎢
(21) Taking the initial condition u0(x, t) = (1 – x2)1/2, the other u(x, t) can be determined from the iteration formula Eqn. (5) as t ⎡ (∂u ( x, ξ ) 1− x2 ⎧ ∂ ∂ ⎫⎤ u1 ( x, t ) = u 0 ( x, t ) − ∫ ⎢ 0 − 1− x2 u 0 ( x , ξ ) ⎬ ⎥ dξ = ⎨ 0 c ∂x ∂ξ ⎭⎥⎦ ⎩ ∂x ⎢⎣ 2 t ⎡∂ 1− x ∂ 1− x2 ⎧ ∂ ⎫⎤ ⎛t⎞ − 1− x2 − ∫ ⎢ 1− x2 1 − x 2 ⎬ ⎥ dξ = 1 − x 2 − ⎜ ⎟ 1 − x 2 ⎨ 0 ∂x c ⎭⎥⎦ ⎩ ∂x ⎝c⎠ ⎢⎣ ∂ξ
)
(
(22) ⎛ t ⎞ 1− x ⎛t⎞ +⎜ ⎟ u 2 ( x, t ) = 1 − x 2 − ⎜ ⎟ ⎝c⎠ ⎝ c ⎠ 1! 2
⎛ t ⎞ 1− x ⎛t⎞ +⎜ ⎟ u 3 ( x, t ) = 1 − x 2 − ⎜ ⎟ ⎝ c ⎠ 1! ⎝c⎠ 2
2
2 ⎛t⎞ ⎛ t ⎞ 1− x +⎜ ⎟ u 4 ( x, t ) = 1 − x 2 − ⎜ ⎟ ⎝ c ⎠ 1! ⎝c⎠
2
1− x ⎛t⎞ −⎜ ⎟ 2! ⎝c⎠ 2
2
1− x 2! 3
1− x2 ⎛ t ⎞ −⎜ ⎟ 2! ⎝c⎠
3
2
1− x 3!
(23) 2
1− x2 ⎛ t ⎞ +⎜ ⎟ 3! ⎝c⎠
(24) 4
1− x2 4!
(25) and so on. Comparing the HVIM results to the exact solution of the heat equation (Eqn. (3)) with specified boundary and initial conditions (Eqn. (26)) u ( x, t ) =
( 1 − x )e 2
−t / c
(26) It was found that the numerical results converged very fast to the exact solutions only in three iteration, which is displayed in Table 2 and plotted in Fig. 2. Discussion As can be seen from above table and figure, for the heat equation with two variables and nonzero initial condition, the HVIM results quickly converged to the exact solutions within three iteration. The comparison verified that HVIM is an efficient numerical tool for accurately solving the heat equations. The present study also verifies that even the original HVIM was developed for solving nonlinear differential equations with only one variable (Eqns. (4) and (6)), the HVIM approach can also be used to solve differential equations with two variables (x, and t as seen from Eqns. (2) and (3)). For convenience, c is assumed to be 500 for the illustrative examples, and the tables only list results for certain t’s and x’s. However, it can be verified that fast convergence and high accuracy were also achieved for other c values and a wide range of t’s and x’s.
100
Yucheng Liu and Manoj Chand
Table 2. Comparison between the HVIM results and the exact solutions for Eqn. (3) with c = 500 t 0.25
0.5
0.75
1.00
x 0.3 0.6 0.9 0.3 0.6 0.9 0.3 0.6 0.9 0.3 0.6 0.9
Exact,u(x,t) 0.95346235104 0.79960009998 0.43567200388 0.95298573903 0.79920039987 0.43545422233 0.95250936526 0.79880089955 0.43523654964 0.95203322962 0.79840159893 0.43501898576
(a)
VIM,u1(x,t) 0.95346223182 0.79960000000 0.43567194941 0.95298526222 0.79920000000 0.43545400446 0.95250829261 0.79880000000 0.43523605951 0.95203132301 0.79840000000 0.43501811457
VIM,u2(x,t) 0.95346235106 0.79960010000 0.43567200389 0.95298573919 0.79920040000 0.43545422240 0.95250936580 0.79880090000 0.43523654989 0.95203323089 0.79840160000 0.43501898635
VIM,u3(x,t) 0.95346235104 0.79960009998 0.43567200388 0.95298573903 0.79920039987 0.43545422233 0.95250936526 0.79880089955 0.43523654964 0.95203322962 0.79840159893 0.43501898576
VIM,u4(x,t) 0.95346235104 0.79960009998 0.43567200388 0.95298573903 0.79920039987 0.43545422233 0.95250936526 0.79880089955 0.43523654964 0.95203322962 0.79840159893 0.43501898576
(b)
Figure 2. Surface generated from (a) the exact solution and (b) HVIM result u1(x, t) for Eqn. (3)
5. Conclusion In this paper, an efficient approach is presented to implement HVIM to efficiently and accurately solve for heat equations with two variables x and t, and whose material conductivity and density are functions of x. On comparing the HVIM results to the exact solutions, it was found that the presented approach leads to a rapid convergence to the exact solutions in less than three iterations. Through the illustrative examples, it is therefore concluded that HVIM is an efficient numerical tool which can be used for solving the heat equations to
Efficient numerical method for solving heat equations
101
greatly reduce the size of calculations while maintaining a high level of accuracy and efficiency. Also, it could be found that for the heat equations ((2) and (3)), if the initial conditions are zero, the application of HVIM will lead to a series of trivial solutions, which are of no use. Therefore, it is revealed that as an efficient tool for solving nonlinear differential equations, HVIM is not applicable for the differential equations with zero initial condition. The approach presented in this study can be developed as an efficient algorithm to model and analyze the heat and cooling systems, which are governed by the heat equations and extensively used in different engineering architectures. Acknowledgement The work is supported by LaSPACE. The authors are grateful to Dr. John Wefel and other personnel in that organization for their help.
References [1] E.J. Ali, Modified treatment of initial boundary value problems for one dimensional heat-like and wave-like equations using variational iteration method, Applied Mathematical Sciences, 6(33), 2012, 1613-1626. [2] E. Alizadeh, K. Sedighi, M. Farhadi and H.R. Ebrahimi-Kebria, Analytical approximate solution of the cooling problem by Adomian decomposition method, Communications in Nonlinear Science and Numerical Simulation, 14 (2009), 462-472. [3] C.N. Dawson, Q. Du and T.F. Dupont, A finite difference domain decomposition algorithm for numerical solution of the heat equations, Mathematics of Computation, 57 (195), 1991, 63-71. [4] M. Dehghan, The one-dimensional heat equation subject to a boundary integral specification, Chaos, Solitons & Fractals, 32(2), 2007, 661-675. [5] J.-H. He, Variational iteration method – a kind of non-linear analytical technique: some examples, International Journal of Non-Linear Mechanics, 34(4), 1999, 699-708. [6] J.-H. He, Variational iteration method for autonomous ordinary differential systems, Applied Mathematics and Computation, 114(2/3), 2000, 115-123. [7] J.-H. He, Variational iteration method for delay differential equations, Communications in Nonlinear Science and Numerical Simulation, 2(4), 1997, 235-236. [8] J.-H. He, Variational iteration method – some recent results and new interpretations, Journal of Computational and Applied Mathematics, 207(1), 2007, 3-17. [9] D.N. Khan Marwat and S. Asghar, Solution of the heat equation with variable properties by two-step Adomian decomposition method, Mathematical and Computer Modelling, (48) 2008, 83-90.
102
Yucheng Liu and Manoj Chand
[10] Y.-C. Liu and C.S. Gurram, Solving nonlinear differential difference equations using He’s variational iteration method, Applied Mathematical and Computational Sciences, 3(1), 2011, 33-46. [11] Y.-C. Liu and S.N. Kurra, Solution of Blasius equation by variational iteration, Applied Mathematics, 1(1), 2011, 24-27. [12] Y.-C. Liu and C.S. Gurram, The use of He’s variational iteration method for solving free vibration of Euler-Bernoulli beam, Mathematical and Computer Modelling, 50(11/12), 2009, 1545-1552. [13] X. Lu, P. Tervola and M. Viljanen, A new analytical method to solve the heat equation for a multi-dimensional composite slab, Journal of Physics A: Mathematical and General, 38(13), 2005, 2873. [14] Mo. Miansari, D.D. Ganji and Me. Miansari, Application of He’s variational iteration method to nonlinear heat transfer equations, Physics Letters A, 372(6), 2008, 779-785. [15] M. Tatari and M. Dehghan, He’s varaitional iteration method for computing a control parameter in a semi-linear inverse parabolic equation, Chaos, Solitons & Fractals, 33(2), 2007, 671-677. [16] S.-Q. Wang, J.-H. He, Variational iteration method for solving integrodifferential equations, Physics Letters A, 367(3), 2007, 188-191. [17] R.Yulita Molliq,M.S.M. Noorani,I.Hashim,Variational iteration method for fractional heat-and wave-like equations,Nonlinear Analysis,Real World Applications,10(2009),1854-1869.
Received: September, 2012