Use cquad instead of qags as integration procedure.

QAGS is meant to be used when encountering known singularities.
CQUAD is a better general purpose integrator.