Integration of rational function with quadratic denominator
Template:Specific function class integration strategy
Contents
Reduction
Reduction to the case where the numerator has smaller degree than the denominator
For further information, refer: converting a rational function from improper fraction to mixed fraction form
To get to the situation where the numerator has smaller degree than the denominator, we perform a Euclidean division and hence rewrite the rational function as the sum of a polynomial and a rational function that is in proper fraction form, i.e., the numerator has smaller degree than the denominator. The polynomial summand is integrated termwise using the integration rule for power functions. We are thus reduced to handling the proper fraction. But remember to add back the antiderivative for the polynomial to your final answer!
Reduction to the monic denominator case
If the leading coefficient (i.e., the coefficient on the highest degree term) in the denominator is not 1, the leading coefficient can be pulled out as a constant factor from the denominator and hence out of the integration. We can thus carry out an integration with a leading coefficient of 1 for the denominator polynomial (such a polynomial is termed a monic polynomial). But remember to keep that constant on the outside and multiply it to get your final answer!
Indefinite integration for proper fraction with monic denominator
Summary of cases
We assume that we have performed the reductions outlined above. Thus, We consider an integration of the form:
Note that are arbitrary constants. They may be zero or nonzero.
Sign of discriminant  Qualitative description of case  Antiderivative (we omit the +C for space reasons)  Functions whose linear combination gives antiderivative (depend only on denominator)  Description of new constants in terms of 

positive  denominator has distinct roots factors as 

 
zero  denominator has repeated root factors as 


negative  denominator is of the form with 


Case that the denominator has distinct linear factors
UPSHOT: The antiderivative in this case is expressible as a linear combination with constant coefficients of the natural logarithms of the absolute values of the linear factors.
This falls under the general case of integration of rational function whose denominator has distinct linear factors
The integration formula is:
Note that and can be determined from the quadratic formula for the roots of a quadratic polynomial. Specifically, if the polynomial in the denominator is , we have:
Here are the details of how the formula is obtained:
[SHOW MORE]Case that the denominator has repeated linear factors
UPSHOT: The antiderivative in this case is a constant divided by the linear factor plus a constant times the natural logarithm of the linear factor.
The integration formula is:
If the denominator is of the form , then this case arises iff and we have .
Here's how the formula is obtained: [SHOW MORE]Case that the denominator has negative discriminant
UPSHOT: The antiderivative in this case is a constant times an arc tangent function plus a constant times the natural logarithm of the absolute value of the quadratic.
We have:
Given a denominator in the form , it can be rewritten as where:
Here's how the formula is obtained: [SHOW MORE]
Definite integration
We discuss here only the reduced case that we deal with for the indefinite integration.
Case that the denominator has distinct linear factors
Using the same notation as for the indefinite integration, we have an integration of the form:
The antiderivative is:
where, if the quadratic in the denominator originally is :
The integrand is not defined at the points . In fact, the domain of the function is a union of three separate open intervals: , , and .
A generic antiderivative for the function across all the intervals may have different values for the constant on each interval.
Moreover, we can drop the absolute value signs and be specific about the inputs to the s within each interval:
Interval  Antiderivative on the interval 

The integral can be computed to give a finite numerical value on any interval properly contained completely within one of these intervals. We now address the question of whether we can compute improper integrals, i.e., integrals where one of the limits is one of the values .
The answer is as follows:
 An improper integral extending to will be finite only if . Note that if that were the case, the rational function would not have been in a reduced form, i.e., there would have been a common factor between the numerator and denominator. In fact, in this case, the original rational function would have a removable discontinuity at .
 An improper integral extending to will be finite only if . Note that if that were the case, the rational function would not have been in a reduced form, i.e., there would have been a common factor between the numerator and denominator. In fact, in this case, the original rational function would have a removable discontinuity at .
 An improper integral extending to will be finite only if , so the numerator is constant. This agrees with the degree difference test. For the antiderivative given above, the limiting value at is 0.
 An improper integral extending to will be finite only if , so the numerator is constant. This agrees with the degree difference test. For the antiderivative given above, the limiting value at is 0.
Case that the denominator has repeated linear factors
Using the same notation as for the indefinite integration, we are trying to do the integration:
The antiderivative is:
where is an arbitrary constant. Further, if the denominator was originally , then and .
The domain of the integrand is all real numbers except . Thus, it is a union of the open intervals and . On each of the intervals, we can determine unambiguously the sign of , so we can write the antiderivative more unambiguously:
Interval  Antiderivative on the interval 

Thus, for any interval properly contained completely within one of the two pieces, we can compute the definite integral using the above. We now consider the question of improper integrals, i.e., integrals where one of the endpoints of integration is among :
 is not permissible as an endpoint in any circumstance, i.e., any improper integral ending at will be infinite.
 as an endpoint gives a finite integral iff . This agrees with the degree difference test. The limit of the antiderivative above at is 0.
 as an endpoint gives a finite integral iff . This agrees with the degree difference test. The limit of the antiderivative above at is 0.
Case that the denominator has negative discriminant
We are trying to do the integration:
The antiderivative is:
Given a denominator in the form , it can be rewritten as where:
The integrand, and also its antiderivative, are defined for all real numbers. In particular, it makes sense to take the definite integral over any finite interval and get a finite answer. We now consider the improper integrals:
 is permissible as an endpoint for integration iff . This agrees with the degree difference test. In that case, the limit of the antiderivative above is .
 is permissible as an endpoint for integration iff . This agrees with the degree difference test. In that case, the limit of the antiderivative above is .
In particular, if , we can integrate the function over the entire real line and get a finite answer. That answer is .
Examples
Reduced case examples
Consider the integration problem:
Here's how we would do it directly in terms of the formula: [SHOW MORE] Alternatively, instead of directly using the formula, we can retrace the steps of its derivation to obtain the antiderivative: [SHOW MORE]
Partial fractions and linear algebra interpretation
Reduced form case
Fill this in later  something goes in here about the choice of basis functions for partial functions, corresponding antiderivatives, dealing with twodimensional vector space in all three cases, but the choice of basis functions we use differs in the different cases.
General case
Fill this in later  something about the answer being a polynomial + something for the reduced form case.
Repeated antidifferentiation
The strategies used above can be applied to calculate higher antiderivatives of rational functions with quadratic denominator. The key idea, which is used to prove the more general observation that rational functions can be repeatedly integrated within elementarily expressible functions, is the following corollary of integration by parts, obtained by taking 1 as the part to integrate in the left side outer integration:
The key thing to note here is that since has a quadratic denominator, so does . In particular:
Integrating twice Integrating both and , both of which are rational functions with quadratic denominator.
Similarly,
Integrating times Integrating the rational functions
In particular, what this means is that the generic expression for the antiderivative is a polynomial plus a linear combination of the two antiderivative basis functions that depend only on the denominator.
Variational analysis
Consider an integration of the form:
where and are fixed real numbers independent of . Now, suppose we choose to vary one of the four numbers keeping the others fixed. Then, the value of the resulting definite integral becomes a function of the one variable that we are changing.