/** * Gauss-Legendre quadrature nodes and weights. * * `rootsLegendre(n)` finds the n roots of the degree-n Legendre polynomial * P_n via Newton's method (initial guess from the standard asymptotic * approximation), then derives the corresponding quadrature weights. This is * the classical fixed-node table underlying Gauss-Legendre quadrature on * [-1, 1]; callers needing a custom node count (rather than the library's * built-in fixed-order `integrate`/`gaussLegendre` routines) use this * directly. * * @packageDocumentation */ /** Result of {@link rootsLegendre}: nodes ascending on [-1, 1] with matching weights. */ export interface RootsLegendreResult { nodes: number[]; weights: number[]; } /** * n-point Gauss-Legendre quadrature nodes and weights on [-1, 1]. * * Nodes are the roots of the degree-n Legendre polynomial P_n, refined by * Newton's method from the standard asymptotic initial guess * `cos(pi*(i+0.75)/(n+0.5))`. Weights are `2 / ((1-x_i^2) * P'_n(x_i)^2)`. * * @param n - Number of quadrature points (positive integer) * @returns Nodes (ascending) and matching weights * * @example * rootsLegendre(3) * // { nodes: [-0.7745966692, 0, 0.7745966692], * // weights: [0.5555555556, 0.8888888889, 0.5555555556] } */ export declare function rootsLegendre(n: number): RootsLegendreResult; //# sourceMappingURL=gauss-nodes.d.ts.map