3
$\begingroup$

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.

$\endgroup$
9
  • $\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, 2016 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, 2016 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, 2016 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, 2016 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, 2016 at 21:56

2 Answers 2

1
$\begingroup$

This can be simplified using the even and odd parts of the function in time and space direction. \begin{align} \text{odd: }&v(x,t+k)-v(x,t-k)=2\left[kv_t(x,t)+\frac{k^3}6v_{ttt}+...\right] \\ \text{even: }&v(x,t+k)+v(x,t-k)=2\left[v(x,t)+\frac{k^2}2v_{tt}+\frac{k^4}{24}v_{tttt}+...\right] \\ \text{even: }&v(x+h,t)+v(x-h,t)=2\left[v(x,t)+\frac{h^2}2v_{xx}+\frac{h^4}{24}v_{xxxx}+...\right] \end{align} Thus the leading error terms are $$ \frac{k^2}6v_{ttt},~~~\frac{k^2}{2h^2}v_{tt},~~~\frac{h^2}{24}v_{xxxx} $$ This suggests that one has to select $k\sim h^2$. I do not see that the identity $v_{tt}=b^2v_{xxxx}$ simplifies the error formula.

$\endgroup$
0
$\begingroup$

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 ?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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