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

Charles R Harris charlesr.harris@gmail....
Thu Nov 24 08:48:58 CST 2011

On Thu, Nov 24, 2011 at 7:16 AM, Daniel Platz <

> Hi,
>
> I am stuck with a problem in scipy. I want to numerically integrate a
> function with a square root like singularity at one end of the
> integration interval. The integral has the form
>
> \int_{0}^{1} f(x) * x / sqrt(1-x**2) dx
>
> or alternatively
>
> \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.
>
> Alternatively, I was wondering if I can implement a Chebyshev–Gauss
> quadrature myself to lift the singularity? Or is there a way to do
> this elegantly using scipy?
>