From a Rational Function to a Definite Integral
A rational integrand can contain several kinds of denominator factors at once: repeated linear factors, irreducible quadratic factors, and powers of those quadratics. If the numerator has degree at least as large as the denominator, polynomial division is needed before partial fractions. After that, the integral is handled term by term.
The work has two distinct checks. First, recombine the partial fractions to confirm that they equal the original rational function. Then differentiate the antiderivative and check that it returns the integrand. These checks are especially useful when logarithms and inverse tangents both occur in the final value.
The Mixed-Factor Setup
For a repeated linear factor \((x-a)^m\), the partial-fraction terms have the form \(A_j/(x-a)^j\), for \(j=1,\ldots,m\). For a repeated irreducible quadratic \((x^2+px+q)^n\), the terms have the form \((B_jx+C_j)/(x^2+px+q)^j\), for \(j=1,\ldots,n\). The numerator over each quadratic has degree less than two. When factors of both kinds occur, include the terms required by every factor and power.
Once the rational function is expressed as a polynomial and these partial fractions, integrate each term. Polynomial terms use the power rule. Linear-factor terms yield logarithms or rational functions, depending on the power. Quadratic terms can yield logarithms, inverse tangents, or rational functions. The interval also matters: a definite integral can be evaluated by an antiderivative only when the integrand is continuous throughout the interval. In these examples, the intervals contain no denominator zeros.
Worked Examples
Worked Example: A Linear Factor and a Repeated Quadratic
Evaluate \(\displaystyle \int_0^1 \frac{1}{(x+2)(x^2+1)^2}\,dx\). There are no real zeros of \(x^2+1\), and \(x+2\) is nonzero on \([0,1]\), so the integrand is continuous there.
Use the decomposition form for one linear factor and a quadratic repeated twice:
Multiplying through by the denominator gives the polynomial identity
Setting \(x=-2\) gives \(1=25A\), so \(A=1/25\). Comparing the coefficients of \(x^4\) and \(x^3\) gives \(A+B=0\) and \(2B+C=0\). Thus \(B=-1/25\) and \(C=2/25\). The \(x^2\) coefficient gives \(2A+B+2C+D=0\), so \(D=-1/5\). The \(x\) coefficient gives \(2B+C+2D+E=0\), so \(E=2/5\). The constant check is \(A+2C+2E=1/25+4/25+4/5=1\).
Integrating the resulting terms gives
For example, the two inverse-tangent contributions are \((2/25)\arctan x\) from the simple quadratic term and \((1/5)\arctan x\) from the repeated-quadratic term; together they give \(7/25\). At the endpoints,
Therefore,
To check the calculation, differentiating the displayed \(F(x)\) gives the original partial-fraction expression, which recombines to \(1/((x+2)(x^2+1)^2)\). The endpoint subtraction includes \(7\pi/100\); both inverse-tangent contributions are included.
Worked Example: Division Before Mixed Partial Fractions
Evaluate \(\displaystyle \int_0^{1/2}\frac{x^4+x^3-x^2-x+2}{(x-1)^2(x^2+1)}\,dx\). The denominator has degree four and the numerator also has degree four, so divide first. Expanding the denominator gives
Subtracting this from the numerator leaves \(3x^3-3x^2+x+1\). Hence the quotient is \(1\), and the proper remainder fraction is \((3x^3-3x^2+x+1)/((x-1)^2(x^2+1))\).
For that remainder, use the form \(A/(x-1)+(Bx+C)/(x^2+1)+D/(x-1)^2\). The decomposition is
Recombining confirms the numerator: the three terms contribute \((x-1)(x^2+1)\), \((2x+1)(x-1)^2\), and \(x^2+1\), respectively. Their sum is \(3x^3-3x^2+x+1\). Including the quotient, the original integrand is therefore \(1\) plus the displayed partial fractions.
An antiderivative is
At \(x=1/2\), the five terms are \(1/2\), \(\ln(1/2)\), \(\ln(5/4)\), \(\arctan(1/2)\), and \(2\). At \(x=0\), they are \(0\), \(0\), \(0\), \(0\), and \(1\), respectively. Thus
The denominator is nonzero on \([0,1/2]\), since \(x=1\) is outside the interval and \(x^2+1>0\). Differentiating \(F\) gives \(1+1/(x-1)+(2x+1)/(x^2+1)+1/(x-1)^2\), the quotient-plus-partial-fractions expression above. This checks the antiderivative as well as the endpoint evaluation.
Worked Example: Repeated Linear and Quadratic Factors Together
Evaluate \(\displaystyle \int_0^1 \frac{1}{(x+1)(x^2+1)^2}\,dx\). The denominator is nonzero on the interval. Take the decomposition form
After multiplying through, set \(x=-1\) to obtain \(1=4A\), so \(A=1/4\). Comparing coefficients in the identity gives \(A+B=0\), \(2A+B+C+D=0\), \(B+C+D+E=0\), and \(A+C+E=1\). Solving in order yields \(B=-1/4\), \(C=1/4\), \(D=-1/2\), and \(E=1/2\). The constant equation checks: \(1/4+1/4+1/2=1\).
Integrating each part gives the antiderivative
At \(x=1\), the logarithmic contribution is \(\ln 2/8\), the inverse-tangent contribution is \(\pi/8\), and the two rational contributions sum to \(1/8+1/8=1/4\). At \(x=0\), the logarithms and inverse tangent vanish, and the rational contribution is \(1/4\). The rational endpoint contributions therefore cancel, giving
As a check, differentiating \(F\) recovers \(1/(4(x+1))+(-x/4+1/4)/(x^2+1)+(-x/2+1/2)/(x^2+1)^2\). The coefficient identity ensures this expression recombines to the original integrand. Notice that the rational endpoint terms cancel here; that cancellation is specific to this example, not a general rule.
Why the Procedure Works
The essential justification is that a valid partial-fraction decomposition is an identity of functions wherever its denominators are nonzero. Integrating an identity preserves equality, and the antiderivative of a sum is the sum of the antiderivatives. If the original rational function has no pole on \([a,b]\), each expression is continuous there. The fundamental theorem of calculus then converts the integral into the difference of antiderivative values.
If the numerator degree is at least the denominator degree, find the polynomial quotient and proper remainder.
Include terms for every power of each repeated linear or irreducible quadratic factor, with numerator degrees below the corresponding factor degrees.
Integrate the polynomial and partial-fraction terms, then subtract the antiderivative values at the endpoints.
Recombine the decomposition and differentiate the antiderivative before accepting the endpoint result.
A Common Pitfall: Losing an Endpoint Contribution
When a partial fraction contains a linear numerator over a quadratic, integration may produce both a logarithm and an inverse tangent. A repeated quadratic can produce another inverse-tangent contribution. Combining those terms too early, or evaluating only one of them at the endpoint, changes the answer.
For instance, in the first example the inverse-tangent coefficient in the antiderivative is \(7/25\). Since \(\arctan(1)=\pi/4\) and \(\arctan(0)=0\), its definite contribution is \((7/25)(\pi/4)=7\pi/100\). Keeping only \(2\pi/100\), as if only the simple quadratic term contributed, omits the repeated-quadratic contribution. The correction is to evaluate the complete antiderivative at both endpoints, term by term.
A second useful discipline is to preserve absolute values in logarithms of linear factors until the interval is considered. On an interval where \(x-a\) has a fixed nonzero sign, \(\ln|x-a|\) is defined and has derivative \(1/(x-a)\). Do not use endpoint evaluation across a pole: continuity on the whole closed interval is a required condition.
Check Your Understanding
Use the division, decomposition, integration, and verification principles from the examples.
- What degree comparison tells you that polynomial division is required before partial fractions?
- For a repeated factor \((x-a)^3\), which linear-factor terms must appear in a complete decomposition?
- Why must the numerator over an irreducible quadratic have degree less than two?
- What condition on the denominator is needed on the entire interval to apply ordinary endpoint evaluation?
- In the first worked example, what inverse-tangent contribution results from evaluating \(7\arctan(x)/25\) from \(0\) to \(1\)?