I don't remember enough from my electromagnetism course and I can't find any simple, full example on this subject.
I know, that I can consider the cylinder as a wire with the same charge density (when outside of the cylinder), so I consider the wire case with the same charge density, $\lambda$.
I set the $y$ direction to pass through the wire, and the $x$ direction to pass through the point charge and perpendicular to the wire. Everything is in the $z=0$ plane. Hence, the particle is at $x=r$ position.
$V = -\int_b^r E dl = - k \int_b^r \lambda/x dx$
Where $k$ holds the constants and $b$ being a point where the potential is 0.
The solution of this integral is
$V = - k \lambda \log (1/r) + C$
When $b=1$ the potential is 0 so the potential is
$V = k \lambda \log (1/r)$
and the energy is
$U = k q \lambda \log (1/r)$
Here are my questions:
Is any of this true?
I tried to derive this by starting with coulomb law and calculating the energy for a segment of the wire, I get an answer which scales like $1/r$, can you derive the answer for this?