As far as I dig into higher mathematics, I found a problem myself for getting volume of a spherical cap, as I was doing some experiments with Archimedes Principle.
So what I did was take elemental mass in terms of angle θ taking center of sphere as origin.
So, lets see what I did and what i was getting
$$r = R\cos θ$$ (vertically-opposite angle, see Z looking in figure)
Now volume of small elemental mass $$dV = πr^2\, dl$$ (where $dl$ is thickness) $$dl = R\,dθ$$ Putting all together $$dV = π(R\cos θ)^2(R\,dθ)$$ $$dV = πR^3\cos^2θ\,dθ$$
Now total volume of the sphere if i want to calculate to check this formula is working correct, $$V = \int_{-π/2}^{π/2} πR^3 \cos^2θ\,dθ$$ $$V = πR^3 \int_{-π/2}^{π/2} \cos^2θ\,dθ$$ $$V = πR^3 \int_{-π/2}^{π/2} \frac{1+\cos2θ}{2}\,dθ$$ $$V = πR^3 \left[ \frac{θ}{2} + \frac{\sin 2θ}{4} \right]_{-π/2}^{π/2}$$ $$V = \frac{π^2R^3}{2}$$
But this contradicts the fact that Volume of sphere is $\frac{4}{3}πR^3$
And in fact, the surface area of the sphere is taken out of this method to, instead taking $πr^2\,dl$ we use $2πr\,dl$ to get elemental area and then integrate from 0 to $\frac{π}{2}$ and then twice that. But doing that will not gonna help in getting volume of a spherical cap, so I took elemental volume.
What is done wrong in this method, any help would be appreciated. :)