Consider the below arrangement of the electrical circuit.
The energy in IF capacitor is calculated as, E1‌‌=‌
1
2
CV2 ‌‌=‌
1
2
C(‌
Q
C
)2 ‌‌=‌
1
2
‌
Q2
C
‌‌=‌
1
2
×‌
42
1
‌‌=8J Similarly, E2‌‌=‌
1
2
‌
Q2
C
‌‌=‌
22
2×2
‌‌=1J The total energy is calculated as, E0=E1+E2 =8+1 =9J The common potential of the capacitors is calculated as, V‌common‌‌‌=‌
C1V1+C2V2
C1+C2
‌‌=‌
1×4+2×1
1+2
‌‌=‌
6
3
‌‌=2V For the new arrangement of the circuit the energy is calculated as E1‌‌=‌
1
2
C1Vcommon2 ‌‌=‌
1
2
×1×4 ‌‌=2J Similarly, E2‌‌=‌
1
2
C2V‌common ‌2 ‌‌=‌
1
2
×2×4 ‌‌=4J From the conservation of the energy, the energy stored in the inductor is calculated as, EL‌‌=E0−(E1+E2) ‌‌=9−(2+4) ‌‌=3J