Solution (source code)

= Solution

During switch-on, the <Joule heating> in $R_2$ has instantaneous <power> $P_2=R_2[V_0/(R_1+R_2)]^2e^{-2t/\tau}$. Integrating the finite transient gives
$$
Q_{2,\rm on}=\int_0^\infty P_2\,dt
=\frac{R_2V_0^2}{(R_1+R_2)^2}\frac\tau2
=\boxed{\frac{LV_0^2}{2R_1(R_1+R_2)}=3.59\times10^{-3}\,\mathrm J.}
$$
Although the source continues supplying <power> to $R_1$ indefinitely, $R_2$ is eventually shorted and its heat integral converges. It would be incorrect to identify this heat with the final stored <magnetic energy>, because the source and $R_1$ also participate during switch-on.