[Scilab-users] strange result of an exponential function integeration

classic Classic list List threaded Threaded
1 message Options
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] strange result of an exponential function integeration

I'm working on a stochastic control problem.
When I calculate an integral of the exponential function, I got strange
results.
I want to integrate densDisutil of the attached file from -∞ to + ∞, but the
correct result is not obtained.
The integrand is an exponential function which exponent part is the sum of
the piecewise linear function and the exponents of the standard normal
density function.
The slope of the linear function changes piecewise for each event
(D_T>=dC),(dC>D_T) & (D_T>=0) and (=0>D_T).
Each event is represented by event_idx=1,2 and 3.
I calculated the integration for each event. This sum should match the
integral of all events(event_idx=4).
The calculation results for each event are 59.865979, 0 and 2.592D + 14
whose sum must match the result for all events.
But the result for all event is 3.112D + 14 which is not equal to the sum of
three events.
What is wrong?
I would appreciate any advice.


starangeResltsIntg.sce
<http://mailinglists.scilab.org/file/t497065/starangeResltsIntg.sce>  



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users