# 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.

382 questions
Filter by
Sorted by
Tagged with
67 views

326 views

### The Formula of Explicit Runge-Kutta Fourteen order

I need an explicit Runge-Kutta 14th order formula. If you know about some reference that discusses at least 10th order (or higher, since I'm looking for the 14th) of Runge-Kutta and there is ...
300 views

### Step-size selection for an Trapezoidal Method ODE solver (ode23t)

I was reading the documentation of the MatLab ODE solver ode23t, and I've seen that the trapezoidal rule is used. Moreover, the error is estimated by ...
750 views

### Comparing Algorithmic complexity, ODE Solvers (Big O)

I am currently using the following three methods to solve differential equations: 4th order Runge Kutta Method Euler Method Internal scipy methods: ...
4k 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. Ideally I want to do ...
473 views

### What is the state of the art in solving stiff initial value problems?

I'm looking for current references on solving stiff ODEs. Most of what I know (say, BDF methods) apparently date back to the 1980's, and I feel like a lot of progress should have been made in that ...
4k 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 ...
67 views

### ODE Event detection for calculating multiple roots of continuous sinusoidal equation

Hey everyone I have a paper that has a method for computing rise and set times of a satellite given a closed form solution. It is a complicated sinusoidal function and the paper has a method to ...
65 views

125 views

### Runge-Kutta method for an ODE with initial value which is root of denominator

I wrote a code in Fortran to solve this differential equation using RK4 method: $$\frac{dy}{dx}=A\sqrt{\frac{B}{y}+\frac{C}{y^2}}$$ $A$, $B$, and $C$ are some known constants. The problem is that ...
33 views

### MATLAB ode45 doesn't start at initial conditions

I wrote a code in MATLAB to solve a system of differential equations, but my solution doesn't seem to take into consideration the initial conditions I specified. I am not sure how to interpret this ...
129 views

### Solving a 1D diffusion equation with linear and nonlinear source terms

I would like to numerically solve the following equation: $$\frac{\partial \rho (z,t)}{\partial t} = B(N_D \rho (z,t) + \rho(z,t)^2) + D \frac{\partial^2 \rho (z,t)}{\partial z^2}$$ with the boundary ...
89 views

### How can I evaluate more accurate energy eigenvalues from Schrodinger equation using shooting method?

I am trying to use the "shooting method" for solving Schrodinger's equation for a reasonably arbitrary potential in 1D. But the eigenvalues so evaluated in the case of potentials that do not have hard ...
54 views

### solve_ivp - Overflow encountered in double_scalars

I'm modeling an electron that orbits the nucleus. Of course, charged particles radiate away there energy so it'll crash into the nucleus. My approach has been to to evaluate the coulomb force and add ...
41 views

### Solving a complex ODE with large number of variables (>1e6 variables) - best practise?

I have to solve a non-linear ODE of the shape $$\partial_zA=f(A)$$ with $f$ a non-linear function and $A$ a matrix/vector with >1e6 variables (i.e. $A$ is a matrix with >1000x1000 entries). For each ...
35 views

### Scipy.integrate.odeint is returning curves with almost the same frequency for different damping ratios, shouldn't they be different?

I am trying to solve the ODE for a harmonic oscillator using Scipy's odeint solver for different dampening factors. I'm using the following code, based off of this example: ...
28 views

I am considering the wave equation with position varying material properties $$m(x) \frac{\partial^2 u}{\partial t^2} = \frac{\partial}{\partial x}\left(k(x) \frac{\partial u}{\partial x}\right), \... 0answers 36 views ### Solving nonlinear pendulum using Runge-Kutta 4 for smaller steps I am trying to solve nonlinear pendulum using 4th order Runge-Kutta method for limits between a=0.0 to b=110 seconds and simulated the results to observe the pendulum movement. But when I increase the ... 2answers 1k views ### Solving coupled differential equations in Python, 2nd order I have a system of coupled differential equations, one of which is second-order. I am looking for a way to solve them in Python. I would be extremely grateful for any advice on how can I do that! k... 1answer 178 views ### Integrating direct dynamics form more than 1 second does not give back the correct result I am trying to simulate a robot manipulator dynamics in SciLab. Basically, I generated a step function that has constant acceleration for half of the time and then the same acceleration but negative ... 1answer 124 views ### Vectorised second order ode solving in python I am trying to write a python program that simulates the motion of a large number of particles by numerically integrating a second order ordinary differential equation. I first split the ODE into two ... 1answer 145 views ### Prescribing variables as an excitation in Runge-Kutta method I am using Runge-Kutta to solve a 3 \times 3 2nd order linear ODE$$M x'' + C x' + K x = 0and initial conditions are all zeros. Then I prescribe the 2nd variable to follow a given path. As for ... 1answer 93 views ### Numerical solution of pendulum equation Given a system of equations: \begin{align} &f''(x) = -a \cdot \sin(f(x))\\ &f(0) = b\\ &f'(0) = c \end{align} a, b, c, dt, N are arbitrary parameters. How to get a values of f(0), f(... 1answer 2k views ### 2D cross section from 3D surface I am trying to apply the "restoring force surface" method to a dynamic linear system. The idea behind this method is that, knowing acceleration, displacement, velocity and input force it is possible ... 0answers 71 views ### Numerical method for harmonic oscillator with jumping constant Let k_1 \neq k_2 be positive reals, t_0 > 0 and consider the following Cauchy problem in [0,+\infty): \begin{cases} y(t) + k(t)y''(t) = 0 \newline y(0) = 1/\sqrt{k_1} \newline y'(0) = 0, \end{... 3answers 125 views ### Coroutines for ODE solvers Are there any ODE solver packages that use coroutines and yield their results instead of functions and returning? Briefly, a subroutine in a programming language does some computations, returns a ... 1answer 57 views ### When is a dynamical system discrete vs. continuous? I have a basic question to ask: Let's say I am reading a paper which gives a good model that consists of a set of ordinary differential equations, with first and second derivatives. Continuity is a ... 1answer 140 views ### integrate.solve_ivp bugged I am trying to solve an ODE with solve_ivp, but I am getting strange errors. Documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html ... 1answer 90 views ### Solving ODEs with nonlinear constraints I'm trying to solve an ODE problem. Let's say \mathbf{x}(t) represents the position of a particle at time t, and \mathbf{u}(\mathbf{x},t) is a velocity field defined in Cartesian coordinates on ... 1answer 75 views ### Solving a large system of coupled ode. (Python) I really have a problem here. I have not found a solution yet. The system I need to solve similar to this:(Basic idea)c_1 = \dfrac{dx}{dr}+yc_2 = \dfrac{dy}{dr}+x Both $c_1/ c_2$ are ...
I have a light ray moving through space-time, i.e. a curve in $\mathbb{R}^4$, parametrized by some variable λ. The exact trajectory, i.e. the coordinate functions $x^μ(λ)$ of the curve are given by ...