|   | 1 |  initial version  | 
For a numerical approximation, use numerical_integral.
It also gives an estimate for the error.
You can extract the value and discard the estimate.
sage: f = lambda x: RealDistribution('uniform', [0, 2]).distribution_function(x)
sage: numerical_integral(f, 0, 1)
(0.5, 5.551115123125783e-15)
sage: numerical_integral(f, 0, 1)[0]
0.5
 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.
 
                
                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.