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

379 questions
Filter by
Sorted by
Tagged with
5k 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 (...
38 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 ...
1k 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 ...
102 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 ...
774 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, ...
2k 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 increasing?...
296 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 ...
155 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 ...
2k 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 ...
276 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 ...
101 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 ...
580 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 ...
257 views

693 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 ...
1k 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)  dy2/dt = g(y2, t)  The equations are such that they are "conservative", i.e. the ...
154 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 ...
4k 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 https://stackoverflow.com/questions/12926393/using-adaptive-step-sizes-with-...
41 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 ...
160 views

### Strategy for solving a non-trivial differential equation

I would like to numerically solve an equation of a type as shown below. Does anyone of you have an idea how to approach such a problem? Any links to literature or for further reading would be greatly ...
39 views

### Solving ODE boundary problem with additional conditions

I need to solve two point bondary problem for ODE. The solution of the problem itself is very easy. The real issue is that when solving arising non linear system of equations it always converges to ...
194 views

### Solving system of differential equations with interconnected boundary conditions

I am trying to solve the following system of differential equations numerically over the domain $x=0$ to $x=D$. The main difficulty is that the boundary conditions are interconnected and depend on the ...
2k views

### Python: Grid with step control ODE solver

I have a problem in physics formulated via an ODE. Now I like to solve it numerically using Pythons scipy.integrate and the therein complex_ode. I figured out how and it works but now I like to ...
2k views

### Algorithm for solving an ODE with time-dependent parameter numerically

Would anyone please explain me what is the mathematical algorithm to solve a IVP system of ODE with a time-dependent parameter. e.g. ...
3k views

244 views

930 views

### Convert an implicit ODE system to an explicit ODE set to use Runge-Kutta

For my series on mechanical systems with Lagrange, I would like to add the double pendulum and a rolling pendulum. I set up the Lagrangian $L$ and solved for the ODE of motions, and got the following: ...
303 views

### Numerically solving systems of about 100 ODEs

I am looking to solve large systems of non-linear ODEs. There appears to be a very large list of methods available varying in complexity, and I have a hard time searching through them and picking one. ...
81 views

### Stochastic Collocation for time evolving ODE

For an Stochastic Differential Equation, e.g., $$\frac{du}{dt} = \alpha*\sin(u*t)$$ where $\alpha$ is normally distributed with nonzero mean, I am trying to use a stochastic collocation approach ...
324 views

### ode45 usage in this case?

The background is that I'm solving a problem in numerical analysis and I seem to be halfway having solved the non-linear system and now getting to the part where I should apply solving differential ...
483 views

### ODE: How to measure stiffness if the Jacobian has zero eigenvalues?

Say you have a system of ODE's where the Jacobian has one zero eigenvalue; what does that tell you about the stiffness of the system? This case doesn't seem to be discussed in the cases I have been ...
57 views

### Energy anomolies in many body simulation

I am trying to simulate the gravitational interaction between many bodies. I am using a direct PP force calculation and a 4th order symplectic integrator with a variable step size. The energy of ...
2k views

### How do I solve a boundary value ODE in MATLAB?

Specifically, ode15i. I have ode15i solving a system of 5 first order implicit odes in 5 variables with an initial condition (made consistent by decic). It's great for what I need, except I need to ...
636 views

### How to decide stability of Runge-Kutta method for non-linear ODE?

I'm working on a parameter study of Duffing's equation $\ddot x + \delta \dot x + \alpha x + \beta x^3 = \gamma \cos{\omega t},$ where $\delta, \alpha, \beta, \gamma$ and $\omega$ are real ...
147 views

### Are there high order symplectic methods for $y'=f(y)$?

Are there high order energy-conserving or symplectic methods for solving $y'=f(y)$?
1k views

### Optimal ODE method for fixed number of RHS evaluations

In practice, the runtime of numerically solving an IVP $$\dot{x}(t) = f(t, x(t)) \quad \text{ for } t \in [t_0, t_1]$$ $$x(t_0) = x_0$$ is often dominated by the duration of evaluating the right-...
958 views

### Code to numerically integrate a system of first-order ODEs

I need to solve the following system of differential equations. When I have the solutions for $n_f$ and $v$, I need to find and plot $J=-e_\cdot n_{f} \cdot v$. I wrote a code in matlab with all ...
75 views

### Can you give me a detailed description of (spetral) deferred correction method?

I have just read "Accelerating the convergence of spectral deferred correction methods". The link is here: http://www.unc.edu/~junjia/papers/sdcgmres.pdf‎. But I wonder how to understand deferred ...
172 views

### Modern alternatives to DRESOL Riccati solver

I am looking for a modern version or an alternative to the DRESOL package for differential matrix Riccati equations. The main issue that the original package uses single-precision type ...
316 views

### Nanoseconds vs. picoseconds in numerical quantum problems with Matlab ODEs

Hello there and thanks for taking a look at this problem. This problem is related to my previous question and I will therefore use a similar introduction from, Choice of step size using ODEs in ...
3k views

### Choice of step size using ODEs in matlab

Hey there and thanks for giving time to look at my question. This is a updated version of my question which I posted earlier in physics.stackexchange.com I'm currently studying a 2D exciton spinor ...
232 views

### Block Backward Differentiation Formula (BBDF), on order 4 formula

I am trying to implement a program the numerical method to solve ODE called Block BDF as explained in this article: https://waset.org/journals/waset/v38/v38-49.pdf As it is variable step-size, I need ...
346 views

### Heat transfer in pipe

I have a gas (assuming air) at $T$ = 500 K that enters a cylindrical pipe. The outlet target temperature is 330 K. There will be heat transfer via: Forced convection from the gas to the inside of the ...
I am attempting to solve an equation of the type: $\left( -\tfrac{\partial^2}{\partial x^2} - f\left(x\right) \right) \psi(x) = \lambda \psi(x)$ Where $f(x)$ has a simple pole at $0$, for the ...