On 2012-06-26, Chris Kees <cek...@gmail.com> wrote: > The following bit of code correctly computes the triple integral > (64\pi/3) for the volume of an ellipse given by 4x^2 + 4y^2 + z^2=16: > > assume(0 < 16 - 4*x**2 - 4*y**2 < 16) > i1 = integral(1,0,sqrt(16 - 4*x**2 - 4*y**2)) > show(i1) > assume(0 < 4 - x**2 < 4) > i2 = integral(i1,y,0,sqrt(4 - x**2)) > show(i2) > i3 = 8*integral(i2,x,0,2,algorithm='sympy')
> RuntimeError: ECL says: Error executing code in Maxima: expt: > undefined: 0 to a negative exponent. OK, to reproduce the error looks like it's enough to say: (%i1) i2 : (x^2-4)*asin(sqrt(16-4*x^2)*sqrt(4-x^2)/(2*x^2-8)) $ (%i2) i3 : 8 * integrate (i2, x, 0, 2); expt: undefined: 0 to a negative exponent. I guess that's a bug. If the integration method fails for any reason, integrate should just return a noun expression, I think. Feel free to open a bug report (http://sourceforge.net/projects/maxima to find the bug tracker) and/or bring it up on the Maxima mailing list. I was able to get the desired result by simplifying the integrand: (%i4) radcan (i2); (%o4) -(%pi*x^2-4*%pi)/2 (%i5) i3 : 8 * integrate (%, x, 0, 2); (%o5) 64*%pi/3 although I don't think that will work in general. FTR I'm working with Maxima 5.27 + patches (from Git). HTH Robert Dodier -- 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