# Tag Info

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 ...
• 12.4k
Accepted

### Which Runge-Kutta method is more accurate: Dormand-Prince or Cash-Karp?

Since I just finished optimizing a lot of them in software, DifferentialEquations.jl, I decided to just lay out a comparison of the main Order 4/5 methods. The Fehlberg method was left out because it'...
• 12.4k
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 ...
• 16.7k
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 ...
• 12.4k

### 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 ...
• 2,269

### 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 ...
• 12.4k
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 ...
• 12.4k

### 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 ...
• 18.9k
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 ...
• 1,273

### 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. ...
• 12.4k
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 ...
• 2,814

### 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 ...
• 18.9k
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 ...
• 12.4k
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 ...
• 6,149

### 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 ...
• 2,127

### 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 ...
• 3,293
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 ...
• 4,308
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 ...
• 206
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} &= ...
• 1,273
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 ...
• 12.4k
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 ...
• 56.2k
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 ...
• 11.5k

### 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 ...
• 4,308
Accepted

### ODE45: doubts about the result. Correct or not?

I ran your same code in Python ...
• 8,582

### 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 ...
• 56.2k
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 ...
• 12.4k
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 ...
• 6,179
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 ...
• 2,936

### ODE $x''(t)+\eta x'(t)+x(t)=0$ with the $\eta$ extremely small

Let us write the equation in state-space form \frac{d}{dt}\begin{bmatrix}x_{1}(t)\\ x_{2}(t) \end{bmatrix}+\begin{bmatrix}\eta/2 & -\omega\\ \omega & \eta/2 \end{bmatrix}\...
• 2,495