Text this: Variational solution of the superconducting Anderson impurity model and the band-edge singularity phenomena