Find volume of the cap of a sphere of radius R with thickness h I have to determine the volume and the formula for the volume for this spherical cap of height $h$, and the radius of the sphere is $R$:

Two methods:  *I just need help setting up the triple integrals
1) Cylindrical
For for this method I am thinking that $\theta$ goes from $0$ to $2 \pi$, $r$ from $0$ to $5$, and $z$ from $R-h$ to $R$ with the integral of $1\text{d}z\text{d}r\text{d}\theta$.  However, I'm not sure if this right??
2) Spherical
For this I know that $\theta$ ranges from $0$ to $2 \pi$, but I cannot figure out the range for $\phi$?? I know its from $0$ to some angle where the cap lies ($R-h$), however, I cannot figure it out.  Same goes for the range for $\rho$, for this I am assuming it would start at $(R-h)\sec\theta$ to what the outer boundary is? Sorry, I'm completely lost.
I've been working on this problem and trying to set it up for quite some time and have had no luck, and as a last resort, I am asking on here.
To whomever can help me, could you please keep it very detailed?
Thank you.
 A: You can solve this problem using solids of revolution. 
Define a circle as $x^2+y^2=R^2$
$\Rightarrow x=\sqrt{R^2-y^2}$
By constructing wide circular cylinders on top of one another, decreasing in size as you move towards the top, one gets
$V=\int\limits_{R-h}^R\pi(R^2-y^2)dy\\=\left.\pi R^2y-\pi\frac{1}{3}y^3\right]_{R-h}^R=\pi Rh^2-\frac{1}{3}\pi h^3$
A: To set up the integral in sphericals, just draw a picture.  The limit in $\theta$ is determined by 
$$\cos{\theta} = \frac{R-h}{R}$$
Therefore, the volume of the cap is the integral
$$2 \pi \, \int_0^{\arccos{[(R-h)/R]}} d\theta \, \sin{\theta} \, \int_{(R-h)/\cos{\theta}}^R dr \, r^2 $$
A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{}$
\begin{align}
V_{\rm cap}&=\int_{\rm cap}\dd V\ =\
\overbrace{\int_{\rm cap}{1 \over 3}\,\nabla\cdot\vec{r}
\,\dd V
={1 \over 3}\int_{
\mbox{cap surface}}\vec{r}\cdot\dd\vec{S}}
^{\color{#c00000}{\ds{\mbox{Gauss Divergence Theorem}}}}
\\[3mm]&={1 \over 3}\braces{%
\int_{\rm bottom}\bracks{-\pars{R - h}\,\verts{\dd S_{z}}}
+\int_{\rm top}R\,\hat{r}\cdot\dd\vec{S}}
\\[3mm]&={1 \over 3}\braces{-\pars{R - h}\pi\bracks{R^{2} - \pars{R - h}^{2}}
+R^{3}\int_{0}^{2\pi}\dd\phi\int_{0}^{\arccos\pars{\bracks{R - h}/R}}
\dd\theta\,\sin\pars{\theta}}
\\[3mm]&={1 \over 3}\,\pi\braces{%
-\pars{R - h}\pars{2Rh - h^{2}} - 2R^{3}\bracks{{R - h \over R} - 1}}
\\[3mm]&={1 \over 3}\,\pi\pars{-2R^{2}h + Rh^{2} + 2Rh^{2} - h^{3} + 2R^{2}h}
={1 \over 3}\,\pi\pars{3Rh^{2} - h^{3}}
\end{align}

$$\color{#44f}{\large%
V_{\rm cap} = \bracks{%
{3 \over 4}\,\pars{h \over R}^{2} - {1 \over 4}\,\pars{h \over R}^{3}}\color{#c00000}{{4 \over 3}\,\pi R^{3}}}\,,\qquad\qquad 0 \leq h \leq 2R
$$

A: I think that your cylindrical co-ordinates are wrong, because your bounds of z define horizontal planes, which results in your integral calculating the volume of a cylinder from $R-h$ to $R$. Instead of these bounds, I would choose from $R-h$ to $\sqrt{R^2-r^2}$. When evaluating the integral $$\int_0^{2 \pi}\int_0^R\int_{R-h}^{\sqrt{R^2-r^2}}r\ \text{d}z \, \text{d}r\,\text{d}\theta$$ I get a similar solution to my previous answer: $\pi R^2h-\frac{1}{3}\pi R^3$. However, I cannot work out why the $R$'s and $h$'s are switched around (can anybody tell me why?).
For spherical co-ordinates, the bounds that you have started with are correct. For the rest, I get the same as Ron Gordon, except that I have defined my integral differently:
$$\int_0^\pi \int_0^{\arccos{\left(\frac{R-h}{R}\right)}} \int_{\frac{R-h}{\cos{\phi}}}^R \rho^2\sin{\phi}\, \text{d}\rho\, \text{d}\phi\, \text{d} \theta$$
Note that $\phi$ is evaluated after $\rho$, and not at the same time. An explanation for the upper bound of $\rho$ is that the upper surface of the cap is exactly $R$ units away from the origin. $\phi$ is defined at the edge of the cap where $R-h=R\cos\phi$, as Ron Gordon has said, so $\phi$ varies from $0$ to $\arccos\left(\frac{R-h}{R}\right)$.
I have tried evaluating this integral as well, but I am left with an extra term:

Again, if you can see where I went wrong in my calculations, please tell me.
A: I have noticed that your integration limits are not correct (cylindrical ones). Take into account that the radius goes from zero to r, but not R (since the radius of the cap (r) is not the same that the radious of the sphere (R)).
If you try these other limits: $z:[R-h,R]$ and $r:[0,\sqrt{R^2-Z^2}]$, and evaluate the integral, the final expression is the correct one.
