1
$\begingroup$

I have a system of differential equation to solve, but it's a mixed system of ODE and SDE. I'm not sure whether there is any way to solve this kind of system or not. My equations are:

s'[t] == -a s[t] i[t]
di[t] == (a s[t] i[t] - µ i[t] + c (1 - s[t] -i[t]) i[t]) dt + σ dB
i[0]=.5
s[0]=.5

with the parameters a,c,σ,µ greater than 0. Is there any known way to solve this numerically?

$\endgroup$
5
  • $\begingroup$ @rhermans Yes, It is, I fixed the post. $\endgroup$ Commented May 31, 2018 at 18:41
  • 1
    $\begingroup$ Si is this your system system? { s'[t] == -a s[t] i[t], i'[t] == (a s[t] i[t] - \[Micro] i[t] + c (1 - s[t] - i[t]) i[t]) + \[Sigma] B'[t], i[0] == .5, s[0] == .5 } $\endgroup$
    – rhermans
    Commented May 31, 2018 at 18:42
  • $\begingroup$ Yeah, that's my system! $\endgroup$ Commented May 31, 2018 at 18:43
  • $\begingroup$ What about dB/dt i.e B'[t]? $\endgroup$
    – rhermans
    Commented May 31, 2018 at 18:43
  • $\begingroup$ dB is a noise, a random noise. $\endgroup$ Commented May 31, 2018 at 18:44

1 Answer 1

2
$\begingroup$

You want to use RandomFunction and ItoProcess to solve these stochastic differential equations.

a = 1;
μ = 0.1;
c = 1;
σ = 0.1;

sol = RandomFunction[ItoProcess[{
  \[DifferentialD]s[t] == -a s[t] i[t] \[DifferentialD]t,
  \[DifferentialD]i[t] == (a s[t] i[t] - μ i[t] + c (1 - s[t] - i[t]) i[t]) \[DifferentialD]t
  + σ \[DifferentialD]W[t]},
  {s[t], i[t]}, {{s, i}, {0.5, 0.5}}, t, W \[Distributed] WienerProcess[0, 1]],
  {0, 20, 0.01}];

ListLinePlot[sol, PlotRange -> All]

Mathematica graphics

$\endgroup$
3
  • $\begingroup$ @Cris K, Is there any way to take the mean curve after 100 interations of this routine? $\endgroup$ Commented Jul 18, 2018 at 4:46
  • $\begingroup$ @Chris K Could you have a look at my question: mathematica.stackexchange.com/questions/276606/…, it is similar to this with the extension of Levy noise $\endgroup$
    – Math
    Commented Jan 17, 2023 at 13:57
  • $\begingroup$ @Math I've looked at it (and upvoted, because I'm also curious about the answer), but unfortunately SDEs are outside my area of expertise. Hope someone helps! $\endgroup$
    – Chris K
    Commented Jan 17, 2023 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.