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.

learn more… | top users | synonyms

1
vote
2answers
64 views

How to solve ODEs with constraints using BVP4C?

I am using BVP4C to solve a system of ODEs which is as follows. \begin{equation} \left\{ \begin{aligned} \frac{\partial f(x,y)}{\partial x} &- ...
0
votes
0answers
21 views

Solving the Wilberforce pendulum using Runge-Kutta method [duplicate]

I'm writing a program in C++ (almost from scratch) for solving the coupled equations that rise from the Wilberforce pendulum: $m\ddot{z}+kz+\frac{1}{2}\epsilon \theta = 0$ $I\ddot{\theta}+\delta ...
0
votes
1answer
39 views

What are some tips on developing a problem-specific ODE solver?

I have a small system of stiff ODEs describing a chemical reaction. The right-hand side is quite complicated, as well as the Jacobian. This equation will be solved many times with different initial ...
1
vote
0answers
40 views

Can variational formulations be solved using series solutions?

What I specifically mean is, given some functional $F\left[\mathbf{x}\right]$ which is stationary with respect to $\dot{\mathbf{x}}=f(\mathbf{x})$ and some boundary or initial conditions, can one ...
4
votes
1answer
40 views

Quantify integration error of scipy ode / ODEPACK

I am trying to integrate a 2nd order ODE with potential several singularities using the lsoda solver wrapped in scipy.integrate.ode(). I would like to put an error bar on the solution or at least ...
1
vote
1answer
137 views

Step-wise finite element formulations: can this be done?

Given the functional: $$ F[\mathbf{x}]=\frac{1}{2}[\mathbf{x}^{\text{T}} * D(\mathbf{x})]-\frac{1}{2}[\mathbf{x}^{\text{T}} * \mathbf{Ax}]-\frac{1}{2}\mathbf{x}^{\text{T}}(0)\mathbf{x}(t) $$ Where ...
4
votes
1answer
160 views

Why are functional representations of systems important in numerical applications?

I tried asking a similar question in SE.Physics, and I got some information regarding the abstract side of this, but I figured I should post here to get more complete information about the numerical ...
0
votes
0answers
12 views

Forcing variables to take specific values in ode15s [duplicate]

I am solving a system of ODE's. Instead of using M * dC/dt = F(C,t), I would like to specify the jacobian and instead use M * dC/dt = J * C. Since the problem has Dirichlet type boundary condition, i ...
-1
votes
1answer
66 views

Dirichlet boundary condition

I am trying to solve ODEs in matlab using ode15s. Instead of specifying ODEs in the format M * dC/dt = f(C,t) where C is a function of x and t. I want ...
3
votes
0answers
43 views

Large residual when integrating 2nd order ode close to singularity with SciPy ode / ODEPACK

I am trying to integrate a 2nd order ODE with a singularity at close to the initial condition. Why do I get large residuals when I plug-in the result of my integration back into the ODE? The equation ...
0
votes
0answers
25 views

octave code 'events' ode45 error

I am running code in Octave that uses the odepkg 0.8.4. The first .m file called 'poin2.m' is used for getting a Poincare plot. The ode45 command in this file calls the 'spp.m' function. ...
5
votes
2answers
111 views

How to impose boundary conditions on eigenfunction problems?

I am trying to solve for the eigenfunctions of a (1D) differential operator using finite differences: $$A \, f(x) = \lambda f(x)$$ Here is an example in Python where $A = \partial_x^4$: ...
3
votes
1answer
161 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
61 views

methods for a peculiar BVP system

Consider the following system defined on the open interval (-1, 1): $y_1' = c y_3 \\ y_2' = c y_4 \\ y_3' = -f(y_1, y_2)y_2 \\ y_4' = f(y_1, y_2)y_1 $ given $ y_3(-1) = 0 = y_3(1) \\ ...
3
votes
2answers
146 views

Dynamically ending ODE integration in SciPy

I have a light ray moving through space-time, i.e. a curve in R⁴, parametrized by some variable λ. The exact trajectory, i.e. the coordinate functions $x^μ(λ)$ of the curve are given by some ODE ...
3
votes
0answers
49 views

Is it normal to expect the error of simulation of a damped harmonic oscillator to decrease as the damping factor decreases?

I am simulating a damped harmonic oscillator using the RK4 method of numerical integration. I am comparing the simulated results with the analytical ones (for the free evolution case) and obtaining ...
1
vote
1answer
76 views

Switch between 2 equations to be given to ODE using events

I am trying to simulate a system with bilinear stiffness described by the following equations: $25\ddot{x}+15\dot{x}+330000x = p(t)$ if $x < 0.00072$ $25\ddot{x}+15\dot{x}+930000x = p(t)$ if $x ...
1
vote
0answers
145 views

How to solve an ode with stochastic time-dependent input

I am trying to repeat an example I found in a paper. I have to solve this ODE: $25 \ddot{x} + 15 \dot{x} + 330000 x = p(t)$ where $p(t)$ is a white noise sequence band-limited into the 10-25 Hz ...
2
votes
0answers
61 views

How to tell if symplectic integrator is more suitable for my problem, and what are downsides?

This question follows another one that I have already asked. My intention was to use a classical Runge-Kutta 45 method to solve ODEs of my system. However, I have seen recommendations for using ...
1
vote
1answer
158 views

How can I call the Boost C++ odeint Runge-Kutta integrator for a system of ODEs?

I would like to use Boost C++ odeint Runge-Kutta integrator on a system that looks like this : $$\ddot x = - \frac A{||x||^3} * x $$ $ x $ is a vector in 3D space, so basicaly $ x(i, j, k) $ $ ...
1
vote
1answer
277 views

Nonlinear ODE to solve Duffing's equation

I am trying to solve the Duffing's equation in MATLAB. $ m\ddot{y}+c\dot{y}+ky+k_{3}y^{3} = f(t) $ where $ f(t) = A \sin{\omega t}$ To do that I wrote a function to be given to the ode45. ...
-2
votes
1answer
69 views

Solving electron density function for Hydrogen and drawing in 3D

I recently stumbled upon interesting site that has interactive 3D representation of radial electron distribution (atomic orbital). here is the url: ...
0
votes
1answer
243 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 ...
6
votes
2answers
129 views

How does the L-stability or A-stability of a scheme relate to its ability to preserve a quadratic invariant?

I am working with the simple example of an oscillator: $$(1) \; \; \ddot{u} + u = 0, \; \; u(0) = u_0$$ I know that Forward Euler does not preserve an invariant of the above system: $$(2) \; \; ...
2
votes
0answers
61 views

Solvers for stiff initial value ODEs with sparse Jacobian

What ODE solvers are optimized for solving stiff systems with sparse Jacobian? Such systems appear, for instance, when a parabolic PDE is discretized in space using typical finite difference or finite ...
-1
votes
1answer
52 views

Libraries with the method of lines for parabolic PDEs [closed]

Could you please advise some programs or libraries for solving parabolic PDEs (or its systems) in 1D, 2D and 3D, for example, with the method of lines? The system of parabolic PDEs can be nonlinear in ...
1
vote
1answer
104 views

Matlab equivalent of scipy's 'vode' and 'zvode' ode routines

In python I have used the ode method from scipy.integrate. There I used the vodeintegrator ...
3
votes
2answers
222 views

scipy odeint - Excess work done on this call

I'm newbie both in calculus and Python/Scipy so I apologize if this question is too dumb. I'm trying to model flow between two pressure vessels. Let's say we have two points and a link between them ...
-2
votes
1answer
650 views

Runge-Kutta 4th order for 4 coupled first order differential equation [closed]

I have to solve 4 coupled first order differential equations for $f(t)$ ,$g(t)$, $h(t)$ and $w(t)$ witch are only functions of $t$ , but for every reference link a function of 3 variables is assumed ...
2
votes
1answer
119 views

Solving large, non-linear systems of ODEs numerically: what do I need to consider in order to figure out which solver to use?

I would prefer recommendations that don't require the use of proprietary tools (such as Matlab). I know of two ODE solving options for the Python ecosystem: PyDSTool (Dopri, Radau, other Runge-Kutta ...
0
votes
1answer
29 views

Why might the time taken to compute the solution of an ODE system over some interval increase non-linearly with increasing size of interval?

Currently, my problem requires me to solve a system a large system of non-linear ODEs (up to ~5000). So far, I have been using scipy.integrate.odeint as my ...
1
vote
1answer
28 views

Possible to reduce effort needed to solve non-linear ODEs by taking some coefficients/parameters as constant over small time intervals?

So far, I have been using scipy.integrate.odeint as my "workhorse" ODE solver. My current problem requires that I solve a large system (up to ~5000) ODEs. Here's ...
2
votes
1answer
127 views

How to know whether a boundary-value ODE problem is well defined?

I am using bvp4c from Matlab to solve a boundary values ODEs problem. Given the ODEs and boundary conditions, is there any way to have more information on the solutions? How many do I expect? 0, 1, ...
0
votes
1answer
163 views

scipy.integrate.odeint: how can odeint access a parameter set that is evolving independently of it?

I might have some non-linear ODEs that are being solved by scipy.integrate.odeint. However, a parameter at each time step might have to be updated by using a non-DE ...
1
vote
1answer
78 views

How to impose an integral conservation in solving ODEs boundary value problems (BVP)?

I have a system of coupled ODEs that I want to solve. The functions are A(x), B(x), C(x). It is a boundary values problem. I am using Matlab bvp4c. So far I am not satisfied with my solutions. For ...
2
votes
2answers
239 views

Why does scipy's odeint function give a non-monotonic solution for a problem whose solution should be monotone?

The solution to the ode below looks like it is monotonically increasing: However on closer inspection we see that it is not: How can I ensure that the numerical solution is monotonically ...
6
votes
1answer
86 views

Numerical methods for boundary-value ODEs with a jump condition

I want to solve a non linear system of equations of a particular kind. I find it hard to formulate clearly so I directly give a simple example. $ f''=A(f,g)\\ g''=B(f,g) $ with the boundary ...
6
votes
2answers
673 views

Is the shooting method the only general numerical method for solving nonlinear boundary value ODEs?

During my wandering in Mathematica.se, I gradually noticed that a certain kind of differential equation solving problem is "troubling" us all the time, that is, the boundary value problem (BVP) of ...
4
votes
1answer
209 views

Non-conservative implementation implicit Euler

In Matlab R2013a I have implemented the Implicit Euler (time) integration scheme. To find the $x^{n+1}$ value I use fixed point iterations: $x^{n+1} = \Delta t f(x^{n+1}) + x^n$ To test this, I use ...
4
votes
1answer
169 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 ...
3
votes
1answer
76 views

ODE boundary value problem relaxation method reference request

This is a somewhat basic question, I guess. Take the ODE boundary value problem $$ \frac1\lambda y''-y'=0, \qquad y(0) = 0, \quad y(1) = 1, $$ with the solution $$ y(x) = ...
1
vote
1answer
149 views

Solving a system of nonlinear equations with an ODE solver is faster than with the Newton method?

This is somehow unexpected, but my recent experience with solving a system of nonlinear equations is that treating them as the right hand side of a system of ordinary equations and then evolve the ...
1
vote
1answer
67 views

Appropriate algorithm for (non-linear) ODE with integral equilibrium constraint: collocation?

I have a problem of the following structure: For some scalar $g$, functions $F(z)$ and $h(z)$ defined on $[0,\bar{z}]$ , and a non-linear operator $\phi(F,z)$ (in reality, $F$ and $h$ are vector ...
0
votes
2answers
328 views

ode45 solver MATLAB improve time

I am numerically simulating the Mathieu equation using ODE45 and I have to keep changing the parameters delta and epsilon for each simulation to get the required peiodic solution. Following is the ...
2
votes
2answers
210 views

wavelet for numerical partial differential equations

Is there a good introduction into wavelet Galerkin schemes for numerical partial (and ordinary) differential equations?
3
votes
2answers
292 views

scipy odeint: sum of conservative ode equations does not remain zero as it is being solved — is this normal?

Let us say we have the following equations: dy1/dt = f(y1, t) [1] dy2/dt = g(y2, t) [2] The equations are such that they are "conservative", i.e. the ...
1
vote
1answer
82 views

Heuristic help with preconditioning large system ODEs

I'm looking for some general insight on preconditioning. In particular, relevant references/resources/comments would be greatly appreciated. Note, I have been through some of the literature, but am ...
8
votes
2answers
287 views

How to model a fishing rod (or a rope)?

I wish to model a fishing rod (or a rope) by joining short segments. (The segments may have equal (short) length but each segment should be assigned its own individual mass.) One segment will ...
2
votes
2answers
202 views

How to get ODE solution at specified time points?

The code below basically illustrates my problem. It is a test code for a pendulum. I solve it using a method suggested on ...
1
vote
0answers
25 views

Error analysis and the Model Problem [closed]

In numerical methods for ODE's, the model problem y' = cy where c is complex is regarded as sufficient in performing error analysis for different methods in ...