Skip to main content
33 votes
Accepted

Turing patterns

I developed a reaction-diffusion-advection model of pattern formation in semi-arid vegetation (tiger bush) 20 years ago, which shows a type of Turing instability. Plants ($n$) consume water ($w$) and ...
Chris K's user avatar
  • 20.4k
24 votes

Simulating a partial differential equation - reaction-diffusion systems and Turing patterns

You're really close. Just a couple things: 1) your initial conditions are spatially uniform random numbers, which will prevent pattern formation, and 2) according to the linked post, the domain ...
Chris K's user avatar
  • 20.4k
22 votes

Turing patterns

I did some work with the Brusselator some time ago. This is the reaction-diffusion equations which generate Turing patterns. There are some things you need to know: (1) The non-linear PDEs have ...
Dominic's user avatar
  • 2,914
19 votes
Accepted

Nonlinear dispersal equation modeling insect aggregation

If the equation is correct, then it's probably another example that we need special treatment for the discretization of conservation law. As mentioned in the comment above, one easy-to-notice issue of ...
xzczd's user avatar
  • 68.4k
18 votes

The Lotka-Volterra predator-prey model

The dimensional phase-space plot The analysis of the predator-prey model is incomplete without the phase-space plot. So, here it is, ...
zhk's user avatar
  • 12k
15 votes
Accepted

Rosenzweig-MacArthur predator-prey model

Note In my attempt to answer the OP's question, I have presented all most all the visuals/graphs which are important for the analysis of such models. If there is something missing or physically ...
zhk's user avatar
  • 12k
13 votes

Solving the Lotka-McKendrick model with NDSolve

I'm not an expert on age-structured populations (particularly this continuous-time model) and I know better numerical methods exist, but why not just discretize in age ...
Chris K's user avatar
  • 20.4k
10 votes

Mathematica code for bifurcation diagram in 3D

Looks like a little three-species food web model -- a perfect excuse to use my new EcoEvo package. First, install the package (one-time only): ...
Chris K's user avatar
  • 20.4k
9 votes

Sensitivity analysis of parameter on eigenvalues of predator-prey model

Here's a solution using my EcoEvo package, which is designed for just this kind of problem. First, install the package (only need to do this once): ...
Chris K's user avatar
  • 20.4k
9 votes
Accepted

Steady state solution (1D) of nonlinear dispersal equation

The problem can be solved analytically. First we transform the equation a bit. Integrate the ODE once we obtain ...
xzczd's user avatar
  • 68.4k
7 votes

System of nonlinear PDE 2D (Reaction-Diffusion type) with periodic boundary condition

As @xzczd alluded to, your code is almost correct. The message NDSolve::mxsst is more of a note than an error or even a warning. Here's a working version because ...
Chris K's user avatar
  • 20.4k
7 votes

Solving the Lotka-McKendrick model with NDSolve

There is no unique solution for data provided by @Pillsy, since boundary and initial conditions are inconsistent. To show it we just use exact solution in a form: ...
Alex Trounev's user avatar
  • 48.8k
7 votes

How can I speed up NDSolve

There are no gradients in x and y at L> 10. Nothing happens when ...
Alex Trounev's user avatar
  • 48.8k
7 votes
Accepted

How to get the steady-state analytical solution of a set of nonlinear differential equations?

A steady-state is a condition in which the concentrations do not change anymore. This means that $$\frac{\mathrm{d}[X]}{\mathrm{d}t} = 0$$ for every component $X$. Let's first change your equations to ...
Domen's user avatar
  • 33.4k
6 votes

Bifurcation diagram for ODEs

Here's an analysis using a new version of my EcoEvo package. First, install the latest version of the package (needed only once): ...
Chris K's user avatar
  • 20.4k
6 votes
Accepted

1-D prey-predator system with diffusion and time-dependent parameters in Mathematica 12

After minor corrections and typo removing's we have stable result with some options: ...
Alex Trounev's user avatar
  • 48.8k
6 votes
Accepted

4-dimensional Lotka-Volterra plot

Here's how to numerically solve the model. ...
Chris K's user avatar
  • 20.4k
6 votes

Simple Birth Death Process

I just did this in class today using @IstvánZachar's GillespieSSA function from this answer. Load that, then: ...
Chris K's user avatar
  • 20.4k
6 votes

Simple Birth Death Process

Here is improved version ...
OkkesDulgerci's user avatar
5 votes
Accepted

Simple Birth Death Process

How can I store Δt = Min[Δt1, Δt2] so that I can plot time vs population One way is ...
kglr's user avatar
  • 401k
5 votes
Accepted

Trying to recreate a plot which tracks the age of individuals inside a compartment model

The average time spent within a compartment is the reciprocal of the per capita rate an individual leaves the compartment. In this case, the average time spent in H...
Chris K's user avatar
  • 20.4k
5 votes
Accepted

Numerically solve delay ODE

I'm not sure the separate NDSolve to initialize the initial conditions is even necessary. If you just use your second NDSolve ...
Chris K's user avatar
  • 20.4k
5 votes

Nonlinear dispersal equation modeling insect aggregation

If only the steady state is desired, it can be obtained easily by sa = Values[DSolve[1 + u[x] D[u[x], x] == 0, u[x], x] /. C[1] -> c][[2, 1]] and ...
bbgodfrey's user avatar
  • 62.1k
4 votes

Solving the Lotka-McKendrick model with NDSolve

To give some convincing publication to the round of answerers and the owner of the question: Numerical methods for the Lotka–McKendrick’s equation Galena Pelovska, Mimmo Iannelli∗ Dipartimento di ...
Steffen Jaeschke's user avatar
4 votes

How to get the steady-state analytical solution of a set of nonlinear differential equations?

The steady state solution is a solution, where all functions become constant. That is, all y' are to be set to zero While the standard routines like Solve, Reduce, Eliminate are going to run endlessly,...
Roland F's user avatar
  • 4,628
3 votes

How solve a PDE system with Specific Initial Condition?

I don't have time right now to fully solve the problem, but there is an issue with the way you are describing the conditionals. You need to flip some signs and use some ...
Marchi's user avatar
  • 1,858
3 votes

How to perform integration processes NDSOlve and show list of random variables used in this process?

Your attempt in (i) fails because you forgot to initialize ics for every round of repeation. Generating the list of ξ[j, k] ...
xzczd's user avatar
  • 68.4k
3 votes

How to solve an ODE system that periodically increases in size

This looks like a Lotka-Volterra competition model with weak, symmetric interspecific competition. If I understand correctly, you want to build up a community by introducing new species every ...
Chris K's user avatar
  • 20.4k
3 votes

Harvested prey–predator model incorporating a prey refuge

Some modifications for the code in Vitaliy Kaurov's answer: <<MaTeX` << c:\CurvesGraphics6\CurvesGraphics6.m Initial condition outside the limit cycle: ...
E. Chan-López's user avatar
3 votes
Accepted

Poincaré section for non-autonomous logistic equation with periodic harvesting

Question 1: Read the manual about "Reap". Here is the working code: ...
Daniel Huber's user avatar
  • 56.4k

Only top scored, non community-wiki answers of a minimum length are eligible