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

395 questions
Filter by
Sorted by
Tagged with
45 views

### How to select initial time step in adaptive time step ODE solver (TR-BDF2)

The Problem I am currently reconstructing a TR-BDF2 scheme which contains the following two stages: \begin{align} y_{n+\gamma} & = y_n + \gamma \frac{h}{2}\left( f_n + f_{n+\gamma} \right) \...
54 views

### If I rescale the time in a differential equation, do I need to adjust the parameters?

Imagine I have a differential equation and I have some data and the model is supposed to fit the data. If I now rescale the time in the range 0 to 1, do I need to adjust the parameters of the ...
52 views

### How to derive the simplified Newton iteration in the TR-BDF2 ODE integration scheme

The Problem The TR-BDF2 explained in this paper , is quite a popular numerical scheme used to integrate $\dot{y} = f(t,y)$, consistent of the following two stages: \begin{align} y_{n+\gamma} &...
87 views

### How to set up the differential equation system to speed up computation?

I've set up a system of differential equations, obtained after discretizing pde, in the following way ...
55 views

117 views

### Why is $1/r^2$ force law giving spiral trajectory?

I have written a program to solve for Newton's 2nd Law of motion for a given force law, in 2D polar coordinates. It is known that if the force law is of the form $k/r^2$,we get conic sections as ...
85 views

### What is a dense ODE system? What is a sparse ODE system?

Can you provide a jargon-free (as much as possible) explanation of what is meant by "dense ODE systems", and "sparse ODE systems"? Some hints I have gotten from Googling: dense ...
113 views

### Calculating the Strange Attractor of the Duffing Oscillator in C++

I am simultaneously trying to learn computational physics methods, chaos, and C++. I think this is the right site for the question, and I apologise if not. I started working through Thijssen's ...
65 views

36 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 ...
128 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 ...
197 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 ...
43 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 ...
165 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 ...
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: ...
40 views

97 views

### Parareal for particle simulations

Recently I have stumbled upon this video of M. J. Gander https://www.youtube.com/watch?v=dn5vqN8ezuE and the coresponding notes that he wrote on Time Parallel Time Integration and I find it a quite ...
208 views

### Solving ODE with “Jumpy” Coefficients

I'm numerically solving a linear coupled ODE of the form $$y^{\prime}(t) = \hat{M}(t)y(t)=\left[\begin{array}{cc}0& A(t)\\ B(t)& 0\end{array}\right]y(t),$$ and the difficulty I'm running into ...
2k 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$...
191 views

### Solving coupled ODEs using Runge-Kutta method

I want to solve the following sets of $n$ coupled equations. Initial values of $x_{n}(t)$ and $p_{n}(t)$ are specified. The problem is, I have an 1D lattice where every particle is bound with ...
168 views

### How to compute numerical fluxes in the local discontinuous galerkin method for poisson equation 1D

Some days ago I began to study the local discontinuous galerkin (LDG) method, this is my first time working with a discontinuous method, so I decided to solve the poisson equation in 1D to learn the ...
481 views

### Numerical Solution to Rayleigh Plesset Equation in Python

I have been trying to numerically solve the Rayleigh-Plesset equation for a sonoluminescence bubble in Python. You can read about this phenomenon here: https://iopscience.iop.org/article/10.1088/0143-...
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 ...