Programs like Mathematica, Maple, Maxima and many others can compute integrals, differentiate mathematical expressions or do all other sorts of cool stuff. My question is what kind of mathematics do they use to do what they do? To make my question less broad, let's focus on finding closed-form solutions to integration problems.
I think differential Galois theory might be useful, for example. If a CAS wants to solve an integral, it should better check that the integral is expressible in terms of the functions it already knows first. Right? If so, how can differential Galois theory be applied in designing a computer program?
I think a CAS should have a long list of elementary and non-elementary functions with their derivatives and anti-derivates. Then when an integration problem is given, it might first try to apply integration by parts by checking different choices for $u$ and $dv$. Since there seems to be a finite number of possible choices and it can check all of them in a matter of miliseconds, it seems that a brute-force approach using integration by parts equipped with a dictionary of already known functions can solve many problems quickly. Is that how things are done? Or are there cleverer methods that consume less resources and time than simple brute force?
If anyone has experience working at a company developing this kind of tools, please do share your experience (if you wish, of course). Also, if someone knows about a book or resources on how to develop a CAS, please share them. Thanks in advance.