[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 <
mail.to.daniel.platz@googlemail.com> wrote:

> 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?
>
> I would be very glad about a short answer.
>
>
The substitution y^2 = A - x in the second form will eliminate the
singularity.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111124/7bd314ea/attachment-0001.html 


More information about the SciPy-User mailing list