Question: Calculate flux and 3D-integrals with VectorCalculus package: erroneous output?

Dear community,

The VectorCalculus package in Maple 18 exhibits some rather odd behaviour when calculating an integral over a 3D-domain (an elipsoid centered at (0,0,1) with length of semi-axes 2, 2, and 1) given by a 'Region'. It also reports an incorrect result when calculating the flux of a vector field through the surface of this ellipsoid.

See below for a minimal working example:

 

// integrate several functions over ellipsoid

int(2*x+2*y, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: 0

int(2*z, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: 32*Pi/3

int(2*x+2*y+2*z, [x, y, z] = Region(-2 .. 2, -sqrt(-x^2+4) .. sqrt(-x^2+4), -sqrt(1-(1/4)*x^2-(1/4)*y^2)+1 .. sqrt(1-(1/4)*x^2-(1/4)*y^2)+1));    ---- output: -32*Pi/3

 

Why does the integral change sign?

 

// Calculate flux of vector field over surface of ellipsoid

F2 := VectorField(`<,>`(x^2, y^2, z^2));

S2 := Surface(`<,>`(2*sin(t)*cos(s), 2*sin(t)*sin(s), 1+cos(t)), s = 0 .. 2*Pi, t = 0 .. Pi);

Flux(F2, S2, 'outward');   ---- output: -32*Pi/3

 

However, since 'z' is positive over the entire ellipsoid, by the Divergence Theorem we know the result should be positive (in fact, equal to +32*Pi/3). Changing 'outward' to 'inward' does not change the sign, by the way.

 

Is this a bug inside the VectorCalculus package which appears more often, or have I done something wrong?

Thank you for responding and apologies if a similar question has already been answered in another thread.

Best wishes,

QQ

Please Wait...