How exactly does one find the potential energy of a charge distribution? More precisely, how does one get over the 1/r term in the integral goes crazy near r=0? Purcell says it is possible, but I'm not seeing how for an continuous distribution this is possible. Consider for a line of length L with linear charge density p. Let's start just by finding the potential at on end of the line. It should be integral from 0 to L of (p*dx / x). Needless to say, the integral doesn't exist. What am I doing wrong?