Exploring the Limits of Stability for Runge-Kutta Numerical Methods

In summary, the conversation discusses the stability of the Runge-Kutta method when solving a given differential equation with different values for lambda and delta t. It is determined that the stability is not dependent on the time domain, but rather on the physical model being stable or unstable. It is also mentioned that using an unstable numerical method can lead to noisy and inaccurate results. The importance of using a stable method and considering alternative methods is emphasized.
  • #1
TheCanadian
367
13
Based on this link, in particular Figure 1, what is the exact meaning of the plot?

To my understanding, it implies that for a given differential equation:

$$ \frac {dy}{dt} = \lambda y $$

that the value ##\lambda \Delta t## has to be within the complex region shown in Figure 1 corresponding to which order of Runge-Kutta you used. To ensure I am understanding this plot correctly, must ##\lambda \Delta t < 0## if both ##\lambda## and ##\Delta t## are purely real? If ##\Delta t## is purely positive and real, wouldn't this restrict you to only considering equations where ##\lambda < 0##?

If we now consider a case where ##\lambda## is complex-valued and ##\Delta t## purely positive and real, what exactly is the intuition behind the value ##\lambda \Delta t = 0.01 + 2i## being stable yet ##\lambda \Delta t = 0.01## not being stable?
 
Physics news on Phys.org
  • #2
TheCanadian said:
To ensure I am understanding this plot correctly, must ##\lambda \Delta t < 0## if both ##\lambda## and ##\Delta t## are purely real? If ##\Delta t## is purely positive and real, wouldn't this restrict you to only considering equations where ##\lambda < 0##?
Yes, because for ##\lambda > 0##, the actual solution goes to infinity. Have a look at https://en.wikipedia.org/wiki/Stiff_equation#A-stability

TheCanadian said:
If we now consider a case where ##\lambda## is complex-valued and ##\Delta t## purely positive and real, what exactly is the intuition behind the value ##\lambda \Delta t = 0.01 + 2i## being stable yet ##\lambda \Delta t = 0.01## not being stable?
Good question.
 
  • #3
DrClaude said:
Yes, because for ##\lambda > 0##, the actual solution goes to infinity. Have a look at https://en.wikipedia.org/wiki/Stiff_equation#A-stabilityGood question.

So stability is dependent on the domain considered, correct? Since the solution would certainly go to infinity for ##\lambda > 0##. But if considering a small time domain (e.g. ##0 \leq t \leq 1##) where the solution, ##y##, is well-defined, do we still describe the Runge-Kutta method applied to this equation as unstable on this smaller domain?
 
  • #4
TheCanadian said:
So stability is dependent on the domain considered, correct? Since the solution would certainly go to infinity for ##\lambda > 0##. But if considering a small time domain (e.g. ##0 \leq t \leq 1##) where the solution, ##y##, is well-defined, do we still describe the Runge-Kutta method applied to this equation as unstable on this smaller domain?

No the stability is not dependent on the time domain. However, we need to distinguish between two situations. The first situation is where the physical model is unstable. In this case the analysis of the numerical method is much more subtle. Ideally we want to choose a numerical method that most accurately reproduces the unstable growth rate. But often there are many unstable modes and we can't accurately reproduce the growth rate of all the modes. In the second situation the physical model is stable. In this case we need to verify that the numerical method is stable. Here if the numerical model is unstable, then the unstable numerical modes will quickly grow up out of the noise and dominate the simulation. Beyond this point your results are going to be noisy garbage.
 
  • #5
the_wolfman said:
No the stability is not dependent on the time domain. However, we need to distinguish between two situations. The first situation is where the physical model is unstable. In this case the analysis of the numerical method is much more subtle. Ideally we want to choose a numerical method that most accurately reproduces the unstable growth rate. But often there are many unstable modes and we can't accurately reproduce the growth rate of all the modes. In the second situation the physical model is stable. In this case we need to verify that the numerical method is stable. Here if the numerical model is unstable, then the unstable numerical modes will quickly grow up out of the noise and dominate the simulation. Beyond this point your results are going to be noisy garbage.

So to clarify, is RK4 numerically unstable when solving the above test case for ##\lambda > 1## on any time domain, even if the solution does not go to infinity? When you say "unstable numerical modes will quickly grow up out of the noise and dominate the simulation," how exactly can the growth rate of these errors be quantified? Since I would assume if ##\lambda = 1.000001## then the numerical errors will not be so significant on a time domain of ## 0 \leq t \leq 0.000000001##. Also, if you have any ideas on the last question I stated in the above post, that would be greatly appreciated.
 
  • #6
The stability of a numerical method does not depend on the time domain.

In my opinion, the question "when can I get away with using a unstable numerical method" is the wrong question and is a bad computation practice that you want to avoid. You can quantify a unstable method by the growth rate of the most unstable mode, and this will give you an estimate as to how long it will take for this mode to grow up out of the noise. And in some cases if you're barely unstable and you run the simulation for a short time, then yes you can get away with using a bad numerical method. But be warned you're playing with fire, and this is a bad practice.

It's much better to ask the question how can I stabilize the method or is there an alternative stable method that I can use. For instance if you only need to run for a short time and your using RK4 then why not reduce the time step a little. The computational savings you gain by using a slightly larger time isn't worth the loss of confidence it if the method is not unstable.
 
  • #7
the_wolfman said:
The stability of a numerical method does not depend on the time domain.

In my opinion, the question "when can I get away with using a unstable numerical method" is the wrong question and is a bad computation practice that you want to avoid. You can quantify a unstable method by the growth rate of the most unstable mode, and this will give you an estimate as to how long it will take for this mode to grow up out of the noise. And in some cases if you're barely unstable and you run the simulation for a short time, then yes you can get away with using a bad numerical method. But be warned you're playing with fire, and this is a bad practice.

It's much better to ask the question how can I stabilize the method or is there an alternative stable method that I can use. For instance if you only need to run for a short time and your using RK4 then why not reduce the time step a little. The computational savings you gain by using a slightly larger time isn't worth the loss of confidence it if the method is not unstable.

That's understandable and I agree. But I am nonetheless curious to understand how instability in a numerical method propagates errors. It appears the eigenvalue's magnitude is important along with the time-step taken, and the rate at which this instability grows was my main motivation for asking this question.
 
  • #8
the_wolfman said:
The stability of a numerical method does not depend on the time domain.

In my opinion, the question "when can I get away with using a unstable numerical method" is the wrong question and is a bad computation practice that you want to avoid. You can quantify a unstable method by the growth rate of the most unstable mode, and this will give you an estimate as to how long it will take for this mode to grow up out of the noise. And in some cases if you're barely unstable and you run the simulation for a short time, then yes you can get away with using a bad numerical method. But be warned you're playing with fire, and this is a bad practice.

It's much better to ask the question how can I stabilize the method or is there an alternative stable method that I can use. For instance if you only need to run for a short time and your using RK4 then why not reduce the time step a little. The computational savings you gain by using a slightly larger time isn't worth the loss of confidence it if the method is not unstable.

Just re-read the answer and well the question is largely focused on those domains where simply decreasing the time step will not bring ##\lambda \Delta t## within the region of stability (e.g ##\lambda > 0## and real). I agree there are stable methods as alternatives available, but interested in understanding the behaviour of this unstable method in the limit where ##\lambda \Delta t## is nearly in the region of stability.
 

Related to Exploring the Limits of Stability for Runge-Kutta Numerical Methods

What is a Runge-Kutta Stability Region?

A Runge-Kutta Stability Region is a graphical representation of the stability of a numerical integration method, specifically the Runge-Kutta method, for solving differential equations. It shows the range of values for which the method will produce accurate results without diverging.

Why is Runge-Kutta Stability Region important in scientific research?

The stability region is important because it determines the range of step sizes that can be used for numerical integration, which in turn affects the accuracy and efficiency of the solution. Researchers need to carefully select the appropriate step size to ensure accurate results and avoid computational errors.

How is the Runge-Kutta Stability Region calculated?

The Runge-Kutta Stability Region is calculated by analyzing the roots of the characteristic polynomial of the numerical method. This polynomial is derived from the numerical method's equations and determines the stability region's shape and size.

What factors can affect the size and shape of the Runge-Kutta Stability Region?

The size and shape of the stability region can be affected by the order of the Runge-Kutta method, the choice of coefficients, and the type of differential equation being solved. In general, higher-order methods and carefully chosen coefficients will result in larger and more desirable stability regions.

How can the Runge-Kutta Stability Region be used in practice?

The stability region can be used as a guide for selecting appropriate step sizes for numerical integration. Researchers can plot the stability region and compare it to the region of interest for their specific problem to determine the appropriate step size. It can also be used to compare the stability of different numerical methods and assist in the selection of the most suitable method for a particular problem.

Similar threads

Replies
63
Views
1K
  • Differential Equations
Replies
1
Views
880
  • Differential Equations
Replies
31
Views
6K
  • Calculus and Beyond Homework Help
Replies
1
Views
409
Replies
5
Views
1K
  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
Replies
8
Views
2K
Replies
14
Views
4K
  • Differential Equations
Replies
15
Views
2K
  • Differential Equations
Replies
1
Views
2K
Back
Top