I have a question regarding the solution to part of this homework question:
An infinite filled cylinder of radius $a$ contains a 3D charge density $\rho$. A thin-walled hollow cylinder of radius $b \gt a$ centered on the same axis surrounds it, and contains a charge with the same charge per unit length, but with opposite sign.
a) Compute the electric field $\vec E$ everywhere.
b) Compute the electrostatic potential $V$, defined by $\vec E = −\nabla V$, everywhere, subject to $V(r \to \infty) = 0$
c) Compute the energy in the electric field, per unit length. The 3D energy density is $U_E = \varepsilon_0 E^2/2$.
I only have a question regarding the solution to part c). But, unfortunately for my question to make sense I will have to typeset the full solutions to a), b) and c):
The arrangement is shown above and the solution to part a) is
By symmetry, the electric field is radial everywhere. For $r \lt a$, Gauss’s theorem in a cylinder of unit length (or use a length $L$ if preferred) gives $$\oint \vec E \cdot d\vec S =\frac{Q}{\varepsilon_0}\implies E 2 \pi r=\frac{\pi r^2 \rho}{\varepsilon_0}\implies E=\frac{\rho r}{2 \varepsilon_0}$$ For $a \lt r \lt b$ the charge enclosed is $\pi a^2 \rho$, so $$E 2 \pi r=\frac{\pi a^2 \rho}{2 \varepsilon_0}\implies E=\frac{\rho a^2}{2 r \varepsilon_0}$$ For $r \gt b$ the charge enclosed is zero, so $$E=0$$
The image below is just for clarity and it shows the cylinder as viewed from its cross-section:
The solution to part b) is
In cylindrical polars, the radial gradient is $\frac{\partial V}{\partial r}$, so $$V(r)=-\int_{\infty}^r E(r^{\prime})\,dr^{\prime}$$ Evidently $V=0$ for $r \gt b$.
For $a \lt r \lt b$, $$V(r)=-\int_{b}^r \frac{\rho a^2}{2 r^{\prime} \varepsilon_0} \, dr^{\prime}=-\frac{\rho a^2}{2 \varepsilon_0}\ln\left(\frac{r}{b}\right)$$
For $r \lt a$, $$V(r)=-\int_a^r \frac{\rho r^{\prime}}{2 \varepsilon_0} \,dr^{\prime}-\frac{\rho a^2}{2 \varepsilon_0} \ln\left(\frac{a}{b}\right) = \frac{\rho\left(a^2-r^2 \right)}{4 \varepsilon_0}-\frac{\rho a^2}{2 \varepsilon_0} \ln\left(\frac{a}{b}\right)$$
The solution to part c) is
The energy per unit length is $$\frac{\varepsilon_0}{2} \int_0^b E^2(r) \, dr = \frac{\varepsilon_0}{2} \left(\frac{\rho}{2 \varepsilon_0}\right)^2 \left[\int_0^a {r^{\prime}}^2 \color{red}{2 \pi r^{\prime}} \, dr^{\prime}+\int_a^b \frac{1}{{r^{\prime}}^2} \color{red}{2 \pi r^{\prime}} \, dr^{\prime}\right]$$ $$=\frac{\pi \rho^2 a^4}{16 \varepsilon_0} \left[1+4 \ln\left(\frac{b}{a} \right) \right]$$
Now, finally, my question is very simple. Why are those factors of $2 \pi r^{\prime}$ (shown in red) present in the integrands?
Since the question asked for the energy per unit length I think that the integral should be given by $$\frac{\varepsilon_0}{2}\int_0^b E^2(r) \, dr = \frac{\varepsilon_0}{2} \left(\frac{\rho}{2 \varepsilon_0}\right)^2 \left[\int_0^a {r^{\prime}}^2 \, dr^{\prime}+\int_a^b \frac{1}{{r^{\prime}}^2} \, dr^{\prime} \right]$$
I note that the formula for $U_E$ is energy per unit volume, but the $2 \pi r^{\prime} \, dr^{\prime}$ implies that the integration is performed over infinitesimal annuli from the inner radius ($r=0$) to the outer radius ($r=b$). If this is the case then dimensionally this is a surface integral (and not a volume integral).
Could someone please explain what necessitates the $2 \pi r^{\prime} \, dr^{\prime}$ factors in the integrands?
Images shown in this question were taken from this pdf by MIT



The energy of the electric field in a volume $V$ is given by
$$\mathcal{E} = \frac{\epsilon_0}{2}\int_{V} E^2 dV$$
Let $V$ be a cylinder along the rod from $0$ to $\ell$ of infinite radius. So here you have
\begin{align} \mathcal{E} &= \frac{\epsilon_0}{2}\int_{V} E^2 dV \\ &=\frac{\epsilon_0}{2}\int_{0}^\ell\int_{0}^{2\pi}\int_0^\infty E^2(r)rdrd\theta dz \\ &=\frac{\epsilon_0}{2}\int_{0}^\ell\int_{0}^{2\pi}\int_0^b E^2(r)rdrd\theta dz \\ &=\frac{\epsilon_0}{2}\int_0^bE^2(r) [2\pi r \ell] dr \end{align} Since $E = 0$ for $r>b$. Therefore the energy per length $\ell$ is $$\mathcal{E}/\ell = \frac{\epsilon_0}{2}\int_0^bE^2(r) [2\pi r] dr$$ by symmetry this holds for any cylinder with the same orientation.