Keywords: the method of lines, Burgers equation, Partial differential equation, Ordinary differential equation
American Journal of Numerical Analysis, 2014 2 (1),
pp 13.
DOI: 10.12691/ajna211
Received August 20, 2013; Revised December 10, 2013; Accepted December 24, 2013
Copyright © 2014 Science and Education Publishing. All Rights Reserved.
1. Introduction
The basic idea of the method of line is to replace the spatial (boundary value) derivatives in the PDE with algebraic approximations ^{[1, 2, 3]}. Once this is done, the spatial derivatives are no longer stated explicitly in terms of the spatial independent variables. Thus, in effect only the initial value variable, typically time in a physical problem, remains. In other words, with only one remaining independent variable, we have a system of ODEs that approximate the original PDE. The challenge, then, is to formulate the approximating system of ODEs. Once this is done, we can apply any integration algorithm for initial value ODEs to compute an approximate numerical solution to the PDE. Thus, one of the salient features of the MOL is the use of existing, and generally well established, numerical methods for ODEs.
2. Burger's Equation
Consider Burgers' equation in the form
 (1) 
Where is positive parameter and homogeneous boundary conditions are used. A study of the properties of Burger's equation is of great importance due to the equation's applications in the approximate theory of flow through a shock wave traveling in a viscous fluid and the Burger's model turbulence. Burger's equation is a very good example for several reasons It is nonlinear.
Ÿ The exact solution of the PDE is known.
Ÿ It can be thought of as hyperbolic problem with artificial diffusion for small .
Ÿ It is sometimes used in boundary layer calculation for the flow of viscous fluid.
Ÿ It is very nearly a standard test problem for PDE solvers.
This equation is solved recently by different methods such as in ^{[4, 5, 6, 7]}. Apply the method of lines to equation (2.1) we discretized the partial derivatives with respect to the space variables to result in approximating system of ODEs in the variable t and in the MOL approach, the ODEs are integrated directly with a standard code for the task. The simplest method of spatial discretization is to discretize along the x axis with a uniform mesh and to replace all spatial derivatives in (2.1) by finite difference.
Let and the resulting is a system of ODEs, for the method of lines approach to solving (2.1).
3. Method of Lines
On a uniform step size mesh with step size secondorder centered differences for the first and second derivatives of a function are commonly given by
 (2) 
 (3) 
By substituting (2) and (3) into (1) and taking we have
 (4) 
Or
 (5) 
Matrix form of equation (5) can be written as follows
System (5) for each i, is ordinary differential equation and it consists of 9 equation and 9 unknowns.
4. Numerical Results
Example 1. Consider the Eq.(1) with following initial and boundary conditions
where
With the exact solutions
 (6) 
Where
Let’s By taking we get
The values of and in various time can be obtained as follows
Table 1 shows the numerical solving Eq.(1) by MOL and absolute errors when from 0.0 to 0.5 and t is 0, 0.25 and 0.5.
Table 1. The solution of u(x,t) for different values of x and t
Example2. Let us consider the Eq. (21) with following initial and boundary conditions
The exact solution of the equation as follows
Where
We have
As in the previous example, the value of can be obtained as follows
The results of numerical solving Eq.(1) by MOL and errors at each point are presented in Table 2.
Table 2. The solution of v(x,t) for different values of x and t
5. Conclusion
In this paper, burgers equation has been solved by the method of lines and the desired numerical solution has been achieved. The obtained numerical solutions have been compared with the exact solution, and the results show the efficiency of the method. In the solved examples, the solutions of the burgers equation are recorded for
References
[1]  J. Biazar and N. nomidi, “solution of the EmdenFowler equation by the method of lines”, Journal of nature science and sustainable, 7(2) (2013) 4555. 
 In article  

[2]  W. E, Schiesser, “The Numerical Methods of Lines – Integration of Partial Differential Equations”, Acadimic Press, San Diego, 1991. 
 In article  

[3]  R. Knapp., “A Method of Lines Framework in Mathematica”, JNAIAM, 3(1) (2008) 4359. 
 In article  

[4]  Byrne, G.D. and A.C. Hindmarsh, “Stif ODE Solvers: A review of Current and Coming Attractions”, Journal of Computational physics, 70 (1987) 162. 
 In article  CrossRef 

[5]  C. Mamaloukas, S. Spartalis, “Decomposition method in Comparison with Numerical Solutions of Burger's equation”, Ratio Mathematica, 18 (2008) 5161. 
 In article  

[6]  C. Mamaloukas, K. Haldar, and H.P. Mazumdar, “Application of double decomposition to pulsatile flow”, Journal of Computational &Applied Mathematics, 10(2) (2002) 193207. 
 In article  CrossRef 

[7]  M. Javidi, “A Numerical Solution of Burger's equation based on modified extended BDF scheme”, Int. Math.Forum, 1(32) (2006) 15651570. 
 In article  
