Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
152 views

How to use a custom OdeSolver in Scipy's solve_ivp

In Scipy's solve_ivp documentation, we see the method argument can be either a string or a user-defined ...
Axel Wang's user avatar
  • 307
3 votes
2 answers
2k views

Inaccurate results of integration using scipy solve_ivp

I am trying to use solve_ivp to solve the following 1st order ODE: $$ \frac{d \rho}{d z} = \frac{m \theta}{(1+\theta z)} \, \rho, $$ subject to $\rho(z=0)=1$, where ...
Fryderyk's user avatar
1 vote
1 answer
121 views

Numerical integrator for $a'(t)=e^{-a(t)}f(t)$

Suppose I know a function $f(t)$ and all its derivatives in $t$ in closed form. Given $a(0)$ and some $t_0>0$, I'm looking for an explicit integrator that can estimate $a(t_0)$, where $a(\cdot)$ ...
Justin Solomon's user avatar
0 votes
1 answer
114 views

calculating integral for an ODE system

I have an ODE system defining a mathematical model of a biological system, say $$ \frac{da}{dt}=f_1(a,b,\ldots,z,p)\\ \frac{db}{dt}=f_2(a,b,\ldots,z,p)\\ \cdots\\ \frac{dz}{dt}=f_n(a,b,\ldots,z,p) $$ ...
mjs's user avatar
  • 103
-1 votes
1 answer
6k 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{...
anon_particle's user avatar
13 votes
2 answers
9k views

Which Runge-Kutta method is more accurate: Dormand-Prince or Cash-Karp?

I simply want to know whether the Dormand-Prince Numerical Method or the Cash-Karp Numerical Method is more accurate.
ABBC's user avatar
  • 233