[SciPy-User] Gauss-Lobatto quadrature in scipy

Anne Archibald aarchiba@physics.mcgill...
Wed Jul 21 10:17:58 CDT 2010

On 21 July 2010 07:33, Daniel Platz <mail.to.daniel.platz@googlemail.com> wrote:
> Hi!
> I am new to numerical integration in scipy. Is there a Gauss-Lobatto
> quadrature available. In matlab this would be the function "quadl". If
> there is not, is there a way to quickly implement this using one of
> the other integration functions?

scipy.integrate.fixed_quad does Gauss-Lobatto with a fixed order, and
scipy.integrate.quadrature is adaptive, with a fixed tolerance. Both
use Legendre roots.

If these aren't flexible enough, scipy.special provides a variety of
tools for working with orthogonal polynomials. Be careful though, as
in older versions of scipy become numerically unstable at high (>~20)
orders. Newer scipy versions include, I think, some specialized code
to evaluate roots and weights more stably. But if you need high orders
I recommend you test for numerical accuracy yourself.


> Thanks in advance
> Daniel
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-User mailing list