Solution of the Gap Equation for a Superconductor