# Evaluate the volume of the solid defined by $x^2+y^2+z^2 \leq 9$ and $x^2+y^2 \leq 3y$

I am asked to solve the following problem:

Evaluate the volume of the solid defined by $x^2+y^2+z^2 \leq 9$ and $x^2+y^2 \leq 3y$.

I thought about using spherical coordinates:

$$0 \leq \rho \leq 3\\ 0 \leq \theta \leq 2\pi\\ 0 \leq \phi \leq \frac{\pi}{2}$$

with $\rho^2sin(\phi)$ on the integral, but that didn't work.

$$\int_{0}^{\pi/2} \int_{0}^{2\pi} \int_{0}^{3} \rho^2sin(\phi) \ d\rho d\theta d\phi$$

Where did I go wrong?

TEXTBOOK ANSWER: $18 \pi$

• This probably doesn't help in evaluating the integral, but the region you require is the intersection of a sphere of radius $3$ and a cylinder of radius $3$ with it's center on the surface of the sphere. – Aritra Das May 13 '16 at 10:41
• What do you mean 'it didn't work'. You defined an integral. It's separable in spherical coordinates as you show. Did you try to solve it? – Yuriy S May 13 '16 at 11:08
• The solution is correct, just compute your integral – openspace May 13 '16 at 11:22

Your integral did not consider the cylinder $x^2+y^2\leq 3y$ at all. Although it gives you the correct answer. It is a coincidence.
This is a volume of the cylinder inside a bigger sphere. So it is capped by the sphere on top and bottom. It's better to use cylindrical coordinate. It is then $$2\int_{0}^{\pi} \int_{0}^{3\sin\theta} \int_{0}^{\sqrt{9-x^2-y^2}} r \ dzdr d\theta.$$
The $3\sin\theta$ comes from the cylinder $$x^2+y^2\leq 3y\implies r^2\leq 3r\sin\theta\implies r\leq 3\sin\theta.$$