Solution (source code)

= Solution

The quoted <capacitance> is that of the filled <parallel-plate capacitor>, $C_i=1.0\times10^{-6}\ \mathrm F$. Disconnecting the source imposes <charge conservation> on the isolated plates:
$$
Q=C_iV_i=(1.0\times10^{-6})(2500)=2.50\times10^{-3}\ \mathrm C.
$$
On removing the <dielectric>, the <capacitance> falls by its <relative permittivity>, so $C_f=C_i/5=2.0\times10^{-7}\ \mathrm F$. The <capacitor energy> at fixed <electric charge> is $U=Q^2/(2C)$. Therefore
$$
U_i=\frac12C_iV_i^2=3.125\ \mathrm J,\qquad
U_f=\frac{Q^2}{2C_f}=5U_i=15.625\ \mathrm J,
$$
and
$$
\boxed{\Delta U=U_f-U_i=+12.5\ \mathrm J.}
$$
The increase is supplied by the external <work> needed to withdraw the <dielectric> against its attraction into the <electric field>, in the lossless quasistatic limit. The final <electric potential difference> is $Q/C_f=12500\ \mathrm V$, not the original charging value.