[Maxima] double integrals seem to give different answers

G. Jay Kerns gkerns at ysu.edu
Fri Nov 20 20:36:22 CST 2009

```Dear Maxima list,

Let

f(x,y,z) := exp((x^2 + y^2 +z^2)^(3/2));

x: rho * sin(phi) * cos(theta);
y: rho * sin(phi) * sin(theta);
z: rho * cos(phi);
J: rho^2 * sin(phi);

Then the following double integrals give different answers... why?

integrate(integrate(f(x,y,z) * J, rho,0,1), theta,0,2*%pi);

integrate(integrate(trigsimp(f(x,y,z)) * J, rho,0,1), theta,0,2*%pi);

(The second one is the correct answer).  By the way, the inner
integrals give the same answer although the first one without trigsimp
is long and complicated.

It would seem the moral of the story is, "Do as much simplification as
possible before calling integrate."  Is this true, or is there a more
general principle that I am missing?

I would appreciate any insight.

Cheers,
Jay

***************************************************
G. Jay Kerns, Ph.D.
Associate Professor
Department of Mathematics & Statistics
Youngstown State University
Youngstown, OH 44555-0002 USA
Office: 1035 Cushwa Hall
Phone: (330) 941-3310 Office (voice mail)
-3302 Department
-3170 FAX
VoIP: gjkerns at ekiga.net
E-mail: gkerns at ysu.edu
http://people.ysu.edu/~gkerns/
```