*3.3. Crank Nicolson Method*

The Crank Nicolson method (CNM) for Equation (2) is

$$
\alpha w\_{n-1,j} + 2(1 - \alpha)w\_{n,j} + \alpha w\_{n+1,j} = -\alpha w\_{n-1,j+1}
$$

$$
+ 2(1 + \alpha)w\_{n,j+1} - \alpha w\_{n+1,j+1}.\tag{4}
$$

The Crank Nicolson method is also implicit and unconditionally stable [22]. It has significant advantages for the time-accurate solutions. The temporal truncation error of CNM is *O*(*t* <sup>2</sup>), whereas the truncation error of FTCS and BTCS is *O*(*t*).

### *3.4. Invariantization of the Crank Nicolson Method under the Discrete Symmetry Transformation*

It is observed that among the mentioned finite difference schemes for the heat equation, the Crank Nicolson method gives the more accurate results [23], so we are interested in constructing an invariantization of the Crank Nicolson method. In the present subsection, we show that the Crank Nicolson method is invariant under the discrete symmetry transformation (3).

Let *wn*,*<sup>j</sup>* = *w*(*nx*, *jt*) be an approximation of *w*(*x*, *t*) at the mesh point (*xn*, *tj*). Now, by using the discrete symmetry group of heat equation given in (3), we have the following transformation

$$w = \sqrt{2it} \exp\left(\frac{\chi^2}{4t}\right) w. \tag{5}$$

By using (5), the Crank Nicolson method transformed to

*αwn*−1,*<sup>j</sup>* <sup>+</sup>2*ij<sup>t</sup>* exp (*<sup>n</sup>* <sup>−</sup> <sup>1</sup>)<sup>2</sup> (*x*)<sup>2</sup> 4*jt* + 2(1 − *α*)*wn*,*<sup>j</sup>* <sup>+</sup>2*ij<sup>t</sup>* exp (*nx*)<sup>2</sup> 4*jt* + *αwn*+1,*<sup>j</sup>* <sup>+</sup>2*ij<sup>t</sup>* exp (*<sup>n</sup>* <sup>+</sup> <sup>1</sup>)<sup>2</sup> (*x*)<sup>2</sup> 4*jt* = −*αwn*−1,*j*+<sup>1</sup> , <sup>2</sup>*i*(*<sup>j</sup>* <sup>+</sup> <sup>1</sup>)*<sup>t</sup>* exp (*<sup>n</sup>* <sup>−</sup> <sup>1</sup>)<sup>2</sup> (*x*)<sup>2</sup> 4(*j* + 1)*t* +2(1 + *α*)*wn*,*j*+<sup>1</sup> , <sup>2</sup>*i*(*<sup>j</sup>* <sup>+</sup> <sup>1</sup>)*<sup>t</sup>* exp (*nx*)<sup>2</sup> 4(*j* + 1)*t* − *αwn*+1,*j*+<sup>1</sup> , <sup>2</sup>*i*(*<sup>j</sup>* <sup>+</sup> <sup>1</sup>)*<sup>t</sup>* exp (*<sup>n</sup>* <sup>+</sup> <sup>1</sup>)<sup>2</sup> (*x*)<sup>2</sup> 4(*j* + 1)*t* . (6)

By considering the following transformation

$$w\_{N,l} = \sqrt{l} \exp\left(\frac{N^2}{4l}\right) w\_{n,j,l}$$

with

$$J = j \triangle t \text{ and } N = n \triangle x\_{\prime}$$

(6) can be written as

$$aw\_{N-1,l} + 2(1 - \mathfrak{a})w\_{N,l} + aw\_{N+1,l} = $$

$$-aw\_{N-1,l+1} + 2(1 + \mathfrak{a})w\_{N,l+1} - aw\_{N+1,l+1}.\tag{7}$$

The finite difference approximation to heat Equation (2) obtained in (7) is similar to the Crank Nicolson method for heat Equation (4). Thus, the Crank Nicolson method remains invariant under the discrete symmetry transformation (3). The consequence of the result obtained in Section 3 can be written in the form of the following theorem.

**Theorem 1.** *The Crank Nicolson method for heat equation given in (4) is invariant under the only discrete symmetry transformation (3) of the heat Equation (2).*
