Hi,

On Sat, Aug 27, 2011 at 11:29 PM, Dan Aldrich <daldr...@earthlink.net> wrote:
> Can the user control either to print an approximate value or an exact value?
> I tried to print the value of an integral under a bell curve:
>
>          integrate(e^((-x^2)), x, -3, 3)

In addition to Simon's response, if you just want to perform a
numerical integral (instead of a symbolic one, from which you then try
to extract a number), you can use:

sage: numerical_integral(e^(-x^2), -3, 3)
(1.7724146965190428, 1.9677756052594506e-14)

It returns a pair of real numbers.  The first is a numerical
approximation to the value of the integral, and the second is an upper
bound on the error of this approximation.  Type

sage: numerical_integral?

to find out more about this.


Best,
Alex


--
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- http://aghitza.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to