Questions tagged [ode]

An ODE (ordinary differential equation, in contrast to partial differential equation) is a differential equation containing a function or functions of exactly one independent variable.

An ODE (ordinary differential equation, in contrast to partial differential equation) is a differential equation containing a function or functions of exactly one independent variable. Equations of this type can be solved numerically or analytically.

1902 questions
5
votes
2 answers

Is it possible to improve speed in ODE solvers from matlab? (ode45 ode15s etc)

I wrote a code to solve a system using ode45 and ode15s in matlab. I am wondering if I can improve the speed of the code using multiple core (or parallel code) in my script. Anyone have tried this ?? Thanks
Nikko
  • 517
  • 3
  • 7
  • 19
5
votes
3 answers

Is it possible to use an anonymous function as an event-function when solving an ODE in Matlab

Is it possible to use an anonymous function as an event function in Matlab. What I want to do is basically opt = odeset('Events', @(t,y) (deal(y(end)-t^2,1,0))); [T,Y] = ode45(@odefun,[tstart tend],y0,opt); However, this returns an error…
5
votes
1 answer

ODEs with infinite initlal condition in python

I have a second order differential equation that I want to solve it in python. The problem is that for one of the variables I don't have the initial condition in 0 but only the value at infinity. Can one tell me what parameters I should provide for…
rowman
  • 1,516
  • 1
  • 16
  • 26
5
votes
1 answer

Can I run ode45 backwards in time?

I use ode45 to solve differential equations but the tspan always has to be such that the system runs forward in time. Can I make ode45 run the system backwards to negative t? The specific problem I have uses a rising exponential function i.e…
user1936752
  • 756
  • 1
  • 9
  • 25
4
votes
1 answer

event location questions in MATLAB

Suppose in matlab the following: [t, x, te, xe, ie] = ode15s(@myfunc, [tStart tFinal], x0, odeset('Events', @events)); Question 1 1a) The function events is called only after a successful step of the solver. Is this true? 1b) Just after the solver…
niels
  • 760
  • 8
  • 25
4
votes
1 answer

Any possible way to stop ODE solver (with DifferentialEquations.jl)?

I'm trying to solve an ODE problem (with Julia), that can stop early when a specific condition is satisfied. Let's say I have a Lorenz system as below using DifferentialEquations function lorenz!(du,u) du[1] = 10.0*(u[2]-u[1]); du[2] =…
c0000000kie
  • 119
  • 3
4
votes
1 answer

Different output for equivalent code between Matlab and Julia

I have a working Matlab algorithm for the evolution of a pulse via solving the 1D wave equation. I know the code works and I can see the pulse traveling to the sides and bouncing off the walls, when plotting; but when I translate the corresponding…
Alej
  • 51
  • 2
4
votes
1 answer

Phase portrait of Verhulst equation

I was trying to an example of the book -"Dynamical Systems with Applications using Python" and I was asked to plot the phase portrait of Verhulst equation, then I came across this post: How to plot a phase portrait of Verhulst equation with SciPy…
RFeynman
  • 161
  • 4
4
votes
0 answers

Julia: apply rotation to ODE solution

I am playing around with the Julia ODE module. I solve a simple Newtonian mechanics equation, involving an inclined plane. For convenience (because I did so when I solved it analytically) I rotate my axes so that ex follows the plane, and ey is…
Aubergine
  • 368
  • 3
  • 12
4
votes
1 answer

Is this correct for modeling gravity as a second order ODE?

This is my first question on here, so apologies if the formatting is off. I want to model Newton's Universal Law of Gravitation as a second-order differential equation in Python, but the resulting graph doesn’t make sense. For reference, here's the…
baddieb
  • 41
  • 2
4
votes
1 answer

Problems with the example of solve_ivp [scipy.integrate]

I am studying python for what concerns ode numerical integration, in particular I found the scipy.integrate function solve_ipv . I tried the example shown in the scipy.integrate.solve_ipv page but there could be a mistake in the code related to the…
Siderius
  • 174
  • 2
  • 14
4
votes
2 answers

Plotting ODEs, Isoclines using Python

I am looking for a Python package that will allow me to plot something similar to the Java applet seen below: http://math.mit.edu/mathlets/mathlets/isoclines/ Does anyone know any ODE plotting packages for this? I can code something from scratch…
BBSysDyn
  • 4,389
  • 8
  • 48
  • 63
4
votes
1 answer

2nd Order ODEs in Julia using DifferentialEquations

I'm trying to solve the harmonic oscillator using DifferentialEquations in Julia. i.e.: using DifferentialEquations using Plots m = 1.0 ω = 1.0 function mass_system!(ddu,du,u,p,t) # a(t) = (1/m)…
phpHacky
  • 75
  • 4
4
votes
1 answer

Plotting the phase portrait for a system of 3 ODE by matplotlib

I am trying to plot the time series and phase portrait for a dynamical system of 3 ODE. I first plot the time series for 4 initial condition but want the phase portrait with arrows as well. I am getting 4 3D plots which not what I want. I want…
user12858151
4
votes
0 answers

org/eclipse/swt/custom/TableTree error when using a BPEL process?

I added ODE Server in my eclipse environment and is succesfully started. Now I have a problem with the BPEL process file, after creating it in a BPEL project, whenever i try to get to the properties of an action i get the following error: An error…
energi300
  • 41
  • 1