Description of the magnetic anisotropy energy using an expansion in terms of symmetrical polynomials