[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] qags, qagp, and qawc

From: Brian Gough
Subject: Re: [Help-gsl] qags, qagp, and qawc
Date: Thu, 15 Apr 2004 20:00:44 +0100

Nicolas Bock writes:
 > I tried to integrate 1/(x - x_0) with different limits, a and b, with 
 > qags, qagp, and qawc. Only qawc produced the correct answer for 
 > different choices of a and b, whereas qags and qagp sometimes worked 
 > and sometimes didn't. From the description of qags and qagp it wasn't 
 > quite clear to me if that's something to be expected or not. Should 
 > qags and qagp be able to integrate this type of singularity?


Hmmm... this singularity is not actually integrable, so QAGS and QAGP
are not suitable.  Only integrable singularities are supported by
them.  One can calculate the Cauchy principal value as a limit from
opposite sides of the singularity with QAWC though.

 > In another test I tried the integral 1 / (x - x_0)^2 and found to my 
 > surprise that qawc does not produce the right answer this time. Is it 
 > not able to handle singularities of higher order?

QAWC only handles Cauchy principal values of 1/(x-x_0) integrals so it
will not work for any other case.  I'm not sure what answer would be
expected for a 1/(x-x^0)^2 integral, except infinity, since it is a
purely positive singularity.

See the original QUADPACK book in the references for more details.

Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]