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.

534 questions
27
votes
3 answers

How does one test a numerical ODE solver implementation?

I'm about to start working on a software library of numerical ODE solvers, and I'm struggling with how to formulate tests for the solver implementations. My ambition is that the library, eventually, will include solvers for both nonstiff and stiff…
Tomas Aschan
  • 401
  • 4
  • 8
16
votes
3 answers

Numerical methods for discontinuous r.s. ODEs

what are state of art methods for numerical solution of ODEs with discontinuous right side? I'm mostly interested piecewise-smooth right side functions, e.g. sign. I'm trying to solve the equation of a following type: \begin{align*} \dot x &=…
9
votes
3 answers

Numerics: How do I renormalize the following ODE

This question is more about how to tackle a problem numerically. In a small project I wanted to simulate the coorbital motion of Janus and Epimetheus. This is basically a three body problem. I choose Saturn to be fixed at the origin, let $r_1$ and…
bios
7
votes
1 answer

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. Are any of these methods preferred for large…
RobVerheyen
  • 529
  • 1
  • 3
  • 11
7
votes
1 answer

Solving an ODE beyond existence. What's happening?

As an example for an ODE course I used the ODE $$ y' = \frac{y}{x} + \frac{1}{\cos(\tfrac{y}{x})} $$ to illustrate domains of existence. Standard substitution $z=y/x$ turns the equation to $$ z' = \frac{1}{x\cos(z)} $$ which can be solved by…
Dirk
  • 1,738
  • 10
  • 22
6
votes
2 answers

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}$ but we can use, for example, the trapezoidal method…
jokersobak
  • 281
  • 3
  • 11
5
votes
1 answer

Solving an ODE while maintaining weak positivity and weak monotonicity

I have a system of $N$ ODEs of the form, $$ M(z,F(z)) \cdot F'(z) = \Phi(z,F(z)) $$ where the mass matrix is $M(z,F): R\times R^N \to R^{N\times N}$ and $\Phi(z,F):R\times R^N \to R^N$ is (potentially) nonlinear. The initial condition is $F(0) =…
jlperla
  • 376
  • 1
  • 11
4
votes
1 answer

How can i solve these Coupled differential Equations?

I am trying to solve this with odeint module. But the first equation is function of second equation. If i ignore dw/dz in first equation and second equation is function of first one. I can solve it simply using odeint. I can solve these equation…
sajid ali
  • 43
  • 3
3
votes
1 answer

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 pipe, conduction through the pipe thickness,…
l3win
  • 205
  • 2
  • 4
3
votes
2 answers

Best form for a system of ODEs to solve with Runge_kutta

Recently when I was solving a system of ODEs using runge-Kutta method , I got much different results when I transformed the variables from spherical coordinates ($r$ and $\theta$ ) to cylindrical coordinates($\rho$ and $z$) and solved it again. (no…
Mostafa
  • 249
  • 2
  • 11
3
votes
1 answer

Preferred application for shooting method

Every now and then there are questions asked in this site related to the shooting method for boundary value problems (see 1, 2, 3). Nevertheless, in some of the cases that I have seen here, the problem is better solved turning the boundary value…
nicoguaro
  • 8,500
  • 6
  • 23
  • 49
3
votes
1 answer

Ordinary differenial equation with numerical right hand side

I'm interested in solving a differential equation in which I don't know the analytical form of the right hand side, I only know its numerical value for a finite set of values of the independent variable: $$\frac{dy}{dx}=f(x_i).$$ I haven't found a…
3
votes
0 answers

Numerically solving geodesic differential equations with a priori knowledge of the Riemann curvature tensor

The geodesic differential equations are given as \begin{align} \frac{d^2 x^j}{ds^2} + \Gamma^{\phantom{h}j}_{h\phantom{j}k}\frac{dx^h}{ds}\frac{dx^k}{ds} = 0, \end{align} where the $\Gamma^{\phantom{h}j}_{h\phantom{j}k}$ is the Christoffel symbol of…
imranal
  • 425
  • 3
  • 13
3
votes
0 answers

Solving an ODE using shooting method

I have been trying to solve the following nonlinear ordinary differential equation: $$-\Phi''-\frac{3}{r}\Phi'+\Phi-\frac{3}{2}\Phi^{2}+\frac{\alpha}{2}\Phi^{3}=0$$ with boundary conditions $$\Phi'(0)=0,\Phi(\infty)=0.$$ My solution is supposed to…
nightmarish
  • 141
  • 4
2
votes
0 answers

System of non-linear ODEs and estimating unspecified initial conditions on Maple 12

I have the following 1st order equations and need to solve them using Maple 12. There are unspecified initial conditions and can only be estimated through the Newton raphson method. My problem is how do I implement it so that the equations are…
Saronie
1
2