Solenoid magnetic field energy

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