1
$\begingroup$

I have the following solution of the SDE: $$U(x,t)=-6+12 * \tanh \left[x+\left(B(t)-\frac{t^{2}}{2}\right)+\int_{0}^{t} e^{s^{2}} d s\right]^{2}$$

Where $B(t)$ is white noise.

In the following code and Figure 1, the solution is drawn without noise

Plot3D[-6 + 12*Tanh[x + (0 - t^2/2) + \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(t\)]\(
\*SuperscriptBox[\(E\), 
SuperscriptBox[\(s\), \(2\)]] \[DifferentialD]s\)\)]^2, {t, 0, 
  4}, {x, -4, 4}]

With out noise

In the following code and Figure 2, the solution is drawn with noise

tmax = 10;
samplesPerSec = 10;
ω = 2;
σ = 1;
noise = Interpolation[
   Normal[RandomFunction[
      WhiteNoiseProcess[σ], {0, tmax*samplesPerSec}]][[1]]];

Plot3D[-6 + 12*Tanh[x + (noise[t*samplesPerSec] - t^2/2) + \!\(
\*SubsuperscriptBox[\(∫\), \(0\), \(t\)]\(
\*SuperscriptBox[\(E\), 
SuperscriptBox[\(s\), \(2\)]] \[DifferentialD]s\)\)]^2, {t, 0, 
  4}, {x, -4, 4}]

With Noise

The question is how can I get a figure that contains more noise as in Figure 3 Example With noise

Is there a better way to add more Noise to the solution and draw it?

$\endgroup$

1 Answer 1

0
$\begingroup$
  1. You can replace the integral in the plot with 1/2 Sqrt[\[Pi]] Erfi[t] - it will be faster and it will let you increase the sample rate.

  2. You can increase the PlotPoints to get a better plot.

  3. Correct me if I'm wrong but I don't think you don't need WhiteNoiseProcess here - you can just draw from a NormalDistribution directly.

σ = 1;
Plot3D[-6 + 12*Tanh[x + (RandomVariate[NormalDistribution[0, σ]] - t^2/2) + 1/2 Sqrt[π]Erfi[t]]^2,
  {t, 0, 4}, {x, -4, 4}, PlotPoints -> 50, PlotTheme -> "Classic"]

stochastic diff eqn solution

$\endgroup$

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.