T>T: The First Solution is Rarely the Best: A Lesson in Numerical Integration

If you spend enough time developing scientific software, you eventually learn that the first solution to a problem is rarely the best one. Science, and the code we write to execute it, is a continual learning process which is one of the things I love most about the field. I have been repeatedly guilty of brute-forcing a mathematical derivation to prove it can be done, only to realise later that...