Solution (source code)

= Solution

A capacitor consists of two conductors carrying equal and opposite charges. Its <capacitance> is
$$
C=\frac QV,
$$
where $Q$ is the magnitude of the charge on either conductor and $V$ is their potential difference.

For $a<r<b$, a coaxial Gaussian cylinder of length $\ell$ encloses charge $\lambda\ell$. <Gauss's law> gives
$$
E(r)=\frac{\lambda}{2\pi\epsilon_0r}\,e_r.
$$
Taking $V$ to mean the inner potential minus the outer potential,
$$
V=\int_a^bE(r)\,dr
=\frac{\lambda}{2\pi\epsilon_0}\log\frac ba.
$$
Since $Q=\lambda L$,
$$
\boxed{C=\frac{2\pi\epsilon_0L}{\log(b/a)}}.
$$

The field energy is
$$
\begin{aligned}
U
&=\frac{\epsilon_0}{2}
\int_a^bE(r)^2(2\pi rL)\,dr\\
&=\frac{\lambda^2L}{4\pi\epsilon_0}\log\frac ba
=\frac12(\lambda L)
\left(\frac{\lambda}{2\pi\epsilon_0}\log\frac ba\right)
=\frac12QV.
\end{aligned}
$$
These are the standard <coaxial cylindrical capacitor> formulas.