Solution (source code)

= Solution

Put $s=e^{-R\Delta t/L}$ and $J=V/R$, with $0<s<1$. The first interval leaves <electric current> $I_1=sI_0$. Position B reconnects the <battery>, so the driven <RL circuit> obeys $L\dot I+RI=V$. Multiplication by the <integrating factor> $e^{Rt/L}$, or subtraction of the constant solution $J$, gives
$$
I(t)=J+(sI_0-J)e^{-R(t-\Delta t)/L},\qquad \Delta t<t<2\Delta t.
$$
Consequently
$$
\boxed{I_2=s^2I_0+J(1-s).}
$$
The same two intervals give the <recurrence relation> $I_{2n+2}=s^2I_{2n}+J(1-s)$. Its <fixed point> is $I_*=J/(1+s)$. Subtracting this <fixed point> makes the <recurrence relation> homogeneous:
$$
I_{2n}-I_*=s^{2n}(I_0-I_*),\qquad
\boxed{\lim_{n\to\infty}I_{2n}=\frac{V/R}{1+e^{-R\Delta t/L}}.}
$$
This is the upper endpoint of the eventual <periodically switched RL circuit> response, immediately before switching from B to A. The lower endpoint is $sJ/(1+s)$. Their sum is $J$, consistent with equal charging and discharging intervals.