A question in the energy of a capacitor

1. Apr 7, 2013

ehabmozart

The energy stored in a capacitor is defined as the amount of work required to charge it. Can anyone clarify to me who does this work? It sure must be opposite to the electric field. In the derivation why is it ∫ v dq ... I don't get this integral. Why isn't it negative?? Thanks!

2. Apr 7, 2013

Staff: Mentor

Why do you think it should be negative?

3. Apr 7, 2013

dreamLord

The battery is doing work. Vdq is the infinitesimally small amount of energy dU stored.

4. Apr 7, 2013

ehabmozart

So is it because potential energy is the work done by an external force?.. I think I got it.. But why is it V dq and not for example Q dv?

5. Apr 7, 2013

ehabmozart

Why don't we make something like integral of dq*dv ???

6. Apr 7, 2013

BruceW

Here's my understanding of it: We have for the voltage across a capacitor:
$$V = \frac{q}{c}$$
And the equation for the power being spent, being turned into energy (stored in the capacitor) is:
$$P = IV$$
Now, integrate both sides with respect to time, on the left hand side we get the energy stored in the capacitor, and on the right hand side, we get:
$$\int V I dt$$
and since I = dq/dt that means our equation equals:
$$\int V dq$$
You could instead write Q dV But usually in problems, we are told what the final charge on the capacitor is, so we want our limits to involve charge, not voltage.