jeff788 wrote:
I am trying to evaluate a definite integral using SAGE and am getting
some errors.  I have evaluated the same integrals using Mathematica
without a problem.  Here is the integral in question:

integral(0.298321984000000/((13.1233333333333*X + 1)^2*
(15.7466666666667*X + 1)),(X,0.05,0.3))

I get the following error:

Inverse of zero divisor?

I then tried using the numerical_integral command:

numerical_integral(0.298321984000000/((13.1233333333333*X + 1)^2*
(15.7466666666667*X + 1)),(X,0.05,0.3))

for which I get he following error:

TypeError: unable to simplify to float approximation


The syntax for numerical_integral is different than the syntax for integral (in particular, you don't specify the variable or the range in parentheses). This works:


sage: var('X')
X
sage: numerical_integral(0.298321984000000/((13.1233333333333*X + 1)^2*(15.7466666666667*X + 1)),0.05,0.3)
(0.0033064907013495063, 3.6709421073472043e-17)

The first number is the result, the second is an error bound.

Thanks,

Jason

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

Reply via email to