# How is Integrate Implemented? [duplicate]

At the end of this 90 minute lecture by Stephen Wolfram on the history of the development of Mathematica, Wolfram takes questions from the audience. One of those questions asked how the Integrate[] function chooses the method to compute the integral, whether substitution, integration-by-parts, and so on.

Stephen Wolfram answered "None of those". He then went on to briefly mention a higher level method and I did not quite understand the name of the method nor the way this does Integration. But, it was an all too brief answer.

Does anyone know what the details are on the methods employed by Mathematica to do this integration operation. Wolfram also mentioned that the methods displayed in the "step-by-step" details is a "complete fake" (his words), invented purely for pedagogical reasons. Wolfram also mentioned that the problem of converting the answer to the Integrate function into something meaningful and useful to the user was the bigger part of the problem.

## marked as duplicate by Szabolcs, J. M. will be back soon♦Jul 4 '16 at 18:09

• A related question. – J. M. will be back soon Jul 4 '16 at 17:17
• And see here too: dl.acm.org/… – Szabolcs Jul 4 '16 at 17:27
• Thanks for the links -- I did search for a preexisting answer but did not find one. Searched on "Integrate methods" and a few other things. I did not use the term "implementation" though. – K7PEH Jul 4 '16 at 18:30
• The short answer is that most functions you know are special cases of the Meijer $G$ and generalized hypergeometric $_pF_q$ functions, which generally integrate to some other variant of themselves. Typically if you start with a simple integrand the corresponding $G$ / $_pF_q$ function will have a lot of structure, and the integration will respect most of that structure, which means there's a high chance that you're still on a pretty special case of the $G$ / $_pF_q$ function that you can represent using simpler functions. The challenge is finding that representation. – Emilio Pisanty Jul 5 '16 at 0:52
• You also probably mean "complete fake" instead of "total crock" if you want to attribute an exact quote to Wolfram. – Emilio Pisanty Jul 5 '16 at 0:56

I am definitely not an expert in this field, but I believe that some part of Integrate uses Risch's algorithm. And that, to my understanding, is also the reason why it's not easy to show the "steps" Integrate takes to solve an integral. The intermediate "steps" are not meaningful to most humans. Some more references are in the page "Some Notes On Internal Implementation" in the "Differentiation and Integration" section.