Matlab or Python tool for solving continuous replicator equation - python

I am trying to numerically solve a continuous replicator partial differential equation in order to model evolution in a competitive system. The equation takes the form of a second-order nonlinear integral PDE, with the specific PDE in the attached image.
Do you know of any tools in MATLAB or Python that can help in solving these forms of equations? I've looked at MATLAB's built-in solver and PDE toolbox, but neither can do second-order integral PDEs.

Related

Python modeling language for ordinary differential equations?

I am working on ordinary differential equations that I want to solve using numerical methods in Python. Some of these ODEs are chemical equations, e.g. A + B > C with stoichiometry coefficient sigma. This leads to the differential equation du/dt = sigma * a * b.
To do this, the classical method is to use e.g. a Runge-Kutta solver, such as the one in Scipy's integrate.ode.
Instead, I would like to use a modeling language similar to cvxpy is for convex optimization. This method would allow to formally define the ODE and automatically solve the equation. It would be similar, in Python, to what is done in OpenModelica.
Is there such a tool?

Pyro for differential equations

Is it possible to infer differential equation parameters using pyro? I found an example with numpyro I was wondering if this is possible with pyro as well?

Solving nonlinear stiff ODE system in python or matlab

My problem is stationary combustion equations (BVP) with temperature and concentration-dependent equations with a form similar to that:
d(Lambda(C_i, T)dT/dx)/dx-C_eff(C_i, T)*dT/dx+Q(C_i,T)=0,
d(D(C_i, T)dC_i/dx)/dx-u*dC_i/dx+G(C_i,T)=0
i=1
These equations are pretty stiff and very non-linear because the source term exponentially depends on T.
Is there a Python or MATLAB package or solver or something that could help me? Standard MATLAB solvers are not suitable for such tasks. I have not tried Python yet, but I think it should be the same.

How to numerically solve this system of arbitrary number of differential equations?

How can I solve a system of k differential equations with derivatives appearing in every equation? I am trying to use Scipy's solve_ivp.
All the equations are of the following form:
equations
How can this system of equations be numerically solved using any solver? using solve_ivp, it seems you should be able to write every equation independent of the other ones, which seems not possible in this case when we have more than 2 equations.
If you set C[i]=B[i,i] then you can transform the equations to the linear system B*z'=A. This can be solved as
zdot = numpy.linalg.solve(B,A)
so that the derivative is this constant solution of a constant linear system, and the resulting solution for z is linear, z(t)=z(0)+zdot*t.

Deterministic and stochastic part of an equation

I'm on the lookout for a numerical method that can solve both a deterministic and stochastic equation. In the deterministic case, I know that a fourth order RK method is a valuable one, very effective. Unfortunately, there has not been applied to stochastic equations successfully (at least as far as I know).
Now what I want to know is if a numerical method that can solve both equations (roughly I mean, in comparison to the analytic solutions) exists and, in that case, what would be. A stochastic equation analytically solvable would be the Black-Scholes one, for instance.
There are methods for solving these kinds of equations in DifferentialEquations.jl. Stochastic differential equations are a form of mixed deterministic and stochastic equation and solving them is shown in the SDE tutorial. Mixing discrete stochasticity with deterministic equations is shown in the jump equation tutorial. While written naively in Julia, it is accessible in Python via the package diffeqpy. Notice that this has some example stochastic differential equations in the README.

Categories

Resources