pub fn roots_legendre(n: usize) -> (Vec<f64>, Vec<f64>)Expand description
Gauss-Legendre quadrature
Corresponds to scipy.special.roots_legendre.
The nodes are the roots of the Legendre polynomial $P_n$, and the rule is exact for polynomials of degree $2n - 1$ on $[-1, 1]$ (A&S 22.2.10).
§Panics
- if
nis zero
§See also
eval_legendre: Evaluate Legendre polynomials, $P_n$