Step 1: Finding initial and final energy forced
Let ui and uf be initial energy stored in capacitance.
∴ui=12CV21
=12×10μF×(2V)2
=20μJ
Also,
uf=12×C×V22
=12×10μF×(4V)2
=80μJ
ΔU=uf−ui=60μJ
Step 2: Work done by cell
Let q1 and q2 be charge on capacitor when 2V and 4V battery is connected respectively
q1=CV
=10μF×2V
=20μC
q2=CV
=10μF×4V
=40μC
Charge flow through final cell of 4 V, Δq2=20μc from +ve terminal of cell to +ve plate
Work done by cell, Wcell=Δq×V=
20×4=80μJ
4 energy draw form the cell =20μc×4V=80μJ
Step 3: Heat produced
We have the relation
Wcell=ΔU+Heat
4 Heat produced =Wcell−ΔU
=(80−60)μJ
=20μJ
Hence correct option is (B).