Finite difference scheme for y'(t)=a*y(t)

Click For Summary

Discussion Overview

The discussion revolves around the stability and accuracy of finite difference schemes applied to the differential equation y'(t) = a*y(t), particularly for cases where a > 0 and dt > 0. Participants explore various discretization methods, their implications on the solution's behavior, and the conditions under which these methods may be considered stable or accurate.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants assert that no finite difference scheme is stable for a > 0 and dt > 0.
  • Others propose that any discretization leads to a linear recurrence relation, suggesting that the absolute error will increase without bound as n approaches infinity when a*dt > 0.
  • A participant notes that the solution grows exponentially while discretizations yield polynomial approximations, leading to a situation where the exponential growth outpaces the polynomial growth.
  • Some participants discuss the Euler method, stating it provides an analytical solution that aligns with the expected behavior as dt approaches zero, but they question whether this reflects stability or merely compatibility.
  • There is mention of the backward Euler scheme being stable even for a > 0, with a distinction made between stability and the growth of the solution itself.
  • Concerns are raised regarding the stability regime for the backward Euler method, particularly when a > 0 and dt approaches zero.
  • A later reply questions the accuracy of the backward Euler scheme under certain conditions, suggesting it may only be accurate if a*dt is much less than 1.

Areas of Agreement / Disagreement

Participants express differing views on the stability of finite difference schemes, particularly the backward Euler method. While some argue for its stability under certain conditions, others challenge this perspective, indicating that the discussion remains unresolved with multiple competing views.

Contextual Notes

Participants highlight limitations regarding the assumptions made about stability and accuracy, particularly in relation to the growth of solutions and the conditions under which various methods are applied. The discussion reflects a nuanced understanding of the mathematical properties of the finite difference schemes in question.

feynman1
Messages
435
Reaction score
29
It seems no finite difference scheme is stable for a>0, dt>0, correct?
 
Physics news on Phys.org
For any discretization I think you end up with a linear recurrence <br /> A_{n+1}y_{n+1} = A_ny_n + \dots + A_{n-k}y_{n-k} where each A_i \in \mathbb{C}[a\Delta t]. The solution is then <br /> y_n = \sum_{j=1}^{k+1} \alpha_jn^{m_j}\Lambda_j^n where the \Lambda_j are the roots of <br /> A_{n+1}\Lambda^{k+1} = A_n\Lambda^k + \dots + A_{n-k} and m_j = 0 unless there are repeated roots. The coefficients \alpha_j are determined by y_0, y_1, \dots, y_k. You can see from this that the absolute error |e^{na\Delta t} - y_n| will increase without bound as n \to \infty with a\Delta t &gt; 0.
 
  • Like
Likes   Reactions: feynman1
pasmith said:
For any discretization I think you end up with a linear recurrence <br /> A_{n+1}y_{n+1} = A_ny_n + \dots + A_{n-k}y_{n-k} where each A_i \in \mathbb{C}[a\Delta t]. The solution is then <br /> y_n = \sum_{j=1}^{k+1} \alpha_jn^{m_j}\Lambda_j^n where the \Lambda_j are the roots of <br /> A_{n+1}\Lambda^{k+1} = A_n\Lambda^k + \dots + A_{n-k} and m_j = 0 unless there are repeated roots. The coefficients \alpha_j are determined by y_0, y_1, \dots, y_k. You can see from this that the absolute error |e^{na\Delta t} - y_n| will increase without bound as n \to \infty with a\Delta t &gt; 0.
thanks a lot then what finite differences can solve this eq?
 
feynman1 said:
thanks a lot then what finite differences can solve this eq?

I think the main point here is that the solution grows exponentially, and any discretization constructs polynomial approximations. The exponential will eventually grow faster than the polynomial, and then you'll never be able to catch up.

That said, it's a bit unusual to want a finite difference method to actually compute for *all* t>0. If you only care about a fixed time range (even if it's enormous), you can get arbitrarily good approximations in that region.
 
  • Like
Likes   Reactions: feynman1
feynman1 said:
thanks a lot then what finite differences can solve this eq?

Any of them.

For example, for the Euler method we have <br /> y_{n+1} = (1 + a\Delta t)y_n with solution <br /> y_n = y_0(1 + a\Delta t)^n.If we let \Delta t \to 0 with N\Delta t = T fixed we get <br /> y(t) = \lim_{N \to \infty} y_0\left(1 + \frac{aT}{N}\right)^N = y_0e^{aT} which is the analytical solution. Thus the method works, in that you get a more accurate result by taking a smaller timestep.

It is also the case that for a &gt; 0 both e^{na\Delta t} and (1 + a\Delta t)^n exhibit the same qualitative behaviour, namely exponential increase with n. The absolute error grows because they do not increase at the same rate: The approximation can be written as e^{n\beta\Delta t} where <br /> \beta = \frac{\log(1 + a\Delta t)}{\Delta t} &lt; a and therefore increases more slowly than the analytical solution.

A tedious calculation shows that for the fourth-order Runge-Kutta method we have <br /> y_{n+1} = \left(1 + (a\Delta t) + \tfrac12(a\Delta t)^2 + \tfrac16(a\Delta t)^3 + \tfrac{1}{24}(a\Delta t)^4\right)y_n so that <br /> \beta = \frac{\log\left(1 + (a\Delta t) + \tfrac12(a\Delta t)^2 + \tfrac16(a\Delta t)^3 + \tfrac{1}{24}(a\Delta t)^4\right)}{\Delta t} which doesn't increase as fast as the analytical solution, but does increase faster than the Euler solution. And again we have \beta \to a as \Delta t \to 0.
 
Last edited:
  • Like
Likes   Reactions: feynman1
It seems to me that the backward Euler scheme is stable even if a > 0. Stability doesn't mean that the solution does not grow without bound. It means that the difference between the numerical solution and the exact solution does not grow without bound.
 
  • Like
Likes   Reactions: feynman1
Chestermiller said:
It seems to me that the backward Euler scheme is stable even if a > 0. Stability doesn't mean that the solution does not grow without bound. It means that the difference between the numerical solution and the exact solution does not grow without bound.
but the stability regime for back euler is |1-a*dt|>=1, not even stable for dt->0+ when a>0.
 
pasmith said:
Any of them.

For example, for the Euler method we have <br /> y_{n+1} = (1 + a\Delta t)y_n with solution <br /> y_n = y_0(1 + a\Delta t)^n.If we let \Delta t \to 0 with N\Delta t = T fixed we get <br /> y(t) = \lim_{N \to \infty} y_0\left(1 + \frac{aT}{N}\right)^N = y_0e^{aT} which is the analytical solution. Thus the method works, in that you get a more accurate result by taking a smaller timestep.
thanks a lot, but isn't that analysis compatibility rather than stability? doesn't work for dt that is big?
 
Office_Shredder said:
I think the main point here is that the solution grows exponentially, and any discretization constructs polynomial approximations. The exponential will eventually grow faster than the polynomial, and then you'll never be able to catch up.

That said, it's a bit unusual to want a finite difference method to actually compute for *all* t>0. If you only care about a fixed time range (even if it's enormous), you can get arbitrarily good approximations in that region.
thanks but that said, any finite difference would work and why discuss stability? stability talks about finite t as well.
 
  • #10
I think I was mistaken. For backward Euler, the difference scheme is $$y^{n+1}=\frac{y^n}{(1-a\Delta t)}$$ which is accurate only if ##a\Delta t<<1##.
 
  • #11
Chestermiller said:
I think I was mistaken. For backward Euler, the difference scheme is $$y^{n+1}=\frac{y^n}{(1-a\Delta t)}$$ which is accurate only if ##a\Delta t<<1##.
but that doesn't fall into the stable regime |1-a*dt|>=1
 
  • #12
?
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K