Deferred correction technique to construct high-order schemes for the heat equation with Dirichlet and Neumann boundary conditions Damrongsak Yambangwai and Nikolay Moshkin Abstract—A deferred correction method is utilized to increase the order of spatial accuracy of the Crank-Nikolson scheme for the numerical solution of the one-dimensional heat equation. Numerical examples are given for both Neumann and Dirichlet initial boundary value problems. The fourth-order methods proposed are compared with high-order compact schemes. The set of methods proposed demonstrate a better performance compared with high-order compact schemes in the case of the Neumann boundary conditions. Index Terms—high-order difference scheme; deferred correc- tion scheme; high-order compact scheme; heat equation. I. I NTRODUCTION T HE desired properties of finite difference schemes are stability, accuracy and efficiency. These requirements are in conflict with each other. In many applications a high- order accuracy is required in the spatial discretization. To reach better stability, implicit approximation is desired. For a high-order method of traditional type (not a high-order compact (HOC)), the stencil becomes wider with increasing order of accuracy. For a standard centered discretization of order p, the stencil is p+1 points wide. This inflicts problems at the fictional boundaries, and using an implicit method results in the solution of an algebraic system of equations with large bandwidth. In light of conflict requirements of stability, accuracy and computational efficiency, it is desired to develop schemes that have a wide range of stability, high- order of accuracy and lead to the solution of a systems of linear equations with a tridiagonal matrix, i.e. the system of linear equations arising from a standard second order discretization of heat equation. The development of high order compact schemes (HOC) [2-10, 11-16, 17, 20, 21] is one approach to overcome the antagonism between stability, accuracy and computational cost. Most existing HOCs are constructed for problems with Dirichlet boundary conditions [2-10, 11-16, 17, 20, 21]. Only few HOCs have been constructed for problems with Neumann (or insulated) boundary conditions [9, 10, 12-15, 17, 20, 21]. Even for these less popular compact difference schemes involving Neumann boundary conditions, very often, the schemes are fourth-order or sixth-order at the interior points, but of lower order at the boundary [1, 9, 20, Manuscript received November 7, 2011; revised February 15, 2012. This work was financially supported by the Commission on Higher Education (CHE) and the Thailand Research Fund (TRF)-MRG5380232. D. Yambangwai is with the Department of Mathematics, School of Science, University of Phayao, Phayao 56000, Thailand, e-mail: dam- rong.sut@gmail.com. N.P. Moshkin is with the School of Mathematics, Institute of Science, Suranaree University of Technology, Nakhon Ratchasima, 30000, Thailand e-mail: nikolay.moshkin@gmail.com. 21]. In the paper by Zhao et al. [20], a set of fourth-order one dimensional compact finite difference schemes is developed to solve a heat conduction problem with Neumann boundary conditions. Another way of preserving a compact stencil at higher time level and reaching high-order spatial accuracy is the deferred correction approach [11]. A classical deferred correction procedure was developed in [18, 19]. In this paper we use the deferred correction technique to obtain fourth-order accurate schemes in space for the one dimensional heat conducting problem with Dirichlet and Neumann boundary conditions. The linear system that needs to be solved at each time step is similar to the standard Crank-Nicolson method of second order which can be solved by using Thomas algorithms. The fourth- order deferred-correction schemes are compared with the fourth-order compact schemes for the Dirichlet and Neumann boundary value problems. A set of schemes are constructed for the one dimensional heat conducting problem with Dirichlet boundary conditions (Dbc) and Neumann boundary conditions (Nbc) and initial data, u t = βu xx + f (x, t), 0 < x < l, t> 0, (1) u(x, 0) = u 0 (x), 0 < x < l, (2) Dbc: u(0,t)= α 1 (t),u(l, t)= α 2 (t),t> 0, (3) Nbc: u x (0,t)= γ 1 (t),u x (l, t)= γ 2 (t),t> 0, (4) where the diffusion coefficient β is positive, u(x, t) repre- sents the temperature at point (x, t) and f (x, t), α 1 (t), α 2 (t), γ 1 (t), γ 2 (t) are sufficiently smooth functions. The rest of this paper is organized as follows: Section 2.1 presents a list of fourth-order deferred correction schemes. Section 2.2 presents briefly the high-order compact differ- ence schemes, which we use to compare performance of proposed schemes and HOC schemes. Section 3 provides examples of comparisons. Although having a higher compu- tational cost than HOC schemes, it is evident from these examples that the deferred correction schemes have the advantage of accuracy in the uniform norm (the accuracy at the internal points and at the boundary points are the same) and robustness. We conclude the paper in Section 4. II. THE PROPOSED SCHEMES Let Δt denotes the temporal mesh size. For simplic- ity, we consider a uniform mesh consisting of N points: x 1 ,x 2 ,...,x N where x i =(i − 1)Δx and the mesh size is Δx = l/(N − 1). Below we use the notations u n i and (u xx ) n i