My work this week isn’t very interesting, even insomuch as my work any week is interesting, so this week I have elected to start a series of blog posts about the Risch Algorithm in general. I will start out with the basics in this post.
Anyone who has taken Calculus knows a handful of heuristics to calculate integrals. u-substitution, partial fractions, integration by parts, trigonometric substitution, and table integration are a few of the more popular ones. These are general enough to work for most integrals that are encountered in problems in Physics, Engineering, and so on, as well as most of those generated by solving differential equations from the same fields. But these fall short in a couple of ways. First off, they are just heuristics. If they fail, it does not mean that no integral exists. This means that they are useless for proving that certain functions, such as do not have integrals, no matter how hard you try to find them. Second, they work for only relatively simple functions. For example, suppose you have a rational function in and . An example would be . We are not interested in integrating this function, but rather in finding it back given its derivative, . The only method I named above that would come even close to being applicable to this integrand is partial fractions. This requires multivariate partial fraction decomposition (with respect to and ), and gives , which brings us no closer to a solution.
The reason that I started with a function and then computed its derivative was to show how easy it is to come up with a very complicated function that has an elementary anti-derivative. Therefore, we see that the methods from calculus are not the ones to use if we want an integration algorithm that is complete. The Risch Integration Algorithm is based on a completely different approach. At its core lies Liouville’s Theorem, which gives us the form of any elementary anti-derivative. (I wish to point out at this point that heuristics like this are still useful in a computer algebra system such as SymPy as fast preprocessors to the full integration algorithm).
The Risch Algorithm works by doing polynomial manipulations on the integrand, which is entirely deterministic (non-heuristic), and gives us the power of all the theorems of algebra, allowing us to actually prove that anti-derivatives cannot exist when they don’t. To start off, we have to look at derivations. As I said, everything with the Risch Algorithm is looked at algebraically (as opposed to analytically). The first thing to look at is the derivative itself. We define a derivation as any function on a ring that satisfies two properties:
1. (Sum Rule),
2. (Product Rule)
for any . Furthermore, define the set of constant elements as . From just these two rules, you can prove all the rules from calculus such as the power rule and the quotient rule. Defining things algebraically lets us avoid analytic problems, such as discontinuities and the need to prove convergence all the time. Another problem from analysis is the multivalue nature of certain functions, namely the natural logarithm. We get around this by defining as the unique function satisfying , for . From this definition we can prove the famous logarithmic identities and for logarithmic derivatives, again using only the two rules for a derivation given above. For example, .
The above definition for the natural logarithm gives the first insight into how the integration algorithm works. We define transcendental functions in terms of their derivatives. So if , then . We can define all of the trigonometric functions in terms of and if we use , but we can also avoid this. For example, if , then because .
We say that is a monomial over the field with respect to a derivation if it satisfies
1. is transcendental over ,
The first condition is necessary because the we are only going to deal with the trancenental version of the Risch Algorithm (the algebraic case is solved too, but the solution method is quite different, and I am not implementing it this summer). The second condition just says that the derivative of t is a polynomial in t and a rational function in x. The functions I mentioned above all satisfy these properties for . Theorems in analysis show that , , and are all transcendental over . This is actually the only use of analysis that we make in the integration algorithm. Also, we see that if , , and , then , , and , which are all polynomials in their respective and rational functions in . In the algorithm, is actually a tower of monomial extensions of , so is a monomial over . This allows us to work with functions like . We can’t make directly because is not a polynomial in (it also contains ) . But if we let be such that , i.e., , then we can let be such that , i.e., . Remember that the are all “functions” of x, but there is no need to write as long as we remember that , i.e., . This is another advantage of using algebraic over analytic methods; it allows us to reduce an integral down to a rational function in the “symbols” and . By convention, we make the first extension such that , i.e., . I will just call it here instead of , to avoid confusion.
This is the preparsing that I alluded to in an earlier post that I have not implemented yet. The reason that I haven’t implemented it yet is not just because I haven’t gotten around to it. We have to be careful when we build up the extension that each element is indeed transcendental over the already built-up field . For example, although it appears transcendental, the function is really algebraic because it equals . There are additional requirements, such that each extension is not the derivative of logarithmic derivative of an element of (see also the example I gave in the previous post). This is the part that I was talking about in my previous post that is not written out as much as the other algorithms in Bronstein’s book. So this is algorithmically solved, just like the rest of the Algorithm, but it is non-trivial and may end up being the hardest part of the algorithm for me to implement, just because it will probably require the most figuring out on my part.
So we can see that we can convert a transcendental integral, such as the one above, into a rational function in x and monomial extensions . For example, the above integrand would become . We then perform certain polynomial manipulations on this integrand, using the fact that and . For the transcendental case of the Risch Algorithm, this is similar to the rational function integration that I outlined in this post, and has Liouville’s Theorem at its core. This is where I will start off next time.