A rational function is a fraction with polynomials in the numerator and denominator. For example,
are all rational functions of . There is a general technique called "partial fractions'' that, in principle, allows us to integrate any rational function. The algebraic steps in the technique are rather cumbersome if the polynomial in the denominator has degree more than 2, and the technique requires that we factor the denominator, something that is not always possible. However, in practice one does not often run across rational functions with high degree polynomials in the denominator for which one has to find the antiderivative function. So we shall explain how to find the antiderivative of a rational function only when the denominator is a quadratic polynomial .
We should mention a special type of rational function that we already know how to integrate: If the denominator has the form , the substitution will always work. The denominator becomes , and each in the numerator is replaced by , and . While it may be tedious to complete the integration if the numerator has high degree, it is merely a matter of algebra.
Example \( \PageIndex{1}\
Find
Solution
Using the substitution we get
We now proceed to the case in which the denominator is a quadratic polynomial. We can always factor out the coefficient of and put it outside the integral, so we can assume that the denominator has the form . There are three possible cases, depending on how the quadratic factors: either , , or it doesn't factor. We can use the quadratic formula to decide which of these we have, and to factor the quadratic if it is possible.
Example \( \PageIndex{2}\
Determine whether factors, and factor it if possible.
Solution
The quadratic formula tells us that when Since there is no square root of , this quadratic does not factor.
Example \( \PageIndex{3}\
Determine whether factors, and factor it if possible.
Solution
The quadratic formula tells us that when
Therefore
If then we have the special case we have already seen, that can be handled with a substitution. The other two cases require different approaches.
If , we have an integral of the form
where is a polynomial. The first step is to make sure that has degree less than 2.
Example \( \PageIndex{4}\
Rewrite in terms of an integral with a numerator that has degree less than 2.
Solution
To do this we use long division of polynomials to discover that
so
The first integral is easy, so only the second requires some work.
Now consider the following simple algebra of fractions: \[ {A\over x-r}+{B\over x-s}={A(x-s)+B(x-r)\over (x-r)(x-s)}= {(A+B)x-As-Br\over (x-r)(x-s)}. \[ That is, adding two fractions with constant numerator and denominators and produces a fraction with denominator and a polynomial of degree less than 2 for the numerator. We want to reverse this process: starting with a single fraction, we want to write it as a sum of two simpler fractions. An example should make it clear how to proceed.
Example \( \PageIndex{5}\
Evaluate
Solution
We start by writing as the sum of two fractions. We want to end up with
If we go ahead and add the fractions on the right hand side we get
So all we need to do is find and so that , which is to say, we need and . This is a problem you've seen before: solve a system of two equations in two unknowns.
There are many ways to proceed; here's one: If then and so . This is easy to solve for : , and then . Thus
The answer to the original problem is now
Now suppose that does not factor. Again we can use long division to ensure that the numerator has degree less than 2, then we complete the square.
Example \( \PageIndex{6}\
Evaluate
Solution
The quadratic denominator does not factor. We could complete the square and use a trigonometric substitution, but it is simpler to rearrange the integrand:
The first integral is an easy substitution problem, using :
For the second integral we complete the square:
making the integral
Using we get
The final answer is now