| Author |
Comment/Response |
John Barber
|
10/05/01 7:15pm
In response to Tom Zeller's Response to my previous problem concerning the Stochastic ODE:
The error message is not the only problem. If it were, I wouldn't care, I'd just ignore the error message and use the result.
But the result itself is wrong. The reason I know that is the following:
My system of ODE's contains a random component, which means that the time derivative is a random number at each instant of time. That means that the value of the time derivative will jump around discontinuously as time progresses (roughly within certain bounds). Therefore the trajectory itself in the (q,p) plane will have two properties:
(1) it will look jagged.
(2) It will be different each time I solve the ODE.
The solutions generated by Mathematica satisfy (2) but not (1). I played around and studied the solutions a little, and discovered the following oddity: Apparently,
Mathematica evaluates the quantity
Random[NormalDistribution[0,a]]
by instead evaluating the quantity
a*Random[NormalDistribution[0,1]].
This is perfectly sound and logical. This means that when it encounters the quantity
Random[NormalDistribution[0, Sqrt[1/(1 + q[t]^2)]],
it sees it as
Random[NormalDistribution[0,1]]/Sqrt[1+q[t]^2],
which is fine. The problem comes about because what it is doing is evaluating the Random[...] only ONCE, and keeping that value for the rest of it's numerics, and that is very wrong. It SHOULD be getting a new value of Random[...] at each iteration. This, in effect, changes my stochastic system of ODE's into a NON-stochastic system.
So the question remains: How can I get Mathematica to evaluate
Random[NormalDistribution[0,1]]
many, many times as it iterates through the Runge-Kutta method (or whatever it's using)?
To repeat: If the solution, as plotted in the
(q,p) plane, does not look "jagged", something is wrong. As it stands, the solutions produced are smooth.
Thanks for any further help!
John Barber
URL: , |
|