As a Physics Degree undergraduate, I have been forced countless times to use a certain method to integrate over 3D surfaces and volumes, which my lecturers like to call integration through surface and volume elements. I can't stand this method, nor I could ever understand how to do it, especially because it is not mathematically rigorous.
However, at most cases, I'm not able to avoid it. For example - given the electric field of a ring of radius $r$ lying on $z=0$ at the point $(0,0,z_0)$, I am required to find the electric field of a disk of radius $R$ lying on $z=0$ at the point $(0,0,z_0)$. In order to do that, I have to use the aforesaid method - integrate the electric field I'm given with respect to the length element $dr$, from $r=0$ to $r=R$. Of course, doing that would also require to translate the charge density of a length element, to a charge density of a surface element, assuming they're both unifrom.
But - Physics is not my problem here - but the math. And that's why I came here. I tried to understand using this method, but it sometimes works - and sometimes doesn't. I would be glad to know where I'm right, and where I'm wrong.
$(\star)$ Important: The angle $\theta$ in Examples 1,2 is the angle of the polar coordinates. In Examples 3,4, it is the polar angle of the spherical coordinates (meaning it is not the azimuthal one).
$(\star)$ I will denote $\color{green}{Good}$ in green and $\color{red}{Bad}$ in red. Lowercase will be integration variables, and uppercase would be given parameters.
Example 1: Calculating the area of an empty cylinder of radius R and height H
A. With respect to $dz$
Given a perimeter of a ring $2\pi R$, the area of a ring with an infinitesimal height $dz$ would be given by $2\pi Rz$. And then:
$$S=\int\limits_{0}^{H}2\pi Rz\ dz=\color{green}{2\pi RH}$$
A correct answer, gladly.
B. With respect to $d\theta$
We know that if we sliced the cylinder vertically, rotating with the angle $\theta$, we would get lines of height $H$ each, multiplied by an infinitesimal width $Rd\theta$. Thus, the surface element would be given by $HRd\theta$. And then:
$$S=\int\limits_{0}^{2\pi}HR\ d\theta=\color{green}{2\pi RH}$$
Again - a good answer. But: this is where things are going to get ugly.
Example 2: Calculating the volume of a cylinder of radius R and height H
A. With respect to $dr$
We would want to sum cylinders with infinitesimal widths $dr$, thus the volume element would be given by $2\pi H rdr$ (the perimeter of a ring of radius $r$ multiplied by the infinitesimal width $dr$ and height $H$). And then:
$$V=\int\limits_{0}^{R}2\pi Hr\ dr=\color{green}{\pi HR^2}$$
This is of course correct, but:
B. With respect to $d\theta$
We would want to sum the exact same slices we described at B. of Example 1, but now they would also have a width of $R$. Meaning: the volume element would be given by $HR^2d\theta$ (since every rectangle is of dimensions $H \times R$, and we multiply each by an infinitesimal width $Rd\theta$). And now:
$$V=\int\limits_{0}^{2\pi}HR^2\ d\theta=\color{red}{2\pi HR^2}$$
This is bad. I would show you now 2 more examples - in the case of a sphere and a ball. It doesn't work there either.
Example 3: Calculating the area of a sphere of radius R
With respect to $d\theta$
Given a ring of radius $r$, it can be easily checked to see that, geometrically, $r$ would be given by $R\sin\theta$. The infinitesimal width of such disk, would be now $Rd\theta$, thus the surface element would be given by $2\pi R^2\sin\theta d\theta$. Therefore:
$$V=\int\limits_{0}^{\pi}2\pi R^2\sin\theta \ d\theta=\color{green}{4\pi R^2}$$
Getting optimistic, let's try to calculate the volume of the ball.
Example 4: Calculating the volume of a ball of radius R
A. With respect to $dr$
We would want to sum spheres, of radius $r$ and infinitesimal width $dr$ each. Thus, the volume element would be given by $4\pi r^2 dr$, and then:
$$V=\int\limits_{0}^{R}4\pi r^2 \ dr = \color{green}{\frac{4}{3}\pi R^3}$$
But unfortunately:
B. With respect to $d\theta$
Going again like B. of Example 3, we would want to sum the exact same rings, but now they would be disks with the infinitesimal width $Rd\theta$. The volume element would be given by $\pi (R\sin\theta)^2 Rd\theta$, which leads us to:
$$V=\int\limits_{0}^{\pi}\pi R^3 \sin^2\theta\ d\theta=\color{red}{\frac{1}{2}\pi^2 R^3}$$
I tried using the other elements too: $d\varphi$, for example. the azimuthal angle, which is much more complicated, and also tried other shapes like a cone and even paraboloid. But it just won't work right. It works sometimes - and that's not enough for me, unfortunately. I put many efforts to this post, in order to show you my way of thinking, because that's how I had been taught to do this. But maybe it is not right (it feels like it, for sure).
Thank you very much for reading all this, and I would be very glad to hear your thoughts.
P.S.: I wish I could add pictures, but I don't know any programs that I can use to draw them.