0
$\begingroup$
f[x_,y_,z_] = Simplify[({x,y,z} - {x0,y0,z0})/Norm[{x,y,z} - {x0,y0,z0}]^3,  
Element[{x,y,z,x0,y0,z0}, Reals]] 

Integrate[f[x,y,z],{x,-1/2,1/2},{y,-1/2,1/2},{z,-1/2,1/2}] 

While attempting to help https://astronomy.stackexchange.com/questions/8237 I ran into the integral above.

It seems like a simple enough integral, but Mathematica hangs on it.

It even hangs on the much simpler:

Integrate[f[x,y,z][[1]],{x,-1/2,1/2}]  

Is this really a difficult integral or am I doing something wrong?

$\endgroup$
1
  • 5
    $\begingroup$ Hi! You've been at the site for more than 2 years, asked 10 questions, accepted only 2 answers and voted only five times. You should understand that this kind of behavior isn't the best to get more and better answers. Try to participate more! $\endgroup$ Commented Dec 14, 2014 at 16:48

1 Answer 1

4
$\begingroup$

This is a start

$Version

"10.0 for Mac OS X x86 (64-bit) (December 4, 2014)"

assume = Element[{x, y, z, x0, y0, z0}, Reals];

f[x_, y_, z_] = Simplify[
   ({x, y, z} - {x0, y0, z0})/Norm[{x, y, z} - {x0, y0, z0}]^3,
   assume];

f1[x_, y_, z_] = f[x, y, z][[1]];

Simplify[
 Integrate[f1[x, y, z], {x, -1/2, 1/2}, Assumptions -> assume],
 assume]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.