I wish to numerically compute solutions of the 1D heat equation using the Crank-Nicholson scheme:
The equation is:
\partial_{t}u=\partial^{2}_{x}u
I use the discretisation:
u_{i+1,j}-u_{i,j}=s(u_{i+1,j+1}-2u_{i+1,j}+u_{i+1,j-1})+s(u_{i+1,j+1}-2u_{i+1,j}+u_{i+1,j-1})
Where s=\delta...