# Is there more than one Crank-Nicolson scheme?

by gjfelix2001
Tags: crank nicolson, diffusion, heat, numerical, pde
 P: 19 Hi everybody... I want to solve the diffusion equation in 1D using the Crank-Nicolson scheme. I have two books about numerical methods, and the problem is that in "Numerical Analysis" from Burden and Faires, the differences equation for the diffusion equations is: $\frac{w_{i,j+1}-w_{i,j}}{k}-\frac{\alpha^2}{2h^2}\Big[w_{i+1,j}-2w_{i,j}+w_{i-1,j}+w_{i+1,j+1}-2w_{i,j+1}+w_{i-1,j+1}\Big]=0$ On the other hand, in "Numerical and analytical methods for scientists and engineers using mathematica", the same equation is expressed as: $\frac{w_{i,j}-w_{i,j-1}}{k}-\frac{\alpha^2}{2h^2}\Big[w_{i+1,j}-2w_{i,j}+w_{i-1,j}+w_{i+1,j-1}-2w_{i,j-1}+w_{i-1,j-1}\Big]=0$ $i$ represents the space steps, $j$ the time steps, $k$ is $\Delta t$, $h$ is $\Delta x$ Should this schemes yield the same results? Why the differences? I mean, in the first term of the first scheme, the numerator is $w_{i,j+1}-w_{i,j}$, but in the second scheme is $w_{i,j}-w_{i,j-1}$. In addition to this, the last 3 terms of the equations (inside the brackets) are $w_{i+1,j+1}-2w_{i,j+1}+w_{i-1,j+1}$ and $w_{i+1,j-1}-2w_{i,j-1}+w_{i-1,j-1}$. Are both schemes named Crank-Nicolson? Can somebody help me with this?? Thanks!!