lobatto

iadpython.quadrature.lobatto(n, a=-1, b=1)[source]

Return abscissas and weights for Lobatto quadrature.

The definite integral ranges from a to b. The default interval is -1 to 1. The quadrature approximation is just the sum of w_i f(x_i). Both endpoints a and b are include in the list of quadrature abscissas.

The result should be exact when integrating any polynomial of degree 2n-3 or less.

If -a=b, then abscissas will be symmetric about the origin

Parameters:
  • n – number of quadrature points

  • a – lower limit of integral

  • b – upper limit of integral

Returns:

x – array of abscissas of length n w: array of weights of length n