I'm creating a GUI interface for my Python computing class that is supposed to showcase a few types of numerical integration. One of the ones I want to put in as an option is Gauss–Legendre quadrature.
Part of the project is making a visualization of the method. The Newton–Cotes methods are easy to visualize. As well as is Monte Carlo integration. I'm stuck as to how I can visualize Gauss–Legendre quadrature though.
I was thinking about using a Lagrange polynomial fit with nodes at the roots of the Legendre polynomials. Is that the best way to do it?