[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
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
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
What is wrong?
I would appreciate any advice.