0

for a second-order time dependent PDE, like $\frac{\partial^2 u}{\partial t^2}=L(u)$. Centered difference approximation for time is $\frac{u^{n+1}-2u+u^{n-1}}{\Delta t^2}$. Backward difference approximation for time is $\frac{2u^{n}-5n^{n-1}+4n^{n-2}-u^{n-3}}{\Delta t^2}$. Forward difference approximation for time is $\frac{2u^{n}-5n^{n+1}+4n^{n+2}-u^{n+3}}{\Delta t^2}$.

I am confused, what are the unknowns in these methods?

For example, in the Centered difference method, is $u^{n+1}$ the unknown or $u^{n}$ the unknown in the current timestep $n$?

Formulas are from https://www.dam.brown.edu/people/alcyew/handouts/numdiff.pdf

  • These are all approximations for $u_{tt}^n$, so have to be set equal to $L(u^n)$. – Lutz Lehmann Mar 15 '21 at 14:33
  • So I need to know $u^{n+1}$ to know $u^n$? – Miraboreasu Mar 15 '21 at 14:54
  • No, the other way around. The central scheme gives an explicit method to compute $u^{n+1}$ from $u^n$ and $u^{n-1}$. The backward differentiation gives an implicit scheme. One would have to explore its stability. See also the Numerov methods, Beeman's methods, symplectic methods, ... – Lutz Lehmann Mar 15 '21 at 15:04
  • I see, so for a shock, which one would be better? Backward? – Miraboreasu Mar 15 '21 at 15:06
  • Yes. You might need some post-processing to restore conserved quantities. This is the domain of the named schemes, Lax-something. – Lutz Lehmann Mar 15 '21 at 15:30
  • Sorry I am confused, you said backward is implicit, but from the equation $\frac{2u^{n}-5n^{n-1}+4n^{n-2}-u^{n-3}}{\Delta t^2}$. The only unknown is $u^n$, what is the difference with central? – Miraboreasu Mar 15 '21 at 15:40
  • You solve $$2u^{n}-5n^{n-1}+4n^{n-2}-u^{n-3}=\Delta t^2L(u^n)$$ which is an implicit equation for the state $u^n$. – Lutz Lehmann Mar 15 '21 at 15:41
  • What I did in my centered is $u^{n+1}-2u+u^{n-1}=\Delta t^2 L(u^n+1)$, why this is explicit? – Miraboreasu Mar 15 '21 at 15:44
  • No, this equation is $$u^{n+1}-2u^n+u^{n-1}=\Delta t^2 L(u^n),$$ the classical/basic Stormer-Verlet scheme. Of course, if you do not care about the order of the method, then you could also use your proposed order 1 variant. But then you do not need backward-differentiation formulas. – Lutz Lehmann Mar 15 '21 at 15:49
  • I do care, thank you for your correction, so what is the order of $2n^n -5n^{n-1}+4n^{n-2}-u^{n-3}=\Delta t^2 L(u^n)$ – Miraboreasu Mar 15 '21 at 15:54
  • Per the confirmed table in https://math.stackexchange.com/questions/3358496/numerical-method-forward-finite-difference this is the second order difference quotient for the second order derivative. – Lutz Lehmann Mar 15 '21 at 15:57
  • Thank you, can you please provide more materials about how to compute the order of the method, like how can you compute my proposed method. – Miraboreasu Mar 15 '21 at 16:01
  • More fundamental better – Miraboreasu Mar 15 '21 at 16:04
  • To make a clarification, $2u^{n}-5n^{n+1}+4n^{n+2}-u^{n+3}=\Delta t^2L(u^{n+3})$ is explicit? All n+1, n+2, n must be known? – Miraboreasu Mar 15 '21 at 16:11
  • No, the right side has to stay $Δt^2L(u^n)$. Then this is an explicit method that is extremely unstable. – Lutz Lehmann Mar 15 '21 at 16:13
  • So $n, n+1, n+2$ are known, and $n+3$ is unknown? – Miraboreasu Mar 15 '21 at 17:37
  • Yes, if you integrate in forward direction. – Lutz Lehmann Mar 15 '21 at 18:45

1 Answers1

0

The basic formula for the second derivative is $$ u''(t)=u''(t-h)+O(h)=\frac{u(t)-2u(t-h)+u(t-2h)}{h^2}+O(h) $$ But we can add terms from the Taylor expansion and their low-order difference-quotient over the available sample points \begin{align} u''(t)&=u''(t-h)+u'''(t-h)h+O(h^2)\\ &=\frac{u(t)-2u(t-h)+u(x-2h)}{h^2}+\frac{u(t)-3u(t-h)+3u(t-2h)-u(t-3h)}{h^{3-1}}+O(h^2)\\ &=\frac{2u(t)-5u(t-h)+5u(t-2h)-u(t-3h)}{h^2}+O(h^2) \end{align} In the next order higher one would have to consider that the third order divided difference has its minimal error as approximation of $u(t-1.5h)$, the shift to that position gives another Taylor term. Then that the second order derivative has a second order error term involving the 4th order derivative. And for higher orders it gets more complex, which is why a more systematic approach is needed, see Numerical Method Forward Finite Difference Coefficient

In any case you want $u''(t)=L(u(t))$ with matching times on both sides. One gets more flexibility if more values of the $L$ function are involved in the formula, the easiest is the 4th order Numerov method $$ \frac{u(t+h)-2u(t)+u(t-h)}{h^2}=\frac{L(u(t+h))+10L(u(t))+L(u(t-h))}{12}+O(h^4) $$ $u(t+h)$ is the new state that is computed in a Numerov step.

Lutz Lehmann
  • 126,666
  • So Numerov is implicit, since both side is solving for $u(t+h)$? – Miraboreasu Mar 15 '21 at 19:25
  • Yes. Most of the useful methods are implicit, as explicit methods have rather bounded stability regions. As space differentiation produces large Lipschitz constants, the time step size has to be appropriately small. – Lutz Lehmann Mar 15 '21 at 19:42
  • Thank you, I want to know how to calculate the order of the method? – Miraboreasu Apr 04 '21 at 03:46
  • What method? Numerov? It is symmetric, thus has only even terms in the error expansion. The first term of the divided difference is cancelled, so that the local error has order 4. This is also the global error. – Lutz Lehmann Apr 04 '21 at 04:41
  • Can you please be more specific in what is error expansion? Any material is also welcome, thank you! – Miraboreasu Apr 04 '21 at 04:43
  • The wikipedia article on the topic is decent, more you can find in the cited Hairer book. You compute the truncation error by inserting an exact solution and its Taylor expansion into the method step equation and compute the residual. Depending on the form used, the residual is $O(h^p)$ if the difference quotient is used, or $u(h^{p+2})$ if there is no division by $h$ on the left side, as one would use it in the algorithm. – Lutz Lehmann Apr 04 '21 at 04:53
  • Can you please be more specific, what key words I should use to search in Wikipedia for this topic? – Miraboreasu Apr 04 '21 at 16:36