Derivation and application of the boson method in superconductivity