At various points in my life, long division, the unit circle, completing the square, projectile motion, the work-energy balance and most recently, Pulse-Width-Modulation, have all been things that I thought were the coolest thing I would ever learned.
However, in the details of a very unassuming idea in numerical methods, I have learned something way more interesting than anything I’ve ever learned heretofore: second order Gauss Quadrature is third order accurate. What is meant by this? Well consider the equation below
Looks like a pretty rough function to deal with! Integrating it over almost any range would be such a mess, if integrating by hand. But weirdly, the following relationship is true:
All that’s to say that you can find the value of a third order or lower function integrated from -1 to 1 just by summing the original function’s value at -1/sqrt(3) and 1/sqrt(3). It’s a great approximation method using just two points!