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?

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.
