# Can built-in functions deal with stochastic delay differential equations (SDDE)?

I know that functions like NDSolve can deal with delay differential equations and in the meanwhile, functions like ItoProcess and RandomFunction handle stochastic differential equations. So I wonder whether any built-in functions can handle it when the above two cases are combined together. For example, I naively tried the below codes by just slightly modifying the first example of ItoProcess (x[t] -> x[t - 1] in the square root)

proc = ItoProcess[\[DifferentialD]x[t] == -x[t] \[DifferentialD]t + Sqrt[1 + x[t - 1]^2]
\[DifferentialD]w[t], x[t], {x, 1}, t, w \[Distributed] WienerProcess[]]
RandomFunction[proc, {0., 5., 0.01}]

The first row of codes runs seemly well, but the second one just returns a RandomFunction::unsproc error, specifically RandomFunction::unsproc: The specification <Ito process> is not a random process recognized by the system..

Or do I have to implement a version myself with Euler method alike?

Update

The basic idea is to feed a random function $$w'(t)$$ to NDSolve.

• The first line also not working well since it returns undefined function ItoProcess[{{-x[t]}, {{Sqrt[1 + x[t][-1 + t]^2]}}, x[t]}, {{x}, {1}}, {t, 0}], where  x[t][-1 + t] is not defined. Nov 7, 2020 at 15:52
• @AlexTrounev Thx for the observation that I did not notice before. Nov 7, 2020 at 17:57
• ItoProcess requires a simultaneous differential equations. simflr might by simulation flailour. This is defintion step and simulation step. Simulation fails complete because the definition is erroneous. LIke the de the process is simultaneous only. Stochastic differential equation. It works long if negative times are avoided, but with messages. Look at how_to_solve_stochastic_delay_differential_equations Nov 12, 2020 at 18:36

For numerical model we can define RandomFunction[] with WienerProcess[] outside of NDSolve and then solve stochastic delay equation using standard algorithm

SeedRandom[1234];
pWe = RandomFunction[WienerProcess[.3, .5], {0., 5., 0.01}][[2, 1,
1]]; pp =
Interpolation[
Table[{5 (i - 1)/(Length[pWe] - 1), pWe[[i]]}, {i, Length[pWe]}],
InterpolationOrder -> 3];

sde = {x'[t] + x[t] - Sqrt[1 + x[t - 1]^2] pp'[t] == 0,
x[t /; t <= 0] == 0};
sol = NDSolve[sde, x, {t, 0, 5}]

Visualisation

Plot[{pp[t], x[t] /. sol}, {t, 0, 5}, FrameLabel -> {"t", ""},
Frame -> True, Axes -> False, PlotLegends -> {"pp", "x"}]

• Nice answer! Thx! Nov 12, 2020 at 14:02
• BTW, the result of RandomFunction has a property "PathFunction", which can be used to extract the interpolation function. Nov 12, 2020 at 14:24
• Yes, we can also use "PathFunction" but it is not the same as pp. Nov 12, 2020 at 17:03
• This experiments with Wiener instead of Ito with noise from a Wiener stochastic process. This solve a delayed differential equation not a differential equation with Ito stochastic methodologies. This chops off short term biases and does not really solve the question. Nov 12, 2020 at 18:22
• @SteffenJaeschke Why not just to post your answer? Nov 12, 2020 at 21:15