My task is to write volume integral in 3 coordinate systems : Cartesian, cylindrical and spherical. This integral shows volume of intersection of 2 spheres, first with center at $(0, 0,-3)$ and radius $5$ and second with center at $(0,0, 3)$ and radius $\sqrt{13}$.I am able to do it for Cartesian and cylindrical systems:
$$ \int_{-3}^{3}\int_{-\sqrt{9-x^2}}^{\sqrt{9-x^2}}\int_{3-\sqrt{13-x^2-y^2}}^{-3+\sqrt{25-x^2-y^2}} \, dz\,dy\,dx, $$
Update: as it was pointed out by Ross Millikan, cylindrical version should looks like this: $$ \int_{0}^{2\pi}\int_{3-\sqrt{13}}^{1}\int_{0}^{\sqrt{13-(z-3)^2}}r \, dz\,dr\,d\varphi + \int_{0}^{2\pi}\int_{1}^{2}\int_{0}^{\sqrt{25-(z+3)^2}}r \, dz\,dr\,d\varphi. $$
However, I can not handle spherical case. Please help me to understand it. Please show me how to make substitution. What I need is understanding how to solve this problem, since I need to solve more than problem of this type.
Thanks a lot for your help!
Update:
Now I am stuck with understanding the first term of spherical part. My attempt:
$$ \int_{0}^{2\pi}\int_{0}^{3}\int_{\pi}^{\arctan\frac{r}{3-\sqrt{13-r^2}}}r^2 \cos \psi \, d \psi \,dr\, d \varphi \, . $$ But numerically it is different from first cylindrical term.
Neither of your integrals is correct. You are integrating over the intersections of two balls. Spheres are the boundary of the balls. You need to find the $z$ coordinate where the spheres intersect, call it $z'$, then integrate over the top ball up to that $z$ position and integrate over the bottom ball above it. The $\varphi$ integral should be $0$ to $2\pi$ as you have it. The lowest point of the top ball is at $z=3-\sqrt {13}$ and the highest point of the bottom ball is at $z=2$. This gives $$\int_0^{2\pi}\int_{3-\sqrt{13}}^{z'}\int_0^{\sqrt{13-(z-3)^2}}rdr\ dz\ d\varphi$$ plus another term from $z'$ to $2$ in $z$