As others mentioned there is an algorithm by Risch. It does nothing really new, it combines the standard techniques you may have already seen: linearity, integration by parts, substitution, partial fraction decomposition. The real trick is that it automates integration to become an algorithm, so at each step the computer really knows what is the best step to take next.
However, there are multiple caveats:
1. The algorithm can only deal with _elementary_ functions: what you get from constants, identity (x→x), composition, +, -, ·, /, exponentiation, logarithm, and if so desired certain inverses of polynomial functions (never saw someone actually use those). Those include √, sin, cos, tan, their inverses and much more. The modulus function |x| however is not one of them. If one also allows it, then we have definitive proof that no algorithm as Risch’s can exist at all!
2. The algorithm needs a way to check if two elementary expressions describe the same function within their scope. For example, e^^log(x)/2 is the same as √x for positive x. But we do not yet know if there actually is an algorithm doing this! We can plug in a lot of different values and check numerically, but that is not a definite method, we could just have been unlucky and missed that they are indeed different at x=√7. It is quite possible that such an algorithm does truly not exist, but we don’t know that either.
3. The algorithm will terminate, but not every elementary function has an elementary antiderivative. Famous examples are x^^x and e^^-x² . But the algorithm is quite fine, it will tell you if there is no such elementary antiderivative, and tell you one if it exists.
Latest Answers