# Solve a System of mixed SDE and ODE

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?

• @rhermans Yes, It is, I fixed the post. Commented May 31, 2018 at 18:41
• 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 } Commented May 31, 2018 at 18:42
• Yeah, that's my system! Commented May 31, 2018 at 18:43
• What about dB/dt i.e B'[t]? Commented May 31, 2018 at 18:43
• dB is a noise, a random noise. Commented May 31, 2018 at 18:44

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]


• @Cris K, Is there any way to take the mean curve after 100 interations of this routine? Commented Jul 18, 2018 at 4:46
• @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
– Math
Commented Jan 17, 2023 at 13:57
• @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! Commented Jan 17, 2023 at 17:47