Energy Stored in a Capacitor

When you put positive charges onto a conductor, you're confining them to a small space when they really want to get as far apart as possible. This takes work, and that means that a charged capacitor contains energy-- electrical potential energy, to be precise. The first charge is easy to add, because the conductor is neutral. That charge increases the potential of the conductor to be a little higher, so that the next charge has to move uphill a little bit, and work is required. With each charge, the "hill" gets higher and higher, and the next charge requires more and more work to move it onto the conductor.

Let's make that a little more precise. Suppose we start with an uncharged conductor with capacitance C, and start moving little bits of charge dq onto it. Each little bit of charge requires energy dP to get it onto the sphere, which is a function of how much charge q is on the sphere at that moment. That energy is added to the potential energy of the conductor, so the total energy stored inside is $$P=\int\,dP$$ What is \(dP\)? If the conductor has charge \(q\), then its potential is \(V=V_\infty+{q\over C}\) according to the definition of capacitance. As we move a charge \(dq\) from far away onto the sphere, we have to move it up a potential \(\Delta V=V-V_\infty\) (from infinity to the sphere), and that takes work $$dP=dq\,(V-V_\infty)=dq\,{q\over C}$$ and so the total energy in the sphere is $$P=\int\,dP=\int_0^Q {q\,dq\over C}$$ Note that the integration variable is \(q\), which is rather unusual. I'm summing over every bit of charge added to the conductor. This ranges from 0 (when the conductor is neutral) to some final value \(Q\). Doing the integral gives us $$P={Q^2\over 2C}$$ which is the energy stored in a capacitor containing charge \(Q\). We can also write this in terms of potential instead of charge. Since \(Q=C\Delta V\), we substitute it into the above formula to get $$P={1\over2}C(\Delta V)^2$$

A sphere with a radius of 0.5 meters contains \(3\u{\mu C}\) of charge. How much potential energy does the sphere contain?
The capacitance of a sphere is \(C=R/k\), so in this case $$C={0.5\u{m}\over 9\ten9\u{m/F}}=5.6\ten{-11}\u{F}$$ We can calculate the energy directly from the charge and the capacitance: $$P={Q^2\over 2C}={(3\ten{-6}\u{C})^2\over 2(5.6\ten{-11}\u{F})}=0.08\u{J}$$ We could also calculate the potential energy by first finding the potential difference between the sphere and infinity: $$\Dl V={Q\over C}={3\ten{-6}\u{C}\over 5.6\ten{-11}\u{F}}=5.36\ten4\u{V}$$ and then calculating the potential energy from that: $$P=\frc2C(\Dl V)^2=\frc2(5.6\ten{-11})(5.36\ten4\u{V})^2=0.08\u{J}$$ which is the same result.
Suppose the sphere expands so that its radius is 0.6 meters and the charge on the sphere remains the same. What happens to the potential energy?

Let's think about this first: if the sphere expands, the charges get to spread out a little bit more, which is what they want to do. Thus the potential energy should decrease.

The capacitance of a sphere expands as it grows. $$C={0.6\u{m}\over 9\ten9\u{m/F}}=6.7\ten{-11}\u{F}$$ From the formula $$P={Q^2\over 2C}$$ the charge stays the same and the capacitance gets bigger, and so the potential energy gets smaller:

$$P={(3\ten{-6}\u{C})^2\over 2(6.7\ten{-11}\u{F})}=0.067\u{J}$$

Now consider the formula $$P=\frc2C(\Dl V)^2$$ The capacitance does increase. However, the potential difference of the sphere is $$\Dl V={Q\over C}={3\ten{-6}\u{C}\over 6.7\ten{-11}\u{F}}=4.48\ten4\u{V}$$ which is smaller: the decrease in the potential difference offsets the increase in the capacitance, so that the potential energy decreases: $$P=\frc2(6.7\ten{-11}\u{F})(4.48\ten4\u{V})^2=0.067\u{J}$$