[Math] Crank-Nicolson vs Euler. Which on have more accuracy

numerical methodspartial differential equations

According to this report http://gwu.geverstine.com/pdenum.pdf (page 16 to 20) Crank Nicolson has a better accuracy for the same r. However I have been trying to prove that with the equation that appears as example and I got that Euler is better. Only for a very few cases Crank Nicolson is better.
It is supossed that C-N should be more accuracy always, what is going on here?

PS: Im using the following to obtain the error:

Error = norm(U-u)/norm(U)

where U is the exact solution, u the numerical one and norm is given by http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.linalg.norm.html

Best Answer

C-N using the implicit trapezoidal method in time direction has error order 2, Euler has error order 1.

This does not imply that C-N is better for any given step size, but that the error decreases faster when decreasing the step size in time direction.

Keeping the CFL number constant and decreasing the step size in time also decreases the step size in space. With the increased number of grid points also the number of floating point operations increases and thus the speed in which floating point errors accumulate. So at some point the falling method error will meet the raising noise level, giving a lower bound on useful step sizes. Slightly paradoxically, as the error of the higher order method falls faster, it will meet the noise level earlier, for larger step sizes. One can compensate somewhat by using a compensated accumulation of the step updates.

Related Question