I though it will be easier then calculating the electric field and then integrating, but I am stuck.
lets say we have an infinite wire, charged $\lambda$ per unit of length and its located at the origin, infinite to $z$ axis.
Then due to the symmetry in the problem we can say that $\partial\phi$ and $\partial z$ are $0$ so we are left with only the trivial solution - $$ C+D\ln r$$ now because the potential need to be 0 in $ r=\infty$ we get that $C=0$ but how to go from there?
I though about using the charge density, maybe with $E$ (derivative)
and say that $\rho=\delta(r)$ but I don't know how to go from there.
help will be greatly appreciated.