In the dominance stochastic problems
for the density $f(x)$, we need to evaluate
$\int_{-\infty}^x f(s) ds$, $\int_{-\infty}^t\int_{-\infty}^x f(s) dsdt$, $\int_{-\infty}^u\int_{-\infty}^t\int_{-\infty}^x f(s) dsdxdu$ and so on even if, the most part of the time one stops for serious reasons. Sagemath has a powerfull set of pre programed distribution. For instance for the uniform $U[a,b]$ For instance, I can define
def uniform(x,a,b) :
T = RealDistribution('uniform', [a, b])
return T.distribution_function(x)
and ask
uniform(1,0,2)
to obtain $.5$. But if I ask
integral(uniform(x,0,2), (x, 0,1))
I will have an error of the type unable to simplify to float approximation
. After a lot of reading about this error, it seems that I should either add somewhere hold=True
or some thing else or perhaps I should define all the distribution functions from scratch ?