Acta Polytechnica doi:10.14311/AP.2016.56.0236 Acta Polytechnica 56(3):236–244, 2016 © Czech Technical University in Prague, 2016 available online at http://ojs.cvut.cz/ojs/index.php/ap ON THE CONSTRUCTION OF PARTIAL DIFFERENCE SCHEMES II: DISCRETE VARIABLES AND SCHWARZIAN LATTICES Decio Levia, ∗, Miguel A. Rodríguezb a Dipartimento di Matematica e Fisica, Università degli Studi Roma Tre and INFN Sezione di Roma Tre, Via della Vasca Navale 84, 00146 Roma, Italy b Departamento de Física Teórica II, Facultad de Físicas, Universidad Complutense, 28040 Madrid, Spain ∗ corresponding author: decio.levi@roma3.infn.it Abstract. In the process of constructing invariant difference schemes which approximate partial differential equations we write down a procedure for discretizing a partial differential equation on an arbitrary lattice. An open problem is the meaning of a lattice which does not satisfy the Clairaut– Schwarz–Young theorem. To analyze it we apply the procedure on a simple example, the potential Burgers equation with two different lattices, an orthogonal lattice which is invariant under the symmetries of the equation and satisfies the commutativity of the partial difference operators and an exponential lattice which is not invariant and does not satisfy the Clairaut–Schwarz–Young theorem. A discussion on the numerical results is presented showing the different behavior of both schemes for two different exact solutions and their numerical approximations. Keywords: partial differential and difference equations; discretization; Clairaut–Schwarz–Young theorem. AMS Mathematics Subject Classification: 39A14, 35F05. 1. Introduction The construction of difference equations, written as invariants of the continuous group of symmetries of differential equations, is part of a project to apply symmetry group methods to the numerical solution of differential equations [2, 3, 6–9, 11–13, 15–17, 19–23]. This project has accomplished a significative advance since its first introduction last century. In particular, the construction of invariant schemes has proven to be a very fruitful approach in the construction of numerical schemes for ordinary differential equations [2, 3], in cases when the usual approaches present serious problems of convergence and accuracy, for instance, in the behavior of the solutions in the neighborhood of a singularity. In this problem a deeper understanding of the mathematics involved in its relation with numerics can provide results important for their applications to problems in Physics and Mathematics. The usual procedure in this framework is to compute the symmetry group of the differential equation and then compute the invariant lattice and invariant difference equation with respect to the symmetry group. However, since the differential and difference calculus present substantial differences, a special care has to be taken to assure the consistency of the approach. For example, the Clairaut–Schwarz–Young theorem on the equality of the cross derivatives, which is satisfied in the continuous case under some mild conditions on the functions, is not valid in the discrete case for a general lattice. Recently it has been shown [14] that the discrete Clairaut–Schwarz–Young theorem, equality of the cross differences, imposes strong restrictions on the lattice. Moreover, the construction of the discrete invariant scheme starting from the discrete invariants is not at all obvious as it is usually obtained by finding a proper combination of the continuous limits of the various discrete invariants. The main idea guiding the construction of the whole scheme, that is the difference equations and the equations defining the lattice, which in some cases are mixed, is that the continuous limit yields the differential equation and trivial identities. This article is a continuation of our work on the construction of partial difference schemes [14]. In the previous work we concentrated on the Clairaut–Schwarz–Young theorem. Here we introduce by a one to one correspondence a new set of discrete coordinates which describe the partial difference equation on the lattice. In terms of these coordinate systems we can write immediately the discrete counterpart of any continuous invariant. So we can discretize in a straightforward way any partial differential equation described in terms of the invariants of a group of symmetries. A particular role in the construction of discrete invariant schemes is played by the lattice. Consequently the Clairaut–Schwarz–Young theorem can play an important role in discriminating lattice schemes, i.e., the combination of the discrete equation and its lattice. In Section 2 we study schemes for scalar partial differential equations and show the constraints on the group transformations due to the Clairaut–Schwarz–Young theorem. Using these results, in Section 3 we construct 236 http://dx.doi.org/10.14311/AP.2016.56.0236 http://ojs.cvut.cz/ojs/index.php/ap vol. 56 no. 3/2016 On the Construction of Partial Difference Schemes II in a standard way the invariant discrete potential Burgers and in Section 4, we study it numerically for two different lattices, one invariant and Schwarzian and one not, for two different exact solutions of the differential equation. Some concluding remarks are presented in Section 5. 2. Schemes for partial difference equations In the case of ordinary difference equations of order K for one dependent variable un and one independent variable xn, a natural scheme is given by the points {xn+k−1,un+k−1, 1 ≤ k ≤ K + 1} for some fixed n. An alternative equivalent set of coordinates on the scheme is given by [14, 23]: {xn,un,p (1) n+1,p (2) n+2,p (3) n+3,p (4) n+4, . . .p (K−1) n+K−1,p (K) n+K,hn+1,hn+2, . . .hn+K} (1) with hn+k = xn+k −xn+k−1, 1 ≤ k ≤ K, p (k) n+k = [Dx] kun, where Dx = 1 hn+1 [Tx − 1], Txun = un+1, k ∈ Z+ (2) In the continuous limit hn+k → 0 and p (k) n+k → dku(x) dxk . If we transform the standard discrete prolongation [17] pr(K) X̂ = n+K∑ k=n ( ξk(xk,uk)∂xk + φk(xk,uk)∂uk ) (3) of the vector field X̂ = ξn(xn,un)∂xn + φn(xn,un)∂un (4) to the new variables (1), we obtain pr X̂ = ξn(xn,un)∂xn + φn(xn,un)∂un + K∑ k=1 κ(k)∂hn+k + K∑ k=1 φ (k) n+k∂p(k) n+k . (5) The general formulas for the coefficients κ(k) and φ(k) are κ(k) = ξn+k − ξn+k−1, φ (k) n+k = Dxφ (k−1) n+k−1 −p (k) n+kDxξn, k = 1, 2, . . . ,K. (6) It is worthwhile to notice that both the higher order discrete derivatives and their corresponding prolongations are written in terms of xn, un, ξn(xn,un), φn(xn,un) and their difference consequences obtained by applying the operator Dx given in (2). This way of constructing invariant ordinary difference equation is different from that considered in [13] but is easily extendible to the case of partial difference equations. For partial difference equations we consider here only, for simplicity, the case of one dependent variable and two independent variables as will be the example we will discuss in the following Section. Moreover, as we will deal with a nonlinear partial difference equation of second order we limit ourselves to a scheme of six points (n,m), (n + 1,m), (n,m + 1), (n + 2,m), (n,m + 2), (n + 1,m + 1), the minimum number of points necessary to get all partial second derivatives as first order approximations. The variables x, y and u(x,y) in all points correspond to 18 data, 12 related to the independent variables and 6 to the dependent one. The extension to more variables and higher order equations requires just more points but it is straightforward. Having 12 data for the independent variables we can construct from them 10 differences x0,0, y0,0, h x 0,0 = x1,0 −x0,0, h y 0,0 = y0,1 −y0,0, σ x 0,0 = x0,1 −x0,0, σ y 0,0 = y1,0 −y0,0, hx1,0 = x2,0 −x1,0, h y 0,1 = y0,2 −y0,1, σ x 0,1 = x0,2 −x0,1, σ y 1,0 = y2,0 −y1,0, hx0,1 = x1,1 −x0,1, h y 1,0 = y1,1 −y1,0, (7) where for convenience of notation here and in the following, whenever it may not create misunderstanding, we have indicated just the distance from the values n,m of the indices. From the values of the dependent variables in the 6 points we can calculate the 6 quantities u0,0, Dxu0,0, Dyu0,0, [Dx]2u0,0, [Dy]2u0,0, DxDyu0,0, (8) where the operators Dx and Dy, introduced in [14], are given by Dx = 1 hx0,0h y 0,0 −σx0,0σ y 0,0 (hy0,0∆n −σ y 0,0∆m), Dy = 1 hx0,0h y 0,0 −σx0,0σ y 0,0 (−σx0,0∆n + h x 0,0∆m) (9) 237 Decio Levi, Miguel A. Rodríguez Acta Polytechnica with Tnfn,m = fn+1,m, ∆n = Tn − 1, Tmfn,m = fn,m+1, ∆m = Tm − 1. These operators are the discrete counterpart of the partial derivatives in the x,y axes directions, written in terms of the partial difference operators in the lattice directions, which, generically, do not coincide with the cartesian axes. See [14] for a more detailed description. Note that DyDxu0,0 is not independent from the 6 quantities (8). It can be written in term of (7) and (8). For a generic lattice we have: DyDxu0,0 = −DxDxu0,0 (hx0,0 −hx0,1)(hx0,0 −σx0,0) hx0,1h y 0,0 + hx0,0σ y 0,0 −hx0,1σ y 0,0 −σx0,0σ y 0,0 + DyDyu0,0 (hy0,0 −h y 1,0)(h y 0,0 −σ y 0,0) hx0,1h y 0,0 + hx0,0σ y 0,0 −hx0,1σ y 0,0 −σx0,0σ y 0,0 + DxDyu0,0 hx0,0h y 1,0 + h y 0,0σ x 0,0 −h y 1,0σ x 0,0 −σx0,0σ y 0,0 hx0,1h y 0,0 + hx0,0σ y 0,0 −hx0,1σ y 0,0 −σx0,0σ y 0,0 (10) Formulas (7)–(10) can be simplified if we require the validity of the Clairaut–Schwarz–Young theorem, i.e., DxDyu0,0 = DyDxu0,0. This is true when the following constraint for the lattice holds [14]: σxn,m = σ x n+1,m ≡ σ x m, h x n,m = h x n,m+1 ≡ h x n, σ y n,m = σ y n,m+1 ≡ σ y n, h y n,m = h y n+1,m ≡ h y m. (11) Using the operators Dx and Dy given in (9) we can transform the standard discrete prolongation [17] pr X̂n,m = X̂n,m + X̂n+1,m + X̂n+2,m + X̂n,m+1 + X̂n,m+2 + X̂n+1,m+1 (12) of the vector field X̂n,m = ξn,m∂xn,m + τn,m∂yn,m + φn,m∂un,m (13) to the new set of independent variables (7), (8). We get pr X̂n,m = X̂n,m + ∑ (i,j)=0,1 [ η (x) n+i,m+j∂hxn+i,m+j + χ (x) n+i,m+j∂σxn+i,m+j + η (y) n+i,m+j∂hyn+i,m+j + χ(y)n+i,m+j∂σyn+i,m+j ] + φ(1,x)n,m ∂Dxun,m + φ (1,y) n,m ∂Dyun,m + φ (2,xx) n,m ∂[Dx]2un,m + φ (2,xy) n,m ∂DyDxun,m + φ (2,yy) n,m ∂[Dy ]2un,m, (14) where η (x) n+i,m+j = ξn+1+i,m+j − ξn+i,m+j, η (y) n+i,m+j = τn+i,m+1+j − τn+i,m+j, χ (x) n+i,m+j = ξn+i,m+1+j − ξn+i,m+j, χ (y) n+i,m+j = τn+1+i,m+j − τn+i,m+j, φ(1,x)n,m = Dxφn,m −Dxun,mDxξn,m −Dyun,mDxτn,m, φ(1,y)n,m = Dyφn,m −Dxun,mDyξn,m −Dyun,mDyτn,m, φ(2,xx)n,m = Dxφ (1,x) n,m − [Dx] 2un,mDxξn,m −DyDxun,mDxτn,m, φ(2,xy)n,m = Dxφ (1,y) n,m −DxDyun,mDxξn,m − [Dy] 2un,mDxτn,m, φ(2,yy)n,m = Dyφ (1,y) n,m −DxDyun,mDyξn,m − [Dy] 2un,mDyτn,m. (15) In the continuous limit, when hxn+i,m+j, h y n+i,m+j, σ x n+i,m+j and σ y n+i,m+j go to 0, η (x) n+i,m+j, η (y) n+i,m+j, χ (x) n+i,m+j and χ(y)n+i,m+j go also to 0 while φ (1,x) n,m , φ (1,y) n,m , φ (2,xx) n,m , φ (2,xy) n,m and φ (2,yy) n,m go to the corresponding continuous prolongations. Applying the infinitesimal generator (14) onto (11) we get that both functions ξn,m(xn,m,yn,m,un,m) and τn,m(xn,m,yn,m,un,m) must satisfy the discrete wave equations ξn,m+1 − ξn,m − ξn+1,m+1 + ξn+1,m = 0, τn,m+1 − τn,m − τn+1,m+1 + τn+1,m = 0. (16) This is a constraint for the symmetry coefficients if the Clairaut–Schwarz–Young theorem is to be satisfied, i.e., (16) are to be added to the determining equations if we want to have a lattice satisfying the Clairaut– Schwarz–Young theorem. In this case, if, for example, the difference equation for un,m involves second order shifts like un+2,m or un,m+2 so that un,m, un,m+1 and un+1,m are independent variables, then from (16) we get ξn,m(xn,m,yn,m,un,m) = ξn,m(xn,m,yn,m). If the lattice equations in our scheme involve the points xn+2,m,yn+2,m or xn,m+2,yn,m+2, so that xn,m, xn,m+1, xn+1,m, yn,m, yn,m+1 and yn+1,m are independent variables, then ξn,m(xn,m,yn,m,un,m) = ξn,m. Then, as it is the case of the continuous wave equation, the 238 vol. 56 no. 3/2016 On the Construction of Partial Difference Schemes II general solution of (16) is given by ξn,m = f (x) n + g (x) m and τn,m = f (y) n + g (y) m , i.e., the sum of an arbitrary function of n and one of m. It is worthwhile, in view of the application to be carried out in next Section, to compute the lowest order discrete derivatives of monomials in x and y: Dxxn,m = 1, Dxyn,m = 0, Dyxn,m = 0, Dyyn,m = 1, Dxx 2 n,m = 2xn,m + hyn,m(hxn,m)2 −σyn,m(σxn,m)2 h y n,mhxn,m −σ y n,mσxn,m = 2xn,m + ∆xxx, Dxxn,myn,m = yn,m + hyn,mσ y n,m(hxn,m −σxn,m) h y n,mhxn,m −σ y n,mσxn,m = yn,m + ∆xxy, Dxy 2 n,m = − hyn,mσ y n,m(hyn,m −σyn,m) h y n,mhxn,m −σ y n,mσxn,m = ∆xyy, Dyx 2 n,m = − hxn,mσ x n,m(hxn,m −σxn,m) h y n,mhxn,m −σ y n,mσxn,m = ∆yxx, Dyxn,myn,m = xn,m + hxn,mσ x n,m(hyn,m −σyn,m) h y n,mhxn,m −σ y n,mσxn,m = xn,m + ∆yxy, Dyy 2 n,m = 2yn,m + hxn,m(hyn,m)2 −σxn,m(σyn,m)2 h y n,mhxn,m −σ y n,mσxn,m = 2yn,m + ∆yyy. (17) where the quantities ∆xxx, ∆xxy, ∆xyy, ∆yxx, ∆yxy and ∆yyy go to zero in the continuous limit when h and σ go to zero. 3. Example: the potential Burgers equation The Burgers equation ut = νuxx + uux, (18) a very well known partial differential equation, appears as a simplification of the Navier–Stokes equation and has been studied from many, if not all, points of view [4]. It was proposed as a model for a viscous fluid, with a viscosity parameter ν. When the viscosity parameter ν is set equal to zero, the Burgers equation degenerates into a quasilinear first order equation which is the prototype of a class of equations which presents nonlinear phenomena such as shock waves. In fact, the limit ν → 0 allows the study of these shock wave solutions as limits of the solutions of the viscous Burgers equation. In particular, although the inviscid Burgers equation has an infinite dimensional group of symmetries (being a first order equation), the limit of the symmetry group of the viscous Burgers equations provides a subgroup of the whole group of symmetries of the inviscid Burgers equation which is a useful tool in the study of the equation and in particular its discretization using invariant techniques. Several invariant discretization approaches have been proposed to construct explicit numerical schemes for finding numerical solutions on invariant lattices [1, 10]. In some of these works, explicit comparison has been made, showing the higher accuracy and stability of these methods [5]. It is not our intention in this paper to present this kind of numerical results but rather to prove the possibility of constructing in an easy way such invariant discrete schemes and discuss the properties of a lattice satisfying the Clairaut–Schwarz–Young theorem from the numerical point of view. For the control of the numerical calculations we will study the time evolution of the initial condition provided by exact solutions of the Burgers equation. To simplify the presentation and with no loss of generality we will go over to consider the potential Burgers equation as this is point transformable into the linear heat equation for which many exact solutions are known. Let us construct using the formulas introduced in the previous section the discrete scheme which preserves the point symmetries of the potential Burgers equation uy −uxx −u2x = 0. (19) The point symmetries of (19) are [18] V̂1 = ∂x, V̂2 = ∂y, V̂3 = ∂u, V̂4 = x∂x + 2y∂y, V̂5 = 2y∂x −x∂u, V̂6 = 4yx∂x + 4y2∂y − (x2 + 2y)∂u, V̂α = α(x,y)e−u∂u, (20) where the function α(x,y) satisfies the heat equation αy = αxx. (21) 239 Decio Levi, Miguel A. Rodríguez Acta Polytechnica The infinitesimal generator V̂α is the one responsible for the linearizability of the potential Burgers equation as it provides its linearizing transformation α = eu. (22) A function F (x,y,u,ux,uy,uxx) is invariant under the infinitesimal generators V̂1, V̂2, V̂3 V̂4, V̂5 if it depends on I(1) = uy −u2x uxx . (23) It is then easy to see that (23) is weakly invariant also under V̂6 and V̂α, i.e., pr(2) V̂6 I(1) = 2 uxx (I(1) − 1), pr(2) V̂α I(1) = − e−u uxx ( αu2x + 2αxux + αy ) (I(1) − 1). The potential Burgers equation (19) is then given by I(1) = 1 (24) Taking into account the discrete prolongation (14) and the definition of the infinitesimal coefficients (15) we can construct the discrete prolongation of the vector fields (20). It is easy to show that the conditions (16) are satisfied for all symmetries (20) except for V̂6 for which ξn,m+1 − ξn,m − ξn+1,m+1 + ξn+1,m = −4[hxn,mh y n,m + σ x n,mσ y n,m] 6= 0 and τn,m+1 − τn,m − τn+1,m+1 + τn+1,m = −8hxn,mσ x n,m 6= 0. Since we are presently interested in analyzing the role of the Schwarz condition on the construction of lattices and its consequences in numerical computations, we will not consider the symmetry with generator V̂6 in the following, that is, we restrict ourselves to a sugbroup of the whole symmetry group (note that we have also disregard in our analysis the operator V̂α, which, as we have remarked above, is related to the linearization of the equation under study). Taking into account (17) we have: prd V̂1 = ∂xn,m, pr d V̂2 = ∂yn,m, pr d V̂3 = ∂un,m, prd V̂4 = xn,m∂xn,m + 2yn,m∂yn,m + h x n,m∂hxn,m + h x n+1,m∂hxn+1,m + h x n,m+1∂hxn,m+1 + σ x n,m∂σxn,m +σxn,m+1∂σxn,m+1 + 2 ( hyn,m∂hyn,m + h y n+1,m∂hyn+1,m + h y n,m+1∂hyn,m+1 + σ y n,m∂σyn,m + σ y n+1,m∂σyn+1,m ) −Dxun,m∂Dxun,m − 2Dyun,m∂Dyun,m − 2[Dx] 2un,m∂D2xun,m, prd V̂5 = 2yn,m∂xn,m −xn,m∂un,m + 2σ y n,m∂hxn,m + 2σ y n+1,m∂hxn+1,m + 2(h y n+1,m + σ y n,m −h y n,m)∂hxn,m+1 +2hyn,m∂σxn,m + 2h y n,m+1∂σxn,m+1 −∂Dxun,m − 2Dxun,m∂Dyun,m. (25) The commutation table of this algebra appears in Table 1 (it is, obviously the same as in the continuous case). It is immediate to see that a discrete potential Burgers equation preserving the Lie algebra of (19) given by the generators V̂1, V̂2, V̂3 V̂4, V̂5 is: I(1) = [Dx]2un,m Dyun,m − (Dxun,m)2 = 1, i.e., Dyun,m − [Dx]2un,m − (Dxun,m)2 = 0. (26) The continuous limit of (26) is trivially given by (19) when hx, hy, σx and σy go to zero preserving the structure of the lattice. Eq. (26) involves 6 lattice points centered around (n,m), i.e., (n,m), (n + 1,m), (n,m + 1), (n + 2,m), (n + 1,m + 1), (n,m + 2). It explicitly reads: −σxm(un+1,m −un,m) + hxn(un,m+1 −un,m) hxnh y m −σxmσ y n − [ hym (hym(un+2,m −un+1,m) −σyn+1(un+1,m+1 −un+1,m) hxn+1h y m −σxmσ y n+1 − hym(un+1,m −un,m) −σyn(un,m+1 −un,m) hxnh y m −σxmσ y n ) −σyn (hym+1(un+1,m+1 −un,m+1) −σyn(un,m+2 −un,m+1) hxnh y m+1 −σxm+1σ y n − hym(un+1,m −un,m) −σyn(un,m+1 −un,m) hxnh y m −σxmσ y n )]( hxnh y m −σ x mσ y n )−1 − (hym(un+1,m −un,m) −σyn(un,m+1 −un,m))2 (hxnh y m −σxmσ y n)2 = 0. (27) 240 vol. 56 no. 3/2016 On the Construction of Partial Difference Schemes II V̂1 V̂2 V̂3 V̂4 V̂5 V̂1 0 0 0 V̂1 −V̂3 V̂2 0 0 0 2V̂2 2V̂1 V̂3 0 0 0 0 0 V̂4 −V̂1 −2V̂2 0 0 V̂5 V̂5 V̂3 −2V̂1 0 −V̂5 0 Table 1. Commutation table of the discrete invariance algebra. To complete the difference scheme we have to associate to it a lattice equation which preserve the symmetries (25) or part of them. The complete list of discrete invariant of (25), obtained as usual, as solutions of the equations prd V̂i(K) = 0, are: K1 = h y n+1,m h y n,m , K2 = h y n,m+1 h y n,m , K3 = σyn,m h y n,m , K4 = σ y n+1,m h y n,m , K5 = 1 (hyn,m)3/2 ( hxn,mh y n,m −σ x n,mσ y n,m ) , K6 = 1 (hyn,m)3/2 ( h y n,m+1σ x n,m −h y n,mσ x n,m+1 ) , K7 = 1 (hyn,m)3/2 ( hxn,m(h y n+1,m −h y n,m) −σ y n,m(h x n,m+1 −h x n,m) ) , K8 = 1 (hyn,m)3/2 ( hxn,mσ y n+1,m −h x n+1,mσ y n,m ) , K9 = 1 (hyn,m)1/2 ( hxn,m + 2σ y n,mDxun,m ) , K10 = Dyun,m − (Dxun,m)2 [Dx]2un,m . (28) Our first choice for the difference scheme is an orthogonal cartesian lattice given, in the coordinates hn,m and σn,m by hyn,m = b, σ y n,m = 0, h x n,m = a, σ x n,m = 0, (29) where a and b are arbitrary constants, which in the continuous limit go to zero. This lattice, which is clearly invariant under all the symmetries which satisfy the commutativity constraint, corresponds to the Lie point symmetry infinitesimal generators ξn,m = τn,m = 1 (30) These generators comply with the constraints in (16) and the orthogonal lattice (29) satisfies the Clairaut– Schwarz–Young theorem. To carry out a comparison between this invariant Schwarzian lattice with other lattices which lack these properties, we will consider an exponential non Schwarzian lattice as given in [14] by yn,m = bm + b0, xn,m = (1 + c)m(an + a0), (31) where a, a0, b, b0 and c are arbitrary constants. b and a are the lattice spacing and c is a dilation parameter which, when set equal to zero reduces this lattice to an orthogonal lattice. This lattice corresponds to the Lie point symmetry infinitesimal generators ξn,m = (1 + c)m(k1n + k2) + k0 xn,m, τn,m = k3 (32) which clearly do not satisfy (16). The non Schwarzian property of this lattice can also be seen by considering the lattice differences hyn,m = b, σ y n,m = 0, h x n,m = (1 + c) ma, σxn,m = c(1 + c) man. (33) and comparing them with (11). This non Schwarzian lattice is not invariant under the potential Burgers symmetry group (20); K5, K6, K7 and K9 are non constants. In the following Section we will provide a numerical test about the possible importance of the Clairaut– Schwarz–Young theorem, by studying numerically the evolution provided by the symmetry preserving discretized potential Burgers equation (27) on the two different lattices we introduced above, i.e., the Schwarzian and non Schwarzian lattices (29, 33). 4. Numerical calculation results for the discrete potential Burgers equation In order to compare the precision and accuracy of different lattices used to compute numerically the solution of the potential Burgers equation, we will construct two of its exact solutions (associated to different symmetries 241 Decio Levi, Miguel A. Rodríguez Acta Polytechnica of the heat equation) and use them as initial conditions for the evolution of the Burgers map (27). In fact, we will not do a direct comparison of the evolution of this map in the two lattices (29) and (33) but compare the solution of the map in each lattice with the exact solution of the continuous equation. We introduce two invariant solutions of (21) and transform them into solutions of the potential Burgers equation [14] using (22). Starting from the traveling wave solution of the heat equation (invariant under a combination of x and y translations) we get as a simple solution, bounded for x ∈ R+ for each y, f1(x,y) = log(1 + e−(x−y)). (34) A second exact solution (the fundamental solution) is given by the Galilei–invariant solution of the heat equation f2(x,y) = log ( 1 + e−x 2/(4y) √ y ) . (35) To compare the results given by the evolution of the map on a given lattice to the evolution given by the exact solution we introduce a global estimator, the usual (relative) distance in the discrete analog of the L2 space: χlattice(f) = √∑ n,m(flatticen,m −fn,m)2∑ n,m f 2 n,m (36) where fn,m and flatticen,m are the values of the exact solution and the numerical one, respectively, computed in the points of the lattices (29, 33). Since our intention is to compare the lattices, we will not insist on improving the precision and accuracy of the solution by modifying in an optimal way the parameters involved in the computation. For the orthogonal lattice we will take (for f1 and f2) a = b = 0.1 in a square D of 8 × 8 points in the x,y plane. We will use the same number of points in all the cases we will consider, in order to keep as far as possible the same round off errors due to machine precision. Augmenting the number of points enlarges the numerical instabilities which could be reduced by increasing the precision of the calculations at the cost of the time of calculus. These instabilities are non–physical and we decide to avoid them by reducing appropriately the number of points. The region covered by the lattice in the two cases (orthogonal and exponential) can be different for the same lattice spacing. See for example in Figure 1 the cases (1) and (2). In the exponential lattice we will consider two different situations: (i) the spacing is the same as in the orthogonal case (a = b = 0.1), and thus for the exponential lattice the region is deformed and enlarged with respect to the square D considered in the orthogonal lattice, (ii) we will modify a in such a way that the 64 points of the lattice are inside the square D. Let us notice that in this case part of D is not covered by the lattice, and this may create problems as we will see later. The exponential lattice has a parameter c controlling the dilation of the x variable. As we said above, when c = 0 the lattice is orthogonal. We have considered in these numerical calculations two cases, c = 0.1 and c = 0.15, to compare the different behavior of the exponential lattice when it turns into an orthogonal one. In these two cases, the parameter a is taken as a = 0.0375 and a = 0.0513 respectively, when we keep the 64 point of the lattice inside D (see Figure 1 for a graphical description of the four lattices under study). The χ estimator is given in Table 2 and gives raise to the following conclusions: (1.) The orthogonal lattice (Schwarzian lattice) provides better results than the exponential one (non Schwarzian lattice) in all cases except one. (2.) The results for the exponential lattice with different values of c show that the approximation is better when the lattice is closer to a Schwarzian lattice (recall that when c → 0 the exponential lattice becomes orthogonal), for the two solutions considered. (3.) The value of the χ estimator for the traveling wave solution in the exponential lattice when a = 0.0513 and c = 0.1 is lower than the corresponding value for the orthogonal case. In this case (Figure 1.3) the lattice is close to the orthogonal one but there is a region in D which is not covered by the exponential lattice. This is the region where the round off errors the computer makes in calculating the points in the orthogonal lattice are greater. This is the reason for this unsatisfactory value. When c = 0.15 the lattice is far from the orthogonal one and thus χ is greater than in the orthogonal case. 5. Conclusions In this work we have shown that also in the case of partial difference equations we can introduce a set of variables which are in one to one correspondence with the grid points when we substitute them by the lattice differences and the derivatives on the lattice of the dependent function. This correspondence allows us to write down the invariance equations by using only the knowledge of the continuous invariants. 242 vol. 56 no. 3/2016 On the Construction of Partial Difference Schemes II y x � 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.1 0.2 0.3 0.4 0.5 0.6 0.7 x y 0.5 1.0 1.5 0.2 0.4 0.6 0.8 (1) (2) x y 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.1 0.2 0.3 0.4 0.5 0.6 0.7 x y 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.1 0.2 0.3 0.4 0.5 0.6 0.7 (3) (4) Figure 1. (1) Orthogonal lattice: a = 0.1, b = 0.1. (2) Exponential lattice: a = 0.1, b = 0.1, c = 0.15. (3) Exponential lattice: a = 0.0513, b = 0.1, c = 0.1. (4) Exponential lattice: a = 0.0375, b = 0.1, c = 0.15. Dimension: 8 × 8 points. χort χexp, c = 0.1 χexp, c = 0.15 f1 (1) 0.01267 (5) 0.01437 (2) 0.01651 (3) 0.01147 (4) 0.01408 f2 (1) 0.00249 (5) 0.00430 (2) 0.00610 (3) 0.00642 (4) 0.00913 Table 2. χ estimator values for the functions f1 and f2 given by (34) and (35), respectively. (1): a = 0.1, lattice (1) in Figure 1. (2): a = 0.1, lattice (2) in Figure 1. (3): a = 0.0513, lattice (3) in Figure 1. (4): a = 0.0375, lattice (4) in Figure 1. (5): a = 0.1, the exponential lattice is similar to the lattice (2) in Figure 1. The numerical calculation we carried out in Section 4 shows that the Schwarzian property seems important in providing better numerical results. More examples should be done, both to understand the stability of the models we construct in this way and the analysis of the lattices in the Schwarzian and non Schwarzian case. There might be boundary value problems where a non Schwarzian lattice adapted to the geometry of the problem could be better than a Schwarzian one. Acknowledgements DL has been partly supported by the Italian Ministry of Education and Research, 2010 PRIN Continuous and discrete nonlinear integrable evolutions: from water waves to symplectic maps and by INFN IS-CSN4 Mathematical Methods of Nonlinear Physics. DL thanks the Departamento de Física Teórica II of the Complutense University in Madrid for its hospitality. MAR was supported by the Spanish MINECO under project FIS2015-63966. The authors would like to thank the referees for their useful comments. References [1] Bihlo A and Nave J-C 2014 Convecting reference frames and invariant numerical models J. Comput. Phys. 272 656–663; doi:10.1016/j.jcp.2014.04.042 [2] Bourlioux A, Cyr-Gagnon C, and Winternitz P 2006 Difference schemes with point symmetries and their numerical tests J. Phys. A: Math. Gen. 39 6877–6896; doi:10.1088/0305-4470/39/22/006 243 http://dx.doi.org/10.1016/j.jcp.2014.04.042 http://dx.doi.org/10.1088/0305-4470/39/22/006 Decio Levi, Miguel A. Rodríguez Acta Polytechnica [3] Bourlioux A, Rebelo R, and Winternitz P 2008 Symmetry preserving discretization of SL(2,R) invariant equations J. Nonlinear Math. Phys. 15 (Suppl.3) 362–372 [4] Burgers J M 1974 The Nonlinear Diffusion Equation, Asymptotic Solutions and Statistical Problems, Springer, Dordrecht. [5] Chhay M and Hamdouni A 2010 A new construction for invariant numerical schemes using moving frames C.R. Mecanique 338 97–101; doi:10.1016/j.crme.2010.01.001 [6] Dorodnitsyn V A 1991 Transformation groups in difference spaces, J. Soviet Math. 55 1490–1517 [7] Dorodnitsyn V A 2011 Applications of Lie Groups to Difference Equations, CRC Press, Boca Raton [8] Dorodnitsyn V A and Winternitz P 2000 Lie Point Symmetry Preserving Discretizations for Variable Coefficient Korteweg-de Vries Equations Nonlinear Dynamics 22 49–59 [9] Kim P and Olver P J 2004 Geometric integration via multi-space Regular and Chaotic Dynamics 9 213–226 [10] Kim P 2008 Invariantization of the Crank-Nicolson method for Burgers’ equation Physica D 237 243–254; doi:10.1016/j.physd.2007.09.001 [11] Levi D, Olver P, Thomova Z and Winternitz P (editors) 2011 Symmetries and Integrability of Difference Equations, CUP, LMS Lecture Series. [12] Levi D, Scimiterna C, Thomova Z and Winternitz P 2012 Contact transformations for difference schemes J. Phys. A: Math. Theor. 45 022001; doi:10.1088/1751-8113/45/2/022001 [13] Levi D, Thomova Z and Winternitz P 2011 Are there contact transformations for discrete equations? J. Phys. A: Math. Theor. 44 265201; doi:10.1088/1751-8113/44/26/265201 [14] Levi D and Rodríguez M A 2013 On the construction of partial difference schemes I: The Clairaut, Schwarz, Young theorem on the lattice, J. Phys. A: Math. Theor. 46 295203; doi:10.1088/1751-8113/46/29/295203 [15] Levi D and Winternitz P 1991 Continuous symmetries of discrete equations, Phys. Lett. A 152 335–338; doi:10.1016/0375-9601(91)90733-O [16] Levi D and Winternitz P 1996 Symmetries of discrete dynamical systems. J.Math. Phys. 37 5551–5576; doi:10.1063/1.531722 [17] Levi D and Winternitz P 2006 Continuous symmetries of difference equations J. Phys. A: Math. Gen. 39 R1; doi:10.1088/0305-4470/39/2/R01 [18] Olver P J 1993 Applications of Lie Groups to Differential Equations, Springer-Verlag, New York [19] Rebelo R and Valiquette F 2013 Symmetry preserving numerical schemes for partial differential equations and their numerical tests J. Difference Eq. Appl. 19 737–757; doi:10.1080/10236198.2012.685470 [20] Rebelo R and Valiquette F 2015 Invariant Discretization of Partial Differential Equations Admitting Infinite-Dimensional Symmetry Groups J. Difference Eq. Appl. bf 21 285–318; doi:10.1080/10236198.2015.1007134 [21] Rebelo R and Winternitz P 2009 Invariant difference schemes and their applications to SL(2,R) invariant differential equations J. Phys. A: Math.Theor. 42 454016; doi:10.1088/1751-8113/42/45/454016 [22] Winternitz P 2004 Symmetries of discrete systems. Discrete Integrable Systems, vol. 644, Lecture Notes in Physics. Ed B Grammaticos, Y Kosmann-Schwarzbach, and T Tamizhmani (Berlin, Springer Verlag) pp 185–243. See also arXiv:nlin.SI/0309058 [23] Winternitz P 2011 Symmetry preserving discretization of differential equations and Lie point symmetries of differential-difference equations. Symmetries and Integrability of Difference Equations. LMS Lecture Series. Ed D Levi, P J Olver, Z Thomova and P Winternitz. 244 http://dx.doi.org/10.1016/j.crme.2010.01.001 http://dx.doi.org/10.1016/j.physd.2007.09.001 http://dx.doi.org/10.1088/1751-8113/45/2/022001 http://dx.doi.org/10.1088/1751-8113/44/26/265201 http://dx.doi.org/10.1088/1751-8113/46/29/295203 http://dx.doi.org/10.1016/0375-9601(91)90733-O http://dx.doi.org/10.1063/1.531722 http://dx.doi.org/10.1088/0305-4470/39/2/R01 http://dx.doi.org/10.1080/10236198.2012.685470 http://dx.doi.org/10.1080/10236198.2015.1007134 http://dx.doi.org/10.1088/1751-8113/42/45/454016 http://arxiv.org/abs/nlin.SI/0309058 Acta Polytechnica 56(3):236–244, 2016 1 Introduction 2 Schemes for partial difference equations 3 Example: the potential Burgers equation 4 Numerical calculation results for the discrete potential Burgers equation 5 Conclusions Acknowledgements References