Well, we have for an inductor:
$$\text{U}_\text{L}\left(t\right)=\text{L}\cdot\text{I}'_\text{L}\left(t\right)\tag1$$
Now, for the energy we have:
$$\text{E}_\text{L}\left(t\right)=\int\text{P}_\text{L}\left(t\right)\space\text{d}t=\int\text{U}_\text{L}\left(t\right)\cdot\text{I}_\text{L}\left(t\right)\space\text{d}t=\int\text{L}\cdot\text{I}'_\text{L}\left(t\right)\cdot\text{I}_\text{L}\left(t\right)\space\text{d}t\tag2$$
Now, substitute $\text{u}=\text{I}_\text{L}\left(t\right)$:
$$\int\text{L}\cdot\text{I}'_\text{L}\left(t\right)\cdot\text{I}_\text{L}\left(t\right)\space\text{d}t=\text{L}\int\text{u}\space\text{d}\text{u}=\text{L}\cdot\frac{\text{u}^2}{2}+\text{K}=\text{L}\cdot\frac{\text{I}_\text{L}\left(t\right)^2}{2}+\text{K}\tag3$$