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.

Filter by
Sorted by
Tagged with
6
votes
2answers
199 views

Why naively chopped finite difference matrix works for different ODE boundary conditions

We know finite difference method (FDM) can replace $y''(x)$ as $\frac{1}{h^2}[y(x+h)+y(x-h)-2y(x)]$ or so. One naive way to write down the matrix of the differential operator is like the following, ...
5
votes
2answers
277 views

Do there exist low-storage Runge–Kutta methods with an order larger than four?

I’m trying to find a Runge–Kutta integrator that only requires the absolute minimum of storage, i.e. it fulfills one of the following three, presumably equivalent criteria: Each evaluation of the ...
0
votes
1answer
93 views

Is the time step size of a Rosenbrock method for stiff systems iteratively calculated?

I have an ODE system of the general form y' = k(y)(x) + q(z)(x) x' = a(z)(x) + b(x)(x) where k,q,a and b are also dependent on the states x and y. The ...
3
votes
1answer
433 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: ...
9
votes
0answers
186 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 $...
5
votes
2answers
147 views

Algorithm for finding initial conditions of differential equations given trajectory

Let's say I'm given a system of three first-order differential equations in three variables, where all of the equations are known, and we additionally know the trajectory of two of the variables at a ...
1
vote
1answer
155 views

Bulirsch-Stoer algorithm to solve simple chemistry. Spanning long time intervals after stationarity

Hi all and thank you in advance. I am working on a time-dependent transport-chemistry model to study the composition of planetary atmospheres. The equations are the following $$\frac{\partial n(z,t)}...
0
votes
1answer
762 views

4th order runge-kutta and harmonic oscillator [closed]

I am trying to solve equations of motion for an harmonic oscillator using 4th order runge kutta method, but as a result I get almost constant velocity and position; I feel that the problem is that I ...
1
vote
1answer
180 views

Method to solve linear, first order ODE of generalized matrix matrix form

The equation and its meaning: Consider two sets $(A)_{l=0,...,m_a},$,$(B)_{l=0,...,m_b}$ of hermitian matrices and a set of positive semidefinite matrices $(C)_{l=0,...,m_c}$. Each matrix has the ...
1
vote
2answers
136 views

Learning differential equations: a textbook

I am a Computational Biology master's student and I would like to study differential equations (both ODEs and PDEs). I tried to have a look at the available textbooks but what I found is either too ...
3
votes
2answers
187 views

Failing integration with the radau5-implementation in DotNumerics, over a discontinuity

Summary We are trying to solve some models of emission of substances to the air. In these models, emission stops at a certain point. We are using the DotNumerics implementation of radau5 We had ...
1
vote
0answers
111 views

Stiffness emerges as number of ODEs increases

I want to solve a system of ordinary differential equations with Matlab. I need this to solve a mechanical engineering related problem. If $n$ is the number of degrees of freedom of my mechanical ...
0
votes
1answer
567 views

Speeding up ODEINT stiff example [closed]

I am trying the implement the following odeint solver example but my differential equations are different. https://github.com/headmyshoulder/odeint-v2/blob/master/examples/stiff_system.cpp The ...
2
votes
1answer
44 views

Verifying that ODE integration generates Theoretical Stationary distribution

I am trying to simulate an ODE, like $ \dot{x} = \xi(x) $ that should have a stationary distribution (a la Stat Mech). Assuming that my ODE algorithm generates time samples of my system state $ x $ ...
1
vote
0answers
440 views

One Dimensional Schrodinger's Equation solution using Numerov Method

I have been trying to solve Time Independent Schrodinger's equation in one dimension using Numerov Method as discussed in this excellent lecture notes I found on net. The Numerov method can solve an ...
0
votes
1answer
131 views

Parameter identification for first order ODE

I have two arrays $f(z)$ and $z$ both indexed by k and I want to solve $\frac{df}{dz}=\mu(1-f)$ to find $\mu(z)$ What would be the best numerical method to solve this equation?
0
votes
1answer
269 views

``scipy.odeint`` giving different answer than analytical

I was using scipy.integrate.odeint function , the ode is $$\frac{y\ dx - x\ dy}{(x+y)^2} + dy = dx$$ with solution $$y^2 - x^2 - y = c (x + y)\ .$$ Solving it ...
0
votes
2answers
127 views

implicit odes solution using fdm

I am solving a non linear second order implicit initial value problem using finite difference method, but my results do not converge. Please guide me with an example, how we can apply finite ...
4
votes
3answers
2k views

4th-order Runge-Kutta method for coupled harmonic oscillator

I’m attempting to write a C program to gather values from a coupled spring system: There is a wall, connected to a mass $m_1$ by a spring, then this mass is connected to a second mass $m_2$ by another ...
4
votes
2answers
2k views

BDF2 and TR-BDF2: what is better?

What method of numerical solving ODEs is better? BDF2 or TR-BDF2? Namely, what advantages has TR-BDF2 over BDF2? The BDF2 method requires the values of $y_{n-1}$ and $y_n$ for computing $y_{n+1}$ ...
1
vote
1answer
812 views

How can I solve coupled equations by the method of line(MOL)?

I want to solve 3 coupled PDEs equations. They depend on time, radius and length. I used the method of lines (MOL) and converted them to a system of ODEs in time. Now I want to solve them using MATLAB....
1
vote
1answer
65 views

Calculation of integration curve

Consider the unit circle $x^2 + y^2 = 1$, it also represents the solution to the ODE $$ x + y \frac{dy}{dx} = 0; y(0) = 1 $$ Suppose we don't know how to solve the above equation analytically (there ...
-1
votes
1answer
1k views

Using scipy.odeint to solve coupled equations [closed]

I have a set of three coupled autonomous equations: ${y_{1}}\prime = y_{1}(\frac{\Omega_{m}}{y_{1}^3} + \frac{y_{3}^2}{6.0} + \frac{V(y_{2})}{2.H_{0}^2})$ $y_{2}\prime = y_{3}$ $y_{3}\prime = -3\frac{...
6
votes
3answers
1k views

4th order Runge-Kutta for $y' = y$

My question is quite simple, but the more I look at it, the less content I am. My question is how to do a RK4 method for $y'=y$. At first I would assume the following: $$k_1=y_n$$ $$k_2=y_n+\frac{...
0
votes
1answer
48 views

Can RK5 be considered as part of Predictor–corrector method?

It seems that the 5th order is the corrector and the 4th order is the predictor. Can RK5 be considered as part of Predictor–corrector method?
1
vote
0answers
43 views

Solve ODE with two unknown functions

I want to solve a diffusion-convection problem numerically. I start from a PDE of the form $$\partial_t f(x,t) = \partial_x(K(x)\;f(x,t))+\partial_{xx}\;f(x,t)^{m}\;.$$ It is possible to calculate a ...
0
votes
1answer
59 views

Examples of finding eigenfunctions of coupled DEs

I am looking for examples of numerically finding eigenvalues/eigenfunctions of coupled DEs. If anyone is able to point me towards any examples, preferably with code included, it would be much ...
0
votes
1answer
121 views

ODE System doesn't work when step size (h) is bigger than 1

I am a beginner to Python. Currently I'm writing a code for developing a simple solver for non-linear ODE systems with initial value. The equations of the system are The function of myu is evaluated ...
9
votes
2answers
970 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 ...
0
votes
1answer
509 views

Set of linear ordinary differential equations with a mass matrix

What methods are known for efficiently solving a large set of linear homogeneous ordinary differential equations of the following form? \begin{equation} \mathbf{B} \frac{d\mathbf{y}}{dt} = \mathbf{A} \...
2
votes
0answers
877 views

Using RK2 Method to solve the simple harmonic oscillator of a horizontal mass on a spring (1D)

Being new to numerical analysis techniques, in particular RK2, I decided the best way to jump in is by using python to solve the well known mass-spring oscillator using RK2 techniques. My problem is ...
1
vote
1answer
92 views

Fast table interpolation on regular time data for ODE

I am using scipy.integrate.odeint to simulate the reaction of a system with known input signals via integration. The simplified code below illustrates what I'm ...
0
votes
1answer
94 views

Stability of dark solitons in a harmonic trap

This question is based upon a research article which I am trying to reproduce. One of the main result of this paper is the condition on transverse confinement of the Bose-Einstein Condensate(BEC) to ...
1
vote
1answer
117 views

VTK: Missing Streamlines due to error in Runge-Kutta method?

We are using Kitware VTK to visualize our models. When we display streamlines, it sometimes happens that a single streamline is left out. This can be especially seen when duplicating a model several ...
4
votes
0answers
331 views

Convergence rate of Picard iterations

Given a first order ODE $y'(x)=f(x,y)$ with the initial condition $y(x_0)=x_0$ such that it satisfies Picard thoerem of existence and uniquness, one can compute the solution by Picard iterations : $$ ...
1
vote
1answer
195 views
2
votes
1answer
104 views

Solving a system of DAEs versus ODEs (which is preferable)

Assume I have the following system of equations. I am trying to figure out if it's better for me to be solving this as a system of ODEs or as a system of DAEs. The real code can have up to a dozen or ...
1
vote
0answers
177 views

How to implement chaotic sender and receiver with ordinary differential equations?

I am referring this paper, and trying to implement chaotic sender and receiver, to decode message, as given in section $V^{th}$ Chaotic signal masking. The process that I want to implement is figure ...
1
vote
2answers
102 views

Trotter expansions in ode solver?

Trotter expansions say: $$ e^{A+B} = \lim_{P\to\infty} \big(e^{A/2P} e^{B/P} e^{A/2P} \big)^P. $$ With $P = 2$, it becomes (with high accuracy) $$ e^{A/4} e^{B/2} e^{A/2} e^{B/2} e^{A/4}. $$ Let's ...
6
votes
3answers
356 views

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

I want to numerically solve the damped oscillator equation $$\frac{d^2x}{dt^2}+\eta\frac{dx}{dt}+x=0 .$$ Usually it's very easy to solve this kind of ODE analytically and numerically. But now the ...
0
votes
2answers
96 views

A program to simulate cellular automaton model

I have worked on mathematical modeling based on differential equations, and now I want to simulate a cellular automaton based on a ...
2
votes
2answers
127 views

citations for numerical lookup table interpolation of P/ODE(s) RHS

I'm not sure that this *overflow is right place to ask.... Sorry if it is off topic. Does anyone know a citation (scientific article or book) for a numerical trick (method), when we tabulate a right-...
3
votes
1answer
252 views

How to reformulate a 1/x^2 singular term to 1/x so that bvp4c can solve it?

I have a ''cosmetic'' problem with a singular term in my Matlab script. I am trying to solve the following system of differential equations: $$ \begin{aligned} y_1' &= y_2,\\ y_2' &= \frac{...
1
vote
1answer
80 views

Solve ODE with initial values using Laplace transform

I am trying to solve ordinary differential equations with initial conditions using Laplace transform. A simple test setup includes an exponential discharge of RC circuit and an integrator from ...
0
votes
0answers
87 views

nonlinear boundary condition

I have a nonlinear system of algebraic equations with a nonlinear boundary condition of the form \begin{equation} f'''(x,t) - (f'(x,t))^3 - \alpha(t) f'(x,t) = 0, \end{equation} at $x =0$, where $\...
1
vote
1answer
4k views

What is “tolerance” in ODE45 in Matlab?

I have used 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. So, the global error ...
0
votes
1answer
163 views

Slight Modification to Backward Euler Stiff ODE Solver

I am trying to implement a stiff ODE solver that uses step doubling with the backward Euler method but I want to make a modification and I am unsure how to incorporate it. I am trying to solve $y'=f(...
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 ...
1
vote
0answers
68 views

Convert scipy integration with one step to matlab integration

Scipy integration allows us to do ode integration one adaptive timestep at a time and do something to it. However, matlab ode needs us to specify a timespan , and determine the adaptive timestep ...
3
votes
1answer
315 views

ODE45: doubts about the result. Correct or not?

I have to solve $$\left\{\begin{matrix} x\ddot{x}+\frac{3}{2}\dot{x}^2=\frac{1}{\rho}\left (P_v-a_1t^2-a_2t-P_0 \right )\\ x(0)=5\cdot10^{-6}\\ \dot{x}(0)=0 \end{matrix}\right.$$ I do not know if ...