[SciPy-User] numerical integration with square root like singularity

Pauli Virtanen pav@iki...
Thu Nov 24 08:25:27 CST 2011

24.11.2011 15:16, Daniel Platz kirjoitti:
> \int_{0}^{A} f(x) / sqrt(A-x) dx.
> Can the quad function in scipy deal with this kind of singularity. I
> tried to use the points argument of the quad function but I still get
> warning messages and do not know how much I can trust the results.

Yes, `quad` supports weight functions of this form (see its `weight` and
`wvar` arguments). Run


to find what to specify as these arguments

Pauli Virtanen

More information about the SciPy-User mailing list