Double Trouble

William Fish's picture

I would like Maple to assist me with the following definite double integral:

int(int(x/(x^2+y^2+z^2)^(3/2), y = -b .. b), z = c .. a+c)

so far, I have failed.  Can anybody help?

Here is my worksheet:

View 4937_Page92.mw on MapleNet or Download 4937_Page92.mw
View file details

Comments

Robert Israel's picture

Double trouble

> f:= x/(x^2+y^2+z^2)^(3/2);
   F1:= int(f,z=-b..b) assuming positive;

= 2/(x^2+y^2+b^2)^(1/2)*b/(x^2+y^2)*x

So far so good

> Q:=int(F1,y=c..a+c) assuming positive;

= -I*arctanh((b^2+c*x*I+x^2)/b/(b^2+c^2+x^2)^(1/2))-I*arctanh((-b^2+c*x*I-x^2)/b/(b^2+c^2+x^2)^(1/2))+arctanh((b^2+a*x*I+c*x*I+x^2)/b/(2*a*c+c^2+x^2+a^2+b^2)^(1/2))*I+arctanh((-b^2+a*x*I+c*x*I-x^2)/b/(2*a*c+c^2+x^2+a^2+b^2)^(1/2))*I

It's curious that Maple finds an integral that appears complex, even though (under the assumption that x, a, b, c are all positive) the integral should obviously be real.

> F2:= simplify(evalc(int(F1,y))) assuming positive;

= -arctan(x*y/(x^2+b^2+b*(x^2+y^2+b^2)^(1/2)))+1/2*arctan(-x*y,b*(x^2+y^2+b^2)^(1/2)-x^2-b^2)-1/2*arctan(x*y,b*(x^2+y^2+b^2)^(1/2)-x^2-b^2)

> Q := eval(F2,y=a+c) - eval(F2, y=c);

= -arctan(x*(a+c)/(x^2+b^2+b*(x^2+(a+c)^2+b^2)^(1/2)))+1/2*arctan(-x*(a+c),b*(x^2+(a+c)^2+b^2)^(1/2)-x^2-b^2)-1/2*arctan(x*(a+c),b*(x^2+(a+c)^2+b^2)^(1/2)-x^2-b^2)+arctan(x*c/(x^2+b^2+b*(b^2+c^2+x^2)^(1/2)))-1/2*arctan(-x*c,b*(b^2+c^2+x^2)^(1/2)-x^2-b^2)+1/2*arctan(x*c,b*(b^2+c^2+x^2)^(1/2)-x^2-b^2)

 

John Fredsted's picture

Minor point

To be strictly true to the original integral, shouldn't the integral F1 be done with respect to y, and the integral Q with respect to z?

Note added: The result is, of course, the same because the integrand is symmetric in y and z. Realized after posting. Sometimes I post, and then I think. I apologize.

William Fish's picture

Assuming

Robert,

As you know, I tried

assume(-b <= y, y <= b, c <= z, z <= a+c)

and it didn't help.  Is this because it gives Maple no new information because the definite integrals already provided this information?

assuming positive

worked wonders.  I tried this too

assuming real,positive

and it seemed to do good things also.  Here is a worksheet:

View 4937_Page92JohnFredsted.mw on MapleNet or Download 4937_Page92JohnFredsted.mw
View file details

Can you help me understand what assuming does here?

Here is a quote from page 92 and 93 of When Least Is Best by Paul J. Nahin:

"...set the derivative...equal to zero and solve...proves to be an astonishingly ugly business!"

Robert Israel's picture

Assuming

You made no assumption on x.  Basically I think the problem that Maple needs to worry about is that the antiderivative may have a discontinuity (see e.g. the thread  Maple Integration Error).  Certainly there is likely to be trouble if the integrand itself went to infinity, which could happen if x was imaginary.

William Fish's picture

Nahin's Answer

Robert Israel,

Here is Nahin's answer:

arcsin(((b^2-x^2)*(x^2+(a+c)^2)-2*x^2*b^2)/((b^2+x^2)*(x^2+(a+c)^2)))-arcsin(((b^2-x^2)*(x^2+c^2)-2*x^2*b^2)/((b^2+x^2)*(x^2+c^2)))

As far as I can tell, your answer is the same as Nahin's.  Nahin says "a good table of integrals is the "method" I used!".  Your method is clear.  I can follow it.  Someday I like to think that I will be able to do it.  You have no idea how entertaining I find your mathematics.  Thank you.

Here is my worksheet:

View 4937_Page92RobertIsrael.mw on MapleNet or Download 4937_Page92RobertIsrael.mw
View file details

 

William Fish's picture

Assume

I tried assuming x is between 0 and 20.  I tried making assumtions about a, b & c.  None of this helped.  Assuming positive worked wonders.  What exactly was assumed to be positive?  Assuming real seemed to have the same affect as assuming positive.

evalc(...) assuming positive;

worked like magic (Arthur C. Clarke's 3rd law).

I read Maple Int/int error?  CASs are complex and imperfect.

View 4937_Page92a.mw on MapleNet or Download 4937_Page92a.mw
View file details

William Fish's picture

As Good As It Gets

This seems to be about as good as it gets:

View 4937_Page92b.mw on MapleNet or Download 4937_Page92b.mw
View file details

It's Robert Israel's method.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}