How does the capacitor energy storage formula come from