"Adaptive Simpson's method uses an estimate of the error we get from calculating a definite integral using Simpson's rule. If the error exceeds a user-specified tolerance, the algorithm calls for subdividing the interval of integration in two and applying adaptive Simpson's method to each subinterval in a recursive manner."
This algorithm was written on CoCalc using Sage; it was a project for my Numerical Analysis class in Winter 2022. Disclaimer: The version of Python this was written in is no longer current.