The scheme is given by $$\frac{v_m^{n+1}-v_m^{n-1}}{2k} + b\frac{v_m^{n+1}+v_m^{n-1}-v_{m-1}^n-v_{m+1}^n}{h^2} = 0$$

where $v_m^n$ is the numerical solution at the $m^\text{th}$ spatial coordinate and $n^\text{th}$ time step. It approximates a solution to

$$\frac{\partial u}{\partial t} - b\frac{\partial^2 u}{\partial x^2} = 0$$

I need to find a bound for the local truncation error. Is there a relatively quick way of doing this? I need to do this sort of thing on an exam, and I don't want to take too long, or rush it and make a mistake, possibly taking even longer.

  • $\begingroup$ Taylor series about $v_{m}^{n}$ for each term and collect terms such that the original PDE is on the left and the rest of the terms are on the right. The lowest order terms on the right for each dimension correspond to the local truncation errors. $\endgroup$
    – spektr
    Aug 3 '16 at 21:30
  • $\begingroup$ I don't think that's right. Because then Euler's method would have a LTE of $O(k)$ even though it has an LTE of $O(k^2)$. Am I missing something? $\endgroup$
    – Kurt
    Aug 3 '16 at 21:34
  • $\begingroup$ When I do what I said for just the first term, the one representing the time derivative, I end up with it being $O(k^2)$, which makes sense since the time scheme is a second order central difference. $\endgroup$
    – spektr
    Aug 3 '16 at 21:51
  • $\begingroup$ Well, here's the issue. We know that Euler's method has an LTE of $O(k^2)$, but when I do what you said: $$\frac{y_{n+1} - y_n}{k} = y_n' + O(k)$$ which is not the right answer. $\endgroup$
    – Kurt
    Aug 3 '16 at 21:52
  • $\begingroup$ You're incorrect. Euler's method is $O(k)$. The result you obtained by hand is correct. $\endgroup$
    – spektr
    Aug 3 '16 at 21:56

A similar subject here where I show the way to calculate the truncation error with the advection equation.

A search gives me this. I think that could answer your question ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.