On 3/14/19 8:54 AM, kcrisman wrote:

Following up, does this computation make any sense?  Presumably this is the core issue.

That computation makes sense, it's the second integration that breaks:

(x,y) = var('x y')
z = sqrt(1-x^2-y^2)
print(z)
assume(abs(x)<1)
assume(abs(y)<1)
zint_y = z.integrate(y)
print('Integrating in y:')
print('int(z dy) = %s' % zint_y)
print('Taylor expansions:')
print(zint_y.taylor((x,0),(y,0),5))
zp = z.taylor((x,0),(y,0),4)
zpint_y = zp.integrate(y)
print(zpint_y)

print('Integrating in x')
zint_xy = zint_y.integrate(x)
print('int(z dx dy) = %s' % zint_xy)
print('Taylor expansions:')
print(zint_xy.taylor((x,0),(y,0),6))
zpint_xy = zpint_y.integrate(x)
print(zpint_xy)

Prints:

sqrt(-x^2 - y^2 + 1)
Integrating in y:
int(z dy) = -1/2*x^2*arcsin(2*y/sqrt(-4*x^2 + 4)) + 1/2*sqrt(-x^2 - y^2 + 1)*y 
+ 1/2*arcsin(2*y/sqrt(-4*x^2 + 4))
Taylor expansions:
-1/8*x^4*y - 1/12*x^2*y^3 - 1/40*y^5 - 1/2*x^2*y - 1/6*y^3 + y
-1/8*x^4*y - 1/12*x^2*y^3 - 1/40*y^5 - 1/2*x^2*y - 1/6*y^3 + y
Integrating in x
int(z dx dy) = -1/4*(y^2*arcsin(2*x/sqrt(-4*y^2 + 4)) - sqrt(-x^2 - y^2 + 1)*x 
- arcsin(2*x/sqrt(-4*y^2 + 4)))*y
Taylor expansions:
-1/80*x^5*y - 1/24*x^3*y^3 - 1/16*x*y^5 - 1/12*x^3*y - 1/4*x*y^3 + 1/2*x*y
-1/40*x^5*y - 1/36*x^3*y^3 - 1/40*x*y^5 - 1/6*x^3*y - 1/6*x*y^3 + x*y

--
Christopher Subich

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to