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?


(According to @AlexTrounev 's answer)

Conclusion: The answer is yes.

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

  • $\begingroup$ 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. $\endgroup$ Nov 7, 2020 at 15:52
  • 1
    $\begingroup$ @AlexTrounev Thx for the observation that I did not notice before. $\endgroup$ Nov 7, 2020 at 17:57
  • $\begingroup$ 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 $\endgroup$ Nov 12, 2020 at 18:36

1 Answer 1


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

pWe = RandomFunction[WienerProcess[.3, .5], {0., 5., 0.01}][[2, 1, 
  1]]; pp = 
  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}] 


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

Figure 1

  • $\begingroup$ Nice answer! Thx! $\endgroup$ Nov 12, 2020 at 14:02
  • $\begingroup$ BTW, the result of RandomFunction has a property "PathFunction", which can be used to extract the interpolation function. $\endgroup$ Nov 12, 2020 at 14:24
  • $\begingroup$ Yes, we can also use "PathFunction" but it is not the same as pp. $\endgroup$ Nov 12, 2020 at 17:03
  • $\begingroup$ 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. $\endgroup$ Nov 12, 2020 at 18:22
  • $\begingroup$ @SteffenJaeschke Why not just to post your answer? $\endgroup$ Nov 12, 2020 at 21:15

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.