Volume of the spherical cap: $K_h := \left \{(x, y, z) ∈ \mathbb{R}^3 | x^2 + y^2 + z^2 ≤ R, z > h\right \}$ I want to check if my solution to this problem is right.
I have to calculate for $R > 0$ and $h\in [0, R)$ the volume of the spherical cap: $K_h := \left \{(x, y, z) ∈ \mathbb{R}^3 | x^2 + y^2 + z^2 ≤ R^2, z > h\right \}$
So what I have done is
$$V(K_h)= \int_{R}^{h}\left(\int_{x^2+y^2 \leq R^2-z^2} 1d(x,y)\right)dz\\=\int_{R}^{h}(R^2-z^2)dz\\= \left[R^2z-\dfrac{z^3}{3}\right]_{R}^{h}=\dfrac{3hR^2-h^3}{3}-\dfrac{2R^3}{3}$$
I think I have done a mess, but I don't know where the error is. Can someone help me?
 A: Your integral over $dxdy$ is wrong. That region is a disk, with area $\pi(R^2-z^2)$.
$$\int_0^{R^2-z^2}dxdy=\int_0^{2\pi} d\phi\int_0^{\sqrt{R^2-z^2}} \rho d\rho\\=2\pi\frac{\left(\sqrt{R^2-z^2}\right)^2}{2}\\=\pi(R^2-z^2)$$
Also, the limits of integration for $z$ are from $h$ to $R$, not the other way around.
$$\int_h^R\pi(R^2-z^2)dz=\pi R^3-\pi R^2h-\pi\frac{R^3}3+\pi\frac{h^3}3$$
To check your solution, if you plug in $h=0$ you should get half the volume of a sphere, or for $h=-R$ you get the full volume.
A: I think it is better to use cylindrical coordinates:
$x = r\cos\theta  $
$y =r\sin\theta  $
$z =z$
$J = r$
_$x^2+y^2+z^2 \leq R \Rightarrow z\leq \sqrt{R-r^2}  $
So the limits of $z$ are $h$ and $\sqrt{R-r^2}$
_Clearly $0 \leq \theta \leq 2\pi$
_it remains to find the limits of $r$
Since $z\geq h$,we get : $x^2+y^2 \leq R -h^2 \Rightarrow 0 \leq r\leq \sqrt{R-h^2}$
And so :
$V = \displaystyle\int dV = \displaystyle \int_0^{2\pi} \displaystyle\int_0^{\sqrt{R-h^2}}\displaystyle\int_0^{\sqrt{R-r^2}} r\,\, dz \,\,dr\,\, d\theta$
