where did the energy come from?

where did the energy come from

A parallel-plate capacitor is charged and then kept connected with a 5V battery.

Then, the plate separation is decreased by a factor of 4, d_new=1/4 d_old,

please type in a number into the box to determine how everything changes.

(If something doesn’t change, please type in 1 to answer X_new= 1 X_old.)

(a) By what fraction does the capacitance change C_new= C_old;

(b) By what fraction does the amount of charge change Q_new= Q_old (When the battery is connected, charges can keep moving and the charge may not stay to be the same.)

(c) By what fraction does the voltage difference between the two plates change V_new= V_old (When the battery is always connected, the voltage difference across the capacitor will be always equal to the battery voltage).

(d) By what fraction does the energy stored in the capacitor change U_new= U_old

Does it make sense Let’s check, considering the amount of charge and the area of the plate,

(e) by what fraction does the amount of charge density change _new= _old

(f) Consider how E is related to the charge density, by what fraction does the E field change E_new= E_old.

Considering how E, d and voltage difference are related, does it make sense now, how E, and d change to keep the voltage difference unchanged

Please explain why the energy stored in the capacitor changes If it increased, where did the energy come from If it decreased, where could the energy go