Triple integral visualisation problem with a sphere and a cylinder Write a triple integral in cylindrical coordinates for the volume of the solid cut from a ball of radius 2 by a cylinder of radius 1, one of whose rulings is a diameter of the ball.
I am unable to understand how to get $z=f(r,\theta)$ and the limits.
Any help would be appreciated
 A: Hint:
The better way to solve this problems to use cylindrical coordinates.
The sphere of center $(0,0,0)$ and radius $2$ has equation: $r^2+z^2=4$ and, without loss of generality, we can assume that cylinder has the axis parallel to the $z$ axis , and center at $(0,1,0)$ and radius $1$ so it has equation: $r=2\sin \theta$.
this means that the limits of the volume limited by the sphere and the cylinder are:
$$
0\le \theta \le 2\pi \qquad 0\le r \le 2 \sin \theta \qquad-\sqrt{4-r^2}\le z \le \sqrt{4-r^2}
$$
so, using the symmetries of the figure, the volume is:
$$
V=4 \int_0^{\frac{\pi}{2}}\int_0^{2\sin \theta}\int_0^{\sqrt{4-r^2}}rdzdrd\theta
$$ 
where $rdzdrd\theta$ is the volume element in cylindrical coordinates.
can you do from this?
A: The equation for the ball is
$$
x^2 + y^2 + z^2 = 2^2
$$
and we have a cylinder inside this ball with radius 1, this would give the limits:
$$
0 \le r \le 1\\
0 \le \theta \le 2\pi
$$
since the radius is 1 and a cylinder has a circular bottom which is a "full lap" around the unit circle hence the $2\pi$
The height of the cylinder is
$$
4^2 - 2^2 = h^2 \Rightarrow h = \sqrt{12}
$$
you can draw a rectangle inside a circle and get a triangle with cathetus 2 (radius = 1) and h (the unknown). The diagonal is the diameter of the circle which is 4. Since the cylinder is stationed in the origin, z has the limits $$-\frac{\sqrt{12}}{2} \le z \le\frac{\sqrt{12}}{2}$$
Which would give you the integral
$$
\int_{\theta=0}^{2\pi} \int_{z=-\frac{\sqrt{12}}{2}}^{\frac{\sqrt{12}}{2}}\int_{r=0}^{1}(r^2 + z^2)r \cdot drdzd\theta
$$
I might have made some mistake somewhere, but hope this helps you anyway!
