How to Use
Select integration:
- f(x): Choose function
- n: Number of points
- [a,b]: Bounds (mapped from [-1,1])
Why These Nodes?
Legendre polynomial roots are optimal: they minimize the integration error. Unlike equally-spaced points, they cluster near endpoints, reducing Runge phenomenon.
Accuracy
n points → exact for degree 2n−1. 3 points match degree-5 polynomials. 5 points match degree-9. Exponential convergence for analytic functions.
Step-by-Step Instructions
- 1Select a function.
- 2Choose n (points).
- 3Set bounds [a,b].
- 4View nodes and weights.
- 5Compare with exact.