Hacker News new | ask | show | jobs
by mroll 3730 days ago
I'm not sure what method this system uses for definite integration, but it is likely one of Simpsons, Gaussian, and Clenshaw-Curtis. These are numerical methods that, for the best accuracy, require lots of steps of evaluation. Depending on the error bounds you want, it could take a while.

Edit: also the nonlinear square root term may cause difficulty.

People might find this interesting: Maple uses Clenshaw Curtis as the default, but will switch dynamically to Gaussian if singularities are detected.

1 comments

This would be relevant to numerical integration.

However, as it gives as answer some multiple of pi, it must've performed symbolic integration, which also suits the general design of the library better. There are some methods for performing symbolic integration but often trial and error with lookup tables and tricks (substitution etc) is faster.

Yeah, actually using the Risch algorithm is usually a last resort in a lot of CAS' because it's fairly intensive and also will often produce answers in a form very different from what a human would give. It's also famously difficult to implement, so if this library is using it without a thick layer of tricks and heuristics then that's probably where the slowness comes from.