Local truncation error from Taylor/Variable timestep

  • Context: Graduate 
  • Thread starter Thread starter maistral
  • Start date Start date
  • Tags Tags
    Error Local
Click For Summary
SUMMARY

The discussion centers on the local truncation error (LTE) in numerical ordinary differential equation (ODE) solutions, specifically using the Adaptive BDF2 formula as outlined in the paper "Implementation of an Adaptive BDF2 Formula and Comparison with the MATLAB Ode15s" by Celaya et al. Participants express difficulty in deriving higher-order LTE terms with variable step sizes, particularly when attempting to calculate the fifth derivative for a fourth-order solution. The conversation highlights the importance of Taylor expansions in this context and raises questions about potential discrepancies in coefficients between different papers.

PREREQUISITES
  • Understanding of Taylor series expansions in calculus
  • Familiarity with numerical methods for ODEs, specifically BDF (Backward Differentiation Formula)
  • Knowledge of local truncation error concepts in numerical analysis
  • Experience with MATLAB ODE solvers, particularly Ode15s
NEXT STEPS
  • Research the derivation of local truncation error for variable step sizes in numerical ODEs
  • Study the differences between constant and variable step size methods in BDF formulations
  • Explore Lagrange polynomial interpolation techniques for deriving variable-step BDF formulations
  • Examine the paper "Automatic selection of the initial step size for an ODE solver" for insights on step size selection
USEFUL FOR

Numerical analysts, mathematicians, and software developers working with ODE solvers who seek to enhance their understanding of local truncation errors and adaptive numerical methods.

maistral
Messages
235
Reaction score
17
I am not sure where I should be posting this; I am perfectly aware this is Taylor expansion calculus, but considering the fact that I am working with numerical ODE solutions, I posted this here.

In the paper: Implementation of an Adaptive BDF2 Formula and Comparison with the MATLAB Ode15s (Celaya, et al); I have found this formula:
1625077293288.png


It's supposed to be a local truncation error formula which compares the numerical solution yn+2 to that of a Taylor expansion y(tn+2). While I can set the values of h to be equal with each other (thus retrieving the constant step version), I have no idea how to derive this term if I want to bring it to higher orders (say, I want a fourth-order solution which would den require the calculation of a fifth derivative term with variable stepsize).

TLDR: Does anyone know how this thing has been made? I have been scouring the internet for a while about this and I seem to have no information as to how this thing appeared (I mean, looking at the four papers I have now, this just magically appeared).

Thanks!
 
Physics news on Phys.org
Link to the full paper: https://www.researchgate.net/publication/275067432_Implementation_of_an_adaptive_BDF2_formula_and_comparison_with_the_MATLAB_Ode15s

I found https://student.cs.uwaterloo.ca/~cs370/notes/LTE.pdf which explain how to calculate LTEs and give the forwards Euler and Crank-Nicholson as examples.

Thus your starting point is the advancing formula (27) in which you set y_{n+1} = y(t_{n+1}), y_n = y(t_n) and f_{n+2} = y&#039;(t_{n+2}). The result you are looking for gives the error in terms of y^{(3)}(t_{n+2}), so you will then need to use these Taylor expansions: <br /> \begin{align*}<br /> y(t_{n+1}) &amp;= \sum_{k=0}^\infty \frac{(t_{n+1} - t_{n+2})^k}{k!} y^{(k)}(t_{n+2}) \\<br /> y(t_n) &amp;= \sum_{k=0}^\infty \frac{(t_{n} - t_{n+2})^k}{k!} y^{(k)}(t_{n+2})<br /> \end{align*} I will say that starting from the constant-step version (26) I obtained <br /> y_{n+2} - y(t_{n+2}) = \frac 29 h^3y^{(3)}(t_{n+2}) + O(h^4) so either I have gone astray or the paper contains an error.
 
  • Like
Likes   Reactions: hutchphd
pasmith said:
Link to the full paper: https://www.researchgate.net/publication/275067432_Implementation_of_an_adaptive_BDF2_formula_and_comparison_with_the_MATLAB_Ode15s

I found https://student.cs.uwaterloo.ca/~cs370/notes/LTE.pdf which explain how to calculate LTEs and give the forwards Euler and Crank-Nicholson as examples.

Thus your starting point is the advancing formula (27) in which you set y_{n+1} = y(t_{n+1}), y_n = y(t_n) and f_{n+2} = y&#039;(t_{n+2}). The result you are looking for gives the error in terms of y^{(3)}(t_{n+2}), so you will then need to use these Taylor expansions: <br /> \begin{align*}<br /> y(t_{n+1}) &amp;= \sum_{k=0}^\infty \frac{(t_{n+1} - t_{n+2})^k}{k!} y^{(k)}(t_{n+2}) \\<br /> y(t_n) &amp;= \sum_{k=0}^\infty \frac{(t_{n} - t_{n+2})^k}{k!} y^{(k)}(t_{n+2})<br /> \end{align*} I will say that starting from the constant-step version (26) I obtained <br /> y_{n+2} - y(t_{n+2}) = \frac 29 h^3y^{(3)}(t_{n+2}) + O(h^4) so either I have gone astray or the paper contains an error.

Thanks for replying.

Actually I also have the same result as yours. I seem to be unable to replicate the constant step case. I, however, found this paper: Automatic selection of the initial step size for an ODE solver and taking a glance at Equation (3.3);

1625144115660.png


It's weird since it actually replicates the order of the formula of the first paper if I assign the constant step case! The coefficient is not the same however, the original one would result to something like 1/3 and this one would result to 1/6. Strange. At least your attempt also ends up with the same order of h, but all these varying constants confuse me even more o:)

Anyway, I understand that the Taylor approach is quite straightforward. I am more curious however how the varying stepsize formulation is obtained. Could this be actually related to Lagrange polynomials? As far as I understand the only means for one to extract variable-step BDF formulations is via a polynomial interpolation approach.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 9 ·
Replies
9
Views
1K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
8K