91
votes
Accepted
What does "symplectic" mean in reference to numerical integrators, and does SciPy's odeint use them?
Let me start off with corrections. No, odeint doesn't have any symplectic integrators. No, symplectic integration doesn't mean conservation of energy.
What does ...
22
votes
Accepted
Why are higher-order Runge–Kutta methods not used more often?
There are thousands of papers and hundreds of codes out there using Runge-Kutta methods of fifth order or higher. Note that the most commonly used explicit integrator in MATLAB is ODE45, which ...
21
votes
Accepted
What is the state of the art in solving stiff initial value problems?
So there is a ton to say about this, and we will actually be putting a paper out that tries to summarize it a bit, but let me narrow it down to something that can be put into a quick StackOverflow ...
20
votes
What does "symplectic" mean in reference to numerical integrators, and does SciPy's odeint use them?
To complement Chris Rackauckas answer, to state some of the mathematical nonsense as well as some stuff you almost certainly know, a dynamical system is Hamiltonian if there is a description with ...
18
votes
Why are higher-order Runge–Kutta methods not used more often?
The Benchmark Setup
In the Julia software DifferentialEquations.jl we implemented plenty of higher order methods, including the Feagin methods. You can see it in our list of methods, and then there ...
18
votes
Accepted
Why is RK45 used as the "default" method for non-stiff ODEs rather than a multistep one?
First, let's establish that they are a good choice. The SciMLBenchmarks are probably the most comprehensive that there are as of right now for modern methods. This uses the vast number of methods ...
16
votes
Why does the numerical solution of an ODE move away from an unstable equilibrium?
Note that $\pi/2$ is represented in double precision format in a way that is not exactly equal to $\pi/2$. It's only accurate to about 15 digits. Thus you're starting every so slightly away from the ...
15
votes
Accepted
Why does the numerical solution of an ODE move away from an unstable equilibrium?
I think the two main points have already been made by Brian and Ertxiem: your initial value is an unstable equilibrium and the fact that your numerical computations are never really exact provides the ...
14
votes
Options for solving ODE systems on GPUs?
DifferentialEquations.jl library is a library for a high level language (Julia) which has tools for automatically transforming the ODE system to an optimized version for parallel solution on GPUs. ...
14
votes
Accepted
Are stiffness and instability equivalent?
There are non-stiff problems which are unconditionally unstable with some explicit methods, and conversely there are stiff problems which can be stable with explicit methods. Consider the oscillating ...
13
votes
Why are higher-order Runge–Kutta methods not used more often?
As long as you're using standard double precision floating point arithmetic, very high order methods aren't needed to get a solution with high accuracy in a reasonable number of steps. In practice I ...
13
votes
Accepted
Comparing Algorithmic complexity, ODE Solvers (Big O)
odeint from the SciPy library defaults to the lsoda integrator described here. However, any simple description of asymptotic ...
13
votes
Accepted
Why is the central difference method dispersing my solution?
I'll write the equation short as $$\ddot x(t)+c\dot x(t)=a(t,x(t))$$ to separate the "easy" linear parts from the non-linear and forcing terms.
On the first method
The claimed order of the ...
12
votes
What is “tolerance” in ODE45 in Matlab?
And, it is my understanding that the 4 and the 5 are for the order of the global and local error, respectively.
Your understanding is wrong.
The local error of a Runge–Kutta method of order $n$ is ...
10
votes
Do there exist low-storage Runge–Kutta methods with an order larger than four?
This area has been fairly well researched, you may check e.g. Ketcheson's review of such methods:
https://doi.org/10.1016/j.jcp.2009.11.006
which does contain some low-storage Runge-Kutta methods ...
10
votes
Accepted
Going back in time in an initial value problem
This is technically still an IVP if you do an appropriate change of variables. Given your time is between $t \in [t^*, 0]$, make a new time variable $\tau = -t$ so that $\tau \in [0, -t^*]$ and you ...
10
votes
Accepted
Time integration of first-order ODE with higher-order information
Not too surprisingly, it is referred to as a
"Taylor series method." The drawback is that, in general, it
may not be easy to compute the derivatives of $F$, particularly as you add more ...
9
votes
Accepted
4th order Runge-Kutta for $y' = y$
The answer is quite simple. You are already comparing apples and oranges in the first equation. Garbage in, garbage out.
The equation $y'=y$ if written properly is $$dy/dx=y.$$ Do you see it now? To ...
9
votes
Accepted
Is there any explicit symplectic Runge-Kutta method?
There are explicit, symplectic methods for certain types of Hamiltonian problems. For example, the symplectic Euler method
\begin{align}
p_{n+1} &= p_n - h H_q(p_{n+1}, q_n) \\
q_{n+1} &= ...
9
votes
Accepted
Special-case Runge-Kutta methods to exploit structure in linear ODE?
There are many kinds of RK methods that have extensions to exploit linearity. They all use some form of exponential or Lie Group idea (again exponential) to do so. Thus they generally do some form of ...
9
votes
Accepted
Choice between DAE or ODE formulation for chemical systems
The trade-off is generally this:
ODEs are numerically a lot of easier to solve than DAEs, in particular if the algebraic constraint is nonlinear (yours is linear). So that argues for the ODE ...
9
votes
Accepted
Why do different ODE solvers give very different solutions to this problem?
In general, if you apply two numerical methods to the same problem and get different answers, there are four possible reasons:
One or both of the implementations has a bug. This is especially likely ...
8
votes
Accepted
8
votes
Accepted
Why does LSODA fail to integrate the logistic function?
When you use $r=5$, the initial condition is
$$ x(-10) \approx e^{-50} \approx 1.9\times 10^{-22}. $$
This is much smaller than the machine epsilon, $2\times 10^{-16}$, and it is very likely that ...
8
votes
Will the numerical solving of the differential equation be wrong if I take the step too small?
Using too small of a timestep can lead to accuracy issues due to finite precision. Since you can use derivative approximations to derive time integration schemes, it is fair to look at how derivative ...
8
votes
ODE $x''(t)+\eta x'(t)+x(t)=0$ with the $\eta$ extremely small
The problem you have is what is called "stiff": it has two time scales, namely one for the oscillation (which is ${\cal O}(1)$) and one for the damping (which is ${\cal O}(\eta^{-1})$). If $\eta$ is ...
8
votes
Accepted
How well do explicit Runge-Kutta "tableau" methods compare to the state of the art ODE solvers and when do they fail?
I think the confusion here is what exactly is a "tableau method" since it's used in our docs in a very specific way. A "tableau method" in DifferentialEquations.jl parlance is a method which is ...
8
votes
Accepted
Is there a database/website with Butcher tableaus?
The three best sources of Butcher tableaus are, according to me, the reference books
Numerical Methods for Ordinary Differential Equations, 3rd ed., J.C. Butcher,
Solving Ordinary Differential ...
8
votes
Accepted
How do people know the classic Lorenz attractor is actually deterministically chaotic at infinite time?
If I am remembering correctly, periodic orbits are known to be dense and countable in the Lorenz attractor, but are also known to be unstable (The first return map has $|F'| >1$ everywhere). A ...
7
votes
ODE $x''(t)+\eta x'(t)+x(t)=0$ with the $\eta$ extremely small
Let us write the equation in state-space form
\begin{equation}
\frac{d}{dt}\begin{bmatrix}x_{1}(t)\\
x_{2}(t)
\end{bmatrix}+\begin{bmatrix}\eta/2 & -\omega\\
\omega & \eta/2
\end{bmatrix}\...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ode × 543numerics × 104
matlab × 94
python × 86
runge-kutta × 66
differential-equations × 57
scipy × 47
numerical-modelling × 38
pde × 32
time-integration × 31
stiffness × 28
computational-physics × 26
boundary-conditions × 26
nonlinear-equations × 26
finite-difference × 24
integration × 21
c++ × 16
simulation × 15
implicit-methods × 15
stability × 14
error-estimation × 13
finite-element × 12
eigenvalues × 12
algorithms × 11
fluid-dynamics × 10