# Electrostatic energy of capacitors and point charges

Suppose we have an ideal capacitor consisting of two spheres both of radius a. One sphere has the positive charge $$Q_A$$ = Q and its center is located at point A. The other sphere has the negative charge $$Q_B$$ = -Q and its center is located at point B. Whatever the size of the radius a, the electrostatic energy W for this system is given by $$W =\frac{QV}{2}$$ where $$V = ɸ_A – ɸ_B$$, the potential difference between the conductors. $$ɸ_A$$ is larger than $$ɸ_B$$ so W is positive. Now we let a tend to $$0$$ until we have two point charges Q and -Q. We conclude that W for the two point charges is positive.
But that is wrong. Having two point charges $$Q_A$$ = Q and $$Q_B$$ = -Q we can still use $$W =\frac{QV}{2}$$ if we define $$ɸ_A$$ as the potential at point A due to $$Q_B$$ with $$Q_A$$ absent and $$ɸ_B$$ as the potential at point B due to $$Q_A$$ with $$Q_B$$ absent. Then we get $$W = -\frac{1}{4\pi\epsilon_0}\frac{Q^2}{r}$$ where r is the distance between $$Q_A$$ and $$Q_B$$. This formula is correct as it follows immediately from the definition of W. So W is actually negative for a system consisting of two point charges Q and -Q.
You are taking limits without sufficient caution. In the first calculation $$\phi_A$$ is the potential relative to infinity and it tends to infinity in the limit. So the result here is undefined.
Also you are not comparing like with like. In the second calculation $$\phi$$ is differently defined: you have introduced the concept of the potential due to only the other charge. If we use instead the potential relative to infinity then again the answer is undefined.