Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6358

Questions about stochastic calculus in Mathematica, for example how to use ItoProcess and RandomFunction.

4 votes
Accepted

Defining stochastic differential equations and simulating a system of three SDEs

Two things: 1) You can't use {} to group terms as in your z equation. See, for example, here for more info. 2) You need to define each noise term separately. {w1, w2, w3} is a list of length three …
Chris K's user avatar
  • 20.4k
1 vote

Driving a stochastic spiral by a velocity Brownian motion

There should be some way to do this with TransformedProcess (see here) but I couldn't get it to work with your bivariate process. Instead, maybe you could solve for 30 replicates of x[t], then transf …
Chris K's user avatar
  • 20.4k
2 votes

Stability of the numerical methods for SDE

The strength of noise σ = 20 seems large so that it can overwhelm the mean trend. Luckily Mathematica can give some analytical insights into this stochastic process. Clear[σ] proc = StratonovichProc …
Chris K's user avatar
  • 20.4k
2 votes

Stochastic Lotka-Volterra Predator-Prey Model

There are a few questions wrapped up here. Let me try to take them one-by-one. only one variable depends on the stochastic noise and it does not bear influence on the other part of the equation …
Chris K's user avatar
  • 20.4k
1 vote
Accepted

Simulation of the stochastic system

First, I changed K to k, since K is a built-in symbol. Then I ran the process for a shorter time and found that V[t] got huge: solproc = RandomFunction[proc, {0., 1.2, 0.1}, Method -> "EulerMaruyama …
Chris K's user avatar
  • 20.4k
5 votes
Accepted

Solving a stochastic dynamical system

A few things: 1) The second equation doesn't match the ODEs as noted by @b.gatessucks. 2) You need to use \[DifferentialD]t on the right hand sides. 3) x[t] approaches zero very quickly in the solu …
Chris K's user avatar
  • 20.4k
3 votes

Stochastic ODE Integration problems using RandomFunction

Here's a crazy idea: maybe it's easier to add noise to NDSolve's adaptive step size algorithms than to deal with RandomFunction[ItoProcess[]] 's fixed step size. You could use WhenEvent to perturb t …
Chris K's user avatar
  • 20.4k
3 votes
Accepted

Adding conditions to stochastic differential equations

You could use the same trick I used here -- manually adding the noise to NDSolve instead of using RandomFunction[ItoProcess]. σx = 0.1; sol = NDSolve[{x'[t] == f[x[t], y[t]], y'[t] == g[x[t], y[t]], …
Chris K's user avatar
  • 20.4k
7 votes
Accepted

ItoProcess for stochastic reaction-diffusion equation

Here's a solution following @acl's suggestion of discretizing in space. I added a diffusion coefficient d and used reflecting boundary conditions. l = 1.0; (* length of domain *) nx = 101; (* number …
Chris K's user avatar
  • 20.4k
3 votes
Accepted

Cannot solve coupled stochastic differential equations and how to find correlation of soluti...

As @MichaelE2 alluded to in his comment, DSolve isn't the best approach since you've got that noise term. Instead, take at Mathematica's stochastic differential equation functionality. In particular …
Chris K's user avatar
  • 20.4k
2 votes
Accepted

Solve a System of mixed SDE and ODE

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[ …
Chris K's user avatar
  • 20.4k
1 vote

Stochastic Mathieu equation: Is this a numerical instability?

I think your dt=1 solution is the wrong one. The Cos[ν t] term is very rapidly varying with your parameter value of ν=105.: Plot[Cos[ν t], {t, 0, tmax}, PlotPoints -> 200] The apparent periodic- …
Chris K's user avatar
  • 20.4k
2 votes
Accepted

ItoProcess and/or RandomFunction numerical failure for coupled SDEs

From your ODE solution, it looks like there are brief bursts when x changes rapidly. This suggests a simple solution: make your step size much smaller. s = ItoProcess[{ \[DifferentialD]x[t] == \[D …
Chris K's user avatar
  • 20.4k