Showing that the Crank-Nicolson method is second order

2.7k Views Asked by At

For the diffusion equation $\dfrac{\partial \rho}{\partial t} = D\,\Delta \rho$, I'm trying to show that Crank-Nicolson is second order. I've isolated the truncation error $\tau_i^{n+1}$ to be $ D\left(\frac{\rho(x_{i+1}, t_{n+1}) + \rho(x_{i-1}, t_{n+1}) - 2\rho(x_i, t_{n+1})}{2(\Delta x)^2} + \frac{\rho(x_{i+1}, t_n) + \rho(x_{i-1}, t_n) - 2\rho(x_i, t_n)}{2(\Delta x)^2}\right)$, but I'm having trouble actually showing that it's $O((\Delta t)^2 + O((\Delta x)^2)$.

How should I proceed? A simple hint (ie how to to the Taylor Series) would be just fine!

Thank you!

1

There are 1 best solutions below

0
On

Taylor's in two variables:

$f(x,y)=f(a,b)+\sum_{1\le r+s\le n}\frac{\partial^{r+s}f(a,b)}{\partial x^r\partial y^s}\frac{(x-a)^r}{r!}\frac{(y-b)^s}{s!}+E_n(x,y)$

Where the error term $E_n(x,y)=\sum_{r+s=n+1}\frac{\partial^{r+s}f(\xi,\eta)}{\partial x^r\partial y^s}\frac{(x-a)^r}{r!}\frac{(y-b)^s}{s!}$

Where $(\xi,\eta)$ is some value on the line between the points $(a,b)$ and $(x,y)$.

And as the commenter pointed out you will probably need a fourth order approximation to cancel with the $(\Delta x)^2$ on the bottom of the fraction.