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
1
vote
2answers
156 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
214 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
113 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
682 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
570 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
140 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
308 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
138 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
3k 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
864 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
2k 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
52 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
46 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
61 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
138 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
1k 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 ...
1
vote
1answer
725 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
1k 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
108 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
98 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
124 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
412 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
238 views

Trouble getting steady-state solution by solving system of nonlinear algebraic equations in MATLAB

Background I have a stiff system of 6 ODEs, represented in MATLAB as follows: ...
2
votes
1answer
110 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
197 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
106 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
362 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
102 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
130 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
303 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
94 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
5k 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
185 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
2k 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
69 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
332 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 ...
-2
votes
1answer
324 views

Comparison between CashKarp Method and Dormand Prince Method - Runge Kutta Method

Can Cash Karp Method be used for integrating a nonsmooth solution ?. Because Dormand Prince method gives an error while integrating nonsmooth solution How can nonsmooth function can be integrated? I ...
4
votes
1answer
590 views

What is the case of trade-off in different Runge Kutta methods

There are so many Runge Kutta methods, including Dormand-Prince 45 Cash-Karp 54 Fehlberge 78 Is there any comparison between them? What is each approach sacrificing? What is the general trade-off ...
0
votes
2answers
338 views

Matlab: ode45 loop

I have to solve this equation $$\ddot{x}x = -\frac{3}{2}\dot{x}^2 + \frac{\dot{x}}{h} + \sin(t)$$ where $h$ is defined by $$h = \left(\frac{\dot{x}}{h}\right)^{1/3} + \frac{\dot{x}}{h}$$ My idea ...
2
votes
0answers
540 views

Scaling step size in adaptive runge-kutta method

I'm developing my own generic Runge-Kutta solver, and I'm currently implementing the adaptive step-size routine. I say generic because I want to be able to test different RK implementations by only ...
-1
votes
1answer
356 views

Which ODE solver in Matlab allows me to advance in just one timestep only

[t,y] = odeXX(odefun,tspan,y0) I have a solver odeXX, and the tspan = [0 0.0001]. It seems that for any ode solver in MATLAB, they integrate by breaking ...
0
votes
1answer
711 views

How to properly implement Backwards Euler on a system of bodies

I have a system of two bodies, $b^i$ and $b^j$, each in position $\vec{p}^i = (x^i, y^i)$ and $\vec{p}^j = (x^j, y^j)$. The two are connected via spring and I'd like to know, given their states at ...
0
votes
1answer
490 views

Use of scipy sparse in ode solver

I am trying to solve a differential equation system $$x´=Ax\quad \text{with } x(0) = f(x)$$ in Python, where $A$ indeed is a complex sparse matrix. For now i have been solving the system using the ...
3
votes
1answer
342 views

Runge Kutta solution blows up for a first order ODE with very large coefficients

I am solving a first-order ODE: $\frac{\partial \rho }{\partial t} = -a \rho^2 + b |A(t)|^2 \rho +c|A(t)|^{2m}$ This is the evolution of the plasma density in the presence of a laser pulse (complex ...
-2
votes
2answers
121 views

Numerically solving differential equations, the domain is very long, [0, +10^6), so the calculating time is very long

Is there any method to deal with this problem? I am using Mathematica to solve the differential equations, but the calculating time is so long because of the large domain $x\in[0,10^{6})$. In fact I ...

1 2 3
4
5
8