[SciPy-User] Gauss-Lobatto quadrature in scipy
Wed Jul 21 10:17:58 CDT 2010
On 21 July 2010 07:33, Daniel Platz <firstname.lastname@example.org> wrote:
> 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
> SciPy-User mailing list
More information about the SciPy-User