Suppose we have a L-R circuit with an inductor of inductance $L$ and resistance $R$ and emf $\epsilon$. Now initially when the switch is closed no current is present. Let the maximum current be $I\_{max}$ then the Energy stored in the inductor after sufficient time is $U=\frac{1}{2}L{I\_{max}}^2$. It is also clear that the *magnitude* of work done by the **battery** on the inductor and the **magnetic field** are both equal to $U$.

But I don’t know which of the two does 'positive' and which does 'negative work' Also is power supplied or delivered to/from an inductor when current through inductor increases?