# amplification factor for the Crank Nicolson scheme for the advection equation

I will try one more time being more detailed and careful. Consider the transport equation of the form $$u_t+au_x=0, t\in[0,T],x\in \mathbb{R}, a>0$$ and initial condition $u(0,x)=u_0(x)$. I would like to establish stability of Crank-Nicolson scheme for that equation by computing the amplification factor. Consider the following iteration of CN: $$\frac{u^{n+1}_j-u^{n}_j}{k}+\frac{1}{2}a\frac{u^{n+1}_{j+1}-u^{n+1}_{j-1}}{2h}+\frac{1}{2}a\frac{u^{n}_{j+1}-u^{n}_{j-1}}{2h}=0$$ then I substitute the form $u^n_j=Q^ne^{ijhw}$ in the above equation: $$\frac{(Q-1)e^{ijhw}Q^n}{k}+\frac{1}{2}ae^{ijhw}Q^{n+1}\frac{e^{ihw}-e^{-ihw}}{2h}+\frac{1}{2}ae^{ijhw}Q^{n}\frac{e^{ihw}-e^{-ihw}}{2h}=0$$ from where with we get: $$Q=\frac{1-i\frac{ak}{2h}\sin(hw)}{1+i\frac{ak}{2h}\sin(hw)}$$ this is a complex number of the form $\frac{1-iC}{1+iC}$, thus I can calculate the absolute value as follows: $$|Q|=|\frac{(1-iC)(1-iC)}{(1+iC)(1-iC)}|=|\frac{1-C^2-2iC}{1+C^2}|=\frac{(1-C^2)^2+4C^2}{1+C^2}=\frac{(1+C^2)^2}{(1+C^2)^2}=1$$

from where I deduce that for Crank Nicolson method the amplification factor for that equation has the magnitude of: $$|Q|=1$$ If there is a mistake in the computations please let me know and I proceed from there. But if this is the amplification factor indeed I would like to know if I can deduce stability/conditional stability/instability from it? Is there a possibility of oscillations of any form? It does satisfy the condition less or equal than one, therefore I can use it and will not have problems?

-
In the line of equations beginning with $|Q|$, you have made a mistake. The expression after the third '=' is not correct. The numerator is the square of what it should be. –  David Ketcheson Jan 29 '13 at 8:47
Thanks David. I have fixed it. –  Kamil Jan 29 '13 at 13:25

If the amplification factor is $\le 1$, then your scheme is stable; in your case it is exactly one, so, for this PDE, you won't have unbounded growth of errors. The Lax theorem then guarantees convergence of the method. In this narrow sense, the Crank-Nicholson method will work for you. (Have a look at Leveque's book if you want a good reference.)

But, your question of whether or not you will have problems is a deeper one and depends on your objectives. While the Crank Nicholson method does not introduce amplitude errors, it will incur phase errors. By this, it's meant that different Fourier modes will have different group velocities -- this contrasts with the true PDE, where all modes travel with velocity $a$. Depending on what your application is, the dispersion associated with CN is unacceptable, convergent or not, and you'd choose a different approach.

Generally speaking, even for methods that do converge, there is a trade-off between numerical diffusion and numerical dispersion. In some problems, using staggered grids is a great way to wriggle out of this bargain. If you want to know more, I recommend Dale Durran's Numerical Methods for Fluid Dynamics; he has a great treatment of this subject.

-
thanks for the answer. Related to the original question: If instead of central differences I would use one sided for $u_x$, I think the amplification factor is again $1$, but I introduce some diffusion and decrease order of accuracy in space to one from two. Would that provide me with unconditionally stable fdm scheme of $O(k^2+h)$ for that equation? –  Kamil Jan 30 '13 at 1:34