# Integrating over a sphere

We are trying to integrate a vector function over a sphere. To do this we changed it to spherical coordinates and then tried to integrate it. Unfortunately we get the error message shown on the image below.

The codes that we used are the following:

Simplify[
ToSphericalCoordinates[
{q*X/(4*π*ϵ*(X^2+Y^2+Z^2)^(3/2)),
q*Y/(4*π*ϵ*(X^2+Y^2+Z^2)^(3/2)),
q*Z/(4*π*ϵ*(X^2+Y^2+Z^2)^(3/2))}]]

Integrate[
Sqrt[q^2/((X^2+Y^2+Z^2)^2 ϵ^2)]/(4 π),
ArcTan[(q Z)/((X^2+Y^2+Z^2)^(3/2) ϵ), Sqrt[(q^2 X^2+Y^2))/((X^2+Y^2+Z^2)^3 ϵ^2)]],
ArcTan[(q X)/((X^2+Y^2+Z^2)^(3/2) ϵ), (q Y)/((X^2+Y^2+Z^2)^(3/2) ϵ)],
{X, Y, Z} ∈ Sphere[{0,0,0},{r}]]


All help will be appreciated.

• The radius of the sphere should not be a list: Sphere[{0,0,0},r] doesn't produce any errors – Lukas Lang Sep 15 '17 at 14:09
• Ah we got it now. Thanks a lot! – Didier Drogba Sep 15 '17 at 18:16