# Having trouble setting up the triple integral inside the region(sphere) $\;x^2+y^2+z^2 = 4$

I'm having trouble setting up the bounds and the integral. The question asked to find the mass of the 3D region $$x^2 +y^2 + z^2 ≤ 4,x ≥ 0, y≥ 0, z ≥ 0$$ if the density is equal to xyz. I don't want to evaluate it, I just want to clear some few things so I may never have trouble with such problems again.

1. Can this question be done with Polar coordinates? If yes, then why and what will be the limits?

2. In case of rectangular coordinates, how would the limits be set up and what would be the integrand?

My attempt:

To find x and y intercepts, taking y and z = 0, so we have $$x = 2$$, $$-2$$. Are these the limits of x? I don't think that -2 will be the lower limit because the region specifies that x ≥ 0 so the limits will be [0,2]. Kindly confirm.

Using the same logic for y and making y depend on x, the limits will be $$y = [0,\sqrt{4-x^2}]$$ disregarding the out of bound limit $$-\sqrt{4-x^2}$$ . Is this a correct assumption?

Finally the limits for z will be $$[0, \sqrt{4-x^2-y^2}]$$

Now I'm not sure how to set up the integral but I would assume that it would be in the order of dzdydx with the integrand being 1 but coming back to the question, I have integrate xyz over the region to calculate the mass. Thank you in advance.

• This is (by far) most easily done in spherical coordinates. – user296602 Nov 27 '18 at 18:47
• You should edit your title so that it makes sense. The region is not $x^2+y^2+z^2$. It's the inside of the sphere $x^2+y^2+z^2=4$. :) – Ted Shifrin Nov 27 '18 at 18:49
• Computing such integrals in Cartesian coordinates is usually a bad idea. Spherical coordinates work wonders in cases like these because they greatly simplify expressions such as $x^2+y^2+z^2$. What you're essentially doing when using spherical coordinates is just a change of coordinates, which is valid since every point of $(x,y,z)\in\mathbb{R}^3$ in Cartesian coordinates is uniquely determined by the triplet $(r, \theta, \phi)$ in spherical coordinates. – MSobak Nov 27 '18 at 18:50
• @TedShifrin edited, now kindly clear my doubts that I have mentioned in my attempt. Thank you – tNotr Nov 27 '18 at 18:58
• @MisterRiemann so regions having equations involving the square of 3 variables can be always solved by spherical coordinates, ok but what if the question has the region lying under the sphere, above the z plane and inside the cylinder $x^2 + y^2 = 5$ ? How would you set and evaluate the integral then> I have intentionally left out numbers as I just want to get the idea. Thanks – tNotr Nov 27 '18 at 19:04

Since $$x=r\sin\theta\cos\varphi,\,y=r\sin\theta\sin\varphi,\,z=r\cos\theta$$ has Jacobian $$r^2\sin \theta$$, an infinitesimal region has mass $$xyz dxdydz=r^5 dr\sin^3\theta\cos\theta d\theta\sin\varphi\cos\varphi d\varphi$$. We integrate $$r$$ from $$0$$ to $$2$$, $$\theta$$ from $$0$$ to $$\pi/2$$ and $$\varphi$$ from $$0$$ to $$\pi/2$$, obtaining (if my arithmetic's right) $$\int_0^2 r^5 dr\int_0^{\pi/2}\sin^3\theta\cos\theta d\theta\int_0^{\pi/2}\frac{1}{2}\sin 2\varphi d\varphi=\frac{2^6}{6}\frac{1}{4}\frac{1}{4}=\frac{2}{3}.$$