Solenoid magnetic field energy

$$W = \frac{L\cdot I^{2}}{2}$$
Find   It is known that:
      =