The physics
A coil opposes any change in its current. So when a switch closes, the current cannot jump. It grows smoothly towards E/R.
i = (E/R)(1 − e−t/τ) τ = L/R
The time constant τ sets the pace. After one τ the current covers 63% of the way. Half-way comes at τ ln 2.
Cut out the cell, and the coil keeps the current going through the resistor. The current dies away.
i = i₀ e−t/τ
Just after closing, a coil acts like an open gap. After a long time it is only its own resistance.
The work done against the coil's emf goes into its magnetic field. Energy flows in fastest at half the final current.
U = ½ L i² Pmax = E²/4R