Implicit iterative methods oscillating?

Click For Summary
Implicit methods for solving ordinary differential equations (ODEs) are expected to provide high stability, but they do not guarantee it in all cases. The oscillation observed in the numerical solution using the Implicit Midpoint method may stem from a large initial step size, which can lead to inaccurate approximations. It is suggested that while implicit methods enhance stability, they may not always ensure it, especially compared to methods like backward Euler. For stiff ODEs, alternative approaches such as Gauss-Legendre Runge-Kutta or BDF methods may be more effective. The oscillation between 0 and 2 indicates a poor approximation rather than instability, as true instability would result in unbounded growth.
maistral
Messages
235
Reaction score
17
I'm under the impression that any implicit method for numerically solving ODE should be providing high stability in exchange for accuracy.

I'm trying to solve the differential equation:
dy/dx = -1000y + 3000 - 2000exp(-x) with intial conditions (0,0).

I still can't understand how come the numerical solution using the Implicit Midpoint is oscillating if it is supposed to be a stable method. Judging from the values, they oscillate between ~0 and~2.
t989rt.png


Am I missing something here?
 
Physics news on Phys.org
Seems to me your initial step is relatively big: dy/dx (0) = 1000 so 0.05 makes y shoot off.
You sure there aren't any conditions at all for the stability ?

[edit] perhaps this helps -- but your midpoint is left as an exercise (nr 3 on p. 64...)
 
  • Like
Likes maistral
I see. The implicit midpoint requiring an initial evaluation at dy/dx(0) at the evaluation (y0 + y1)/2 makes it shoot off. Thanks. Is it safe for me to say that implicit methods do strengthen stability, but not guarantee stability? (unless its backward Euler.. that thing is a tank)

I guess I'm really better off with the Gauss-Legendre RK or that BDF thing. Thanks!
 
I think I can agree with your statement. I think that's exactly the subject of the link I gave you.

I don't know what line of work/study you are in, but I find it very useful to check derivative absolute values, no matter which integrator is at work in the program I'm using.
Big values means you want to try small step sizes, but once the values are comparable and relatively smaller you want bigger steps to make reasonable progress.
For your expression I would say that's a 'stiff' ODE and the Gear method comes to mind. Sometimes you have a choice and you simply try one or two.

There's a truckload of litterature on this subject to be found on the internet nowadays, so: happy hunting !
 
The solution oscillating between 0 and 2 does not mean that it is unstable. It's just not a good approximation. An unstable solution grows without bound.

Chet
 
  • Like
Likes BvU

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K