# Exact finite difference method for advection equation

I want to solve the advection equation: $u_t+au_x=0, a > 0$. Here is our method:

$$U_j^{n+1}=U_{j-1}^n-\left(\frac{ak}{h}-1\right)(U_{j-1}^n - U_{j-2}^n)$$

I am trying to answer the following question: "Say we fix $h$, then for which values of $k$ is this method exact? Note that there's more than one value."

I know that the following is exact: $U_j^{n+1}=U_{j-1}^n$, which corresponds to $k=\frac{h}{a}$. But what is the other value of $k$?

Thanks.

• What, precisely, do you mean by "exact"? Do you have any requirements on the order of accuracy of your finite difference scheme? – Charles Jun 25 '16 at 8:10
• @Charlie Based on his example exact solution, I'd guess that he's interested in a solution where, given exact arithmetic, the analytical solution is reproduced. I'm not aware of any besides the "magic time step" in the first-order scheme. – Tyler Olsen Jun 26 '16 at 16:00

Let $c=a k/h$ denote so called Courant number. Your scheme is reasonable only for $c \in [1,2]$. It is exact for $c=1$, as you mentioned, and for $c=2$ in the sense that if the values at time level $n$ are exact, they will be exact also at time level $n+1$. It is unusual to use a scheme that is inprecise (and very likely unstable) for small time step $k$, i. e. when $c \in (0,1)$, you may include standard first order upwind scheme for this case. There exist schemes that solve your advection equation for arbitrary time step $k$ and even for variable $a$, e. g. modified method of characteristics.