| 1 | initial version |
No need to define a symbolic variable like u in your example.
The following should be what you want.
sage: D = RealDistribution('gaussian', 1)
sage: f = D.distribution_function
sage: def prob(a, b):
....: return integral_numerical(f, (a, b))
....:
sage: prob(1.4, 1.5)
(0.013949457964912993, 1.5487009413687183e-16)
where the output is an estimation of the integral and of the error term in computing it numerically.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.