Solenoid magnetic field energy

$$W = \frac{\mu\cdot \mu0\cdot H^{2}\cdot S\cdot l}{2}$$
Find   It is known that:
      =