Questions tagged [ode]

Ordinary Differential Equations (ODEs) contain functions of only one independent variable, and one or more of their derivatives with respect to that variable. This tag is intended for questions on modeling phenomena with ODEs, solving ODEs, and other related aspects.

39
votes
3answers
3k views

What's the state of the art in parallel ODE methods?

I'm currently looking into parallel methods for ODE integration. There is a lot of new and old literature out there describing a wide range of approaches, but I haven't found any recent surveys or ...
25
votes
3answers
2k views

How does one test a numerical ODE solver implementation?

I'm about to start working on a software library of numerical ODE solvers, and I'm struggling with how to formulate tests for the solver implementations. My ambition is that the library, eventually, ...
24
votes
6answers
4k views

How can the gravitational n-body problem be solved in parallel?

How can the gravitational n-body problem be solved numerically in parallel? Is precision-complexity tradeoff possible? How does precision influence the quality of the model?
23
votes
2answers
2k views

What does “symplectic” mean in reference to numerical integrators, and does SciPy's odeint use them?

In this comment I wrote: ...default SciPy integrator, which I'm assuming only uses symplectic methods. in which I am refering to SciPy's odeint, which uses ...
17
votes
4answers
6k views

Why are higher-order Runge–Kutta methods not used more often?

I was just curious as to why high-order (i.e. greater than 4) Runge–Kutta methods are almost never discussed/employed (at least to my knowledge). I understand it requires greater computational time ...
17
votes
4answers
4k views

The definition of stiff ODE system

Consider an IVP for ODE system $y'=f(x,y)$, $y(x_0)=y_0$. Most commonly this problem is considered stiff when Jacobi matrix $\frac{\partial f}{\partial y}(x_0,y_0)$ has both eigenvalues with very ...
15
votes
3answers
1k views

Numerical methods for discontinuous r.s. ODEs

what are state of art methods for numerical solution of ODEs with discontinuous right side? I'm mostly interested piecewise-smooth right side functions, e.g. sign. I'm trying to solve the equation of ...
14
votes
5answers
1k views

Why does the numerical solution of an ODE move away from an unstable equilibrium?

I wish to simulate the behaviour of a double-pendulum-like system. The system is a 2-degrees-of-freedom robot manipulator that is not actuated and will, therefore, behave mostly like a double-pendulum ...
14
votes
4answers
985 views

Optimal ODE method for fixed number of RHS evaluations

In practice, the runtime of numerically solving an IVP $$ \dot{x}(t) = f(t, x(t)) \quad \text{ for } t \in [t_0, t_1] $$ $$ x(t_0) = x_0 $$ is often dominated by the duration of evaluating the right-...
14
votes
3answers
226 views

Best practices for describing agent-based models

I work fairly heavily in mathematical biology/epidemiology, where most of the modeling/computational science work is still dominated by sets of ODEs, admittedly sometimes fairly elaborate sets of them....
12
votes
1answer
213 views

Algorithms for linear system of ODEs

I wonder: what is the best algorithm to solve \begin{equation} \frac{du}{dt} = Au \end{equation} Where $A$ is a real $n\times n$ matrix. A is not explicitly time dependent, usually sparse but not ...
12
votes
2answers
2k views

Is there an open source set of ODE solvers for C that use the native C99 complex type?

I've been using GSL as the foundation of many of my simulations, but it's a little bit overkill for my purposes and it defines its own complex type for legacy reasons. Rather than code my own Runge-...
12
votes
3answers
3k views

Choice of step size using ODEs in matlab

Hey there and thanks for giving time to look at my question. This is a updated version of my question which I posted earlier in physics.stackexchange.com I'm currently studying a 2D exciton spinor ...
11
votes
4answers
6k views

solving coupled ODEs with initial-value and final-value constraints

The essence of my question is the following: I have a system of two ODEs. One has an initial-value constraint and the other has a final-value constraint. This can be thought of as a single system with ...
11
votes
4answers
473 views

Runge-Kutta and Reusing Datapoints

I am trying to implement the fourth order Runge-Kutta method for solving a first order ODE in Python i.e. $\frac{dy}{dx} = f(x,y)$. I understand how the method works, but am trying to write an ...
11
votes
3answers
1k views

Numerically stable explicit solution of small linear system

I have an inhomogeneous linear system $$ Ax=b $$ where $A$ is a real $n\times n$ matrix with $n\leq 4$. The nullspace of $A$ is guaranteed to be of zero dimension so the equation has a unique ...
11
votes
2answers
829 views

How do you improve the accuracy of a finite difference method for finding the eigensystem of a singular linear ODE

I am attempting to solve an equation of the type: $ \left( -\tfrac{\partial^2}{\partial x^2} - f\left(x\right) \right) \psi(x) = \lambda \psi(x) $ Where $f(x)$ has a simple pole at $0$, for the ...
10
votes
3answers
834 views

Can I use an explicit time stepping scheme to determine numerically whether an ODE is stiff?

I have an ODE: $u'=-1000u+sin(t)$ $u(0)=-\frac{1}{1000001}$ I know that this particular ODE is stiff, analytically. I also know that if we use an explicit (forward) time stepping method (...
10
votes
1answer
135 views

Are there shortcuts for numerically approximating systems of ordinary differential equations when autonomous?

Existing algorithms for solving ODEs handle functions $\frac{dy}{dt} = f(y, t)$, where $y \in \mathbb R^n$. But in many physical systems, the differential equation is autonomous, so $\frac{dy}{dt} = f(...
9
votes
5answers
2k views

Symbolic solution of a system of 7 nonlinear equations

I've got a system of ordinary differential equations - 7 equations, and ~30 parameters governing their behavior as part of a mathematical model of disease transmission. I'd like to find the steady ...
9
votes
4answers
351 views

Reference request: Rigorous analysis of algorithms for PDE and ODE

I'm interested in suggestions for book references on the subject of numerical PDE and ODE, in particular, a rigorous analysis of such methods in a manner written for professional mathematicians. It ...
9
votes
2answers
948 views

Constructing explicit Runge Kutta methods of order 9 and higher

Some older books I've seen say that the minimum number of stages of an explicit Runge-Kutta method of a specified order is unknown for orders $\geq 9$. Is this still true? What libraries are there ...
9
votes
2answers
662 views

How to model a fishing rod (or a rope)?

I wish to model a fishing rod (or a rope) by joining short segments. (The segments may have equal (short) length but each segment should be assigned its own individual mass.) One segment will ...
9
votes
1answer
2k views

Options for solving ODE systems on GPUs?

I would like to farm out solving systems of ODEs onto GPUs, in a 'trivially parallelisable' setting. For example, doing a sensitivity analysis with 512 different parameter sets, or solving the (...
9
votes
3answers
149 views

Numerics: How do I renormalize the following ODE

This question is more about how to tackle a problem numerically. In a small project I wanted to simulate the coorbital motion of Janus and Epimetheus. This is basically a three body problem. I ...
9
votes
1answer
1k views

How to find Lyapunov exponent for coupled system

Answer gives a software for calculating conditional Lyapunov exponent (CLE) for coupled oscillators in chaos synchronization. However, it is hard to follow and there is no graphical output of the ...
9
votes
0answers
167 views

Inverse problem in linear ODE

I have a linear ordinary differential equation (ODE) with a system matrix with constant coefficients: $$\dot{y}(t) = \mathcal{A}\; y(t), \quad y(0) = y_0$$ with $y(t) \in \mathbb{R}^{n \times 1}$ and $...
8
votes
3answers
3k views

ODEs vs DAE vs ADE?

I am totally confused between ODEs which I am familiar with, and differential algebraic equations (DAE) and Algebraic Differential Equations (ADE). Are they the same but just different names or what ...
8
votes
2answers
2k views

Is the shooting method the only general numerical method for solving nonlinear boundary value ODEs?

During my wandering in Mathematica.se, I gradually noticed that a certain kind of differential equation solving problem is "troubling" us all the time, that is, the boundary value problem (BVP) of ...
8
votes
2answers
126 views

How can I numerically solve an ODE to $N$ provably correct digits?

Suppose we have an initial value problem of the form $$ \frac{\mathrm{d} \mathbf{x}}{\mathrm{d} t} = f(\mathbf{x}) \qquad \mathbf{x}(0) = \mathbf{x}_0 $$ where $\mathbf{x}_0 \in \mathbb{R}^n$ is known ...
8
votes
2answers
5k views

Solving non-linear singular ODE with SciPy odeint / ODEPACK

I want to solve the Lane-Emden isothermal equation [PDF, eq. 15.2.9] $$\frac{d^2 \!\psi}{d \xi^2} + \frac{2}{\xi} \frac{d \psi}{d \xi} = e^{-\psi}$$ with the initial conditions $$\psi(\xi = 0) = 0 \...
8
votes
1answer
509 views

Which numerical methods preserve time reversal symmetry?

If I have a physical system which contains a time reversal symmetry (for example a Hamiltonian $H(x,p)=p^2/2m + V(x)$ with $V(x)$ real) and I want to solve the differential equations which describe ...
8
votes
1answer
1k views

Why am I getting so much error for my Runge Kutta Fehlberg solver?

My current project is a reprogramming of a protein folding model involving the solution of thousands of ODEs in C++. I've been making some stop and start progress as I'm writing the solver to run ...
8
votes
2answers
733 views

How to solve the stiff equation in this Restricted Three Body Problem numerically?

I've come across a stiff equation in solving the Circular Restricted Three Body Problem. [An object is moving considering the effect of the gravitational forces caused by two gravitational sources ...
7
votes
2answers
3k views

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

I simply want to know whether the Dormand-Prince Numerical Method or the Cash-Karp Numerical Method is more accurate.
7
votes
2answers
617 views

How to decide stability of Runge-Kutta method for non-linear ODE?

I'm working on a parameter study of Duffing's equation $\ddot x + \delta \dot x + \alpha x + \beta x^3 = \gamma \cos{\omega t},$ where $\delta, \alpha, \beta, \gamma$ and $\omega$ are real ...
7
votes
5answers
558 views

What algorithm for solving a set of stiff ODEs would be easiest to port to high precision floating point arithmetic?

I want to solve a relatively small system of stiff ODEs (< 10 first-order equations) using high precision floating point arithmetic (using MPFR or alike). What would be the easiest algorithm to ...
7
votes
1answer
285 views

Numerically solving systems of about 100 ODEs

I am looking to solve large systems of non-linear ODEs. There appears to be a very large list of methods available varying in complexity, and I have a hard time searching through them and picking one. ...
7
votes
1answer
194 views

Forcing an ODE solver to preserve the norm

I have an ODE of the form $$ \frac{dy}{dt} = -i H y \enspace .$$ where $y$ is a complex vector and $H$ is a time dependent Hermitian matrix. The norm of the solution $y(t)$ at any point in time ...
7
votes
2answers
242 views

Initializing implicit linear multistep methods

A sixth order backward differentiation formula (BDF) need six (five plus initial value) previous solutions to get started. How I can get these previous solutions? I need a method accurate to sixth ...
7
votes
1answer
619 views

Why does LSODA fail to integrate the logistic function?

I'm comparing some of the different ODE integrators in scipy.integrate.ode on solving the logistic function: $$x(t) = \frac{1}{1+e^{-rt}}$$ $$\dot{x} = rx(1-x)$$ ...
7
votes
1answer
1k views

Numerical solution of Geodesic differential equations with Python

I have made a solver based on the SymPy.diffgeom library, where I use Scipy.Integrate to solve the following system of second order differential equations : \begin{align} u'' &+ \Gamma^0_{00}(u')...
7
votes
1answer
422 views

Why are functional representations of systems important in numerical applications?

I tried asking a similar question in SE.Physics, and I got some information regarding the abstract side of this, but I figured I should post here to get more complete information about the numerical ...
7
votes
2answers
2k views

How do I solve a boundary value ODE in MATLAB?

Specifically, ode15i. I have ode15i solving a system of 5 first order implicit odes in 5 variables with an initial condition (made consistent by decic). It's great for what I need, except I need to ...
7
votes
1answer
105 views

Is there any explicit symplectic Runge-Kutta method?

As far as I know, all the symplectic Runge-Kutta methods are implicit which need to solve non-linear equations during the calculation. Is there any explicit method? If not, why?
7
votes
1answer
131 views

Solving an ODE beyond existence. What's happening?

As an example for an ODE course I used the ODE $$ y' = \frac{y}{x} + \frac{1}{\cos(\tfrac{y}{x})} $$ to illustrate domains of existence. Standard substitution $z=y/x$ turns the equation to $$ z' = \...
7
votes
2answers
421 views

ODE: How to measure stiffness if the Jacobian has zero eigenvalues?

Say you have a system of ODE's where the Jacobian has one zero eigenvalue; what does that tell you about the stiffness of the system? This case doesn't seem to be discussed in the cases I have been ...
7
votes
2answers
325 views

Numerical investigation of stability of motion (confinement)

I am trying to find the required specifications of a RF trap, in which a proton can be confined.(trap dimensions, voltage frequency and amplitude used, etc). I have to solve the equations of motion ...
7
votes
1answer
300 views

Richardson extrapolation for strong rate of convergence of SDE

Is it possible to apply Richardson extrapolation with Euler-Maruyama scheme to improve strong rate of convergence of stochastic differential equations?
6
votes
5answers
2k views

What other method can be used to solve differential equations except ode functions in Matlab?

Recently I am taking advantage of the ode45, as well as ode23s, ode15s solvers in ...