0

The backward difference formula with second order accuracy (BDF2) for a first order derivative is

$$d_tx = \frac{3x_{n+1}-4x_n + x_{n-1}}{2\Delta{t}}$$

I am attempting to generate the BDF2 formula for a second order derivative. I can't find anything beyond the first order formula in any textbooks or online.

What I have tried is:

$$d_{tt}x = \frac{3d_tx_{n+1}-4d_tx_n + d_tx_{n-1}}{2\Delta{t}}$$ $$\implies d_{tt}x = \frac{9x_{n+1}-24x_n+22x_{n-1}-8x_{n-2}+x_{n-3}}{4\Delta{t}^2}$$

I am not sure if this is a correct way to do this. Please advice.

Cogicero
  • 167

1 Answers1

1

Backward differentiation formulas (BDF) are a particular kind of linear multistep methods. Such methods write [1] \begin{aligned} x_n &= \alpha_1 x_{n-1} + \dots + \alpha_k x_{n-k} + \beta_0 \Delta t\, f(t_n,x_n) \, . \end{aligned} They are designed to solve numerically ordinary differential equations $$ x' = f(t,x) \, , $$ where $t_{n}-t_{n-1} = \Delta t$ denotes the step size. In particular, the BFD2 corresponds to the case $k=2$, with coefficients $\alpha_1=4/3$, $\alpha_2=-1/3$, and $\beta_0=2/3$, i.e. $$ x_n = \frac{4 x_{n-1} - x_{n-2} + 2 \Delta t\, f(t_n,x_n)}{3}\, . $$ Note that the equation for $x_n$ is implicit. BDFs are not designed to approximate derivatives, but to provide implicit schemes for ordinary differential equations. A first-order backward finite difference to approximate the second derivative $$ d_{tt}x = \frac{x_n - 2 x_{n-1} + x_{n-2}}{{\Delta t}^2} $$ may be more relevant in the present case.


To verify if the formula in the OP is consistent with $x''(t)$, expand $x$ in Taylor series in the vicinity of $t$, evaluate $x(t+\Delta t)$, $x(t-\Delta t)$, $x(t-2\Delta t)$ and $x(t-3\Delta t)$ until a given power of $\Delta t$, and inject these expressions in the difference formula.

[1] J.C. Butcher, Numerical Methods for Ordinary Differential equations, 2nd ed. Wiley, 2008.

EditPiAf
  • 20,898
  • Thanks! But I think the correct second-order backward finite difference is $d_{tt}{x_n}= \frac{1}{h^2}(2x_n-5x_{n-1}+4x_{n-2}-x_{n-3}) + O(h^2)$. What you have up there is a first order backward difference formula using 3 points. – Cogicero Sep 25 '17 at 19:50
  • @Cogicero Increasing the number of points of a (backward) finite difference increases its order of accuracy. The formula proposed in the comment looks fine. – EditPiAf Sep 25 '17 at 20:12