I never understood how such integrals are calculated, formally. In a line is easy, just a line integral. In a surface, sometimes is easy, like in a disc. But, some surfaces, like sphere, it gets harder. Volumes is even harder.
Let's say I want to calculate the electric field in a generic point $\vec r = (x, y, z)$. There was a uniformly charged volume, with density charge $\rho$.
Formally, I have to give the parametrization of my volume. Let's consider this one: $$ \gamma(r, \theta, \phi) = r(\cos\theta \sin\phi, \sin\theta \sin\phi, \cos\theta) $$
If $0\le\theta\le 2\pi$ and $0\le\phi\le\pi$ and $0\le r \le R$, then $\gamma$ is a ball of radius $R$. If $S(\theta, \phi) = \gamma(R, \theta, \phi)$, then $S$ is a sphere of radius $R$.
But, let's consider the following parametrization: $$ \begin{array}{} 0\le\theta\le 2\pi \\ 0\le\phi\le\pi \\ a\le r \le b \end{array} $$
For a point $\vec r$, the electric field $d\vec E$ is: $$ d\vec E = \frac{k dq}{|\vec\gamma - \vec r|^2} $$
Where $k$ is just a constant depending on the nature: if is electric, or gravitational. Then, the electric field: $$ \vec E(\vec r) = \iiint_\gamma\frac{k\rho}{|\vec\gamma - \vec r|^2}dv = \int_a^b\int_0^\pi\int_0^{2\pi}\frac{k\rho}{|\vec\gamma - \vec r|^2} r^2\sin\phi \text{ } d\theta d\phi dr $$
This is a so bad integral to evaluate. How to figure out the result, but keeping formal? Is there a quicker way (keeping formal of course)?