Integration of Rational Functions

Integrating a rational function means evaluating the integral of a quotient of two polynomials, P(x) and Q(x). \[ \int \frac{P(x)}{Q(x)} \, dx \] Although there is no general rule for integrating the quotient of two arbitrary functions, rational functions have a particularly useful property: their integrals can always be reduced to a sum of simpler integrals.

The key to integrating a rational function is recognizing its algebraic structure. The choice of integration technique depends on the degrees of the numerator and denominator and on how the denominator can be factored.

Before performing any calculations, I check whether any of the following conditions hold:

  • The numerator is the derivative of the denominator or a constant multiple of it.
  • The degree of the numerator is greater than or equal to that of the denominator.
  • The degree of the numerator is less than that of the denominator.

Each of these conditions suggests a different approach to simplifying and evaluating the integral.

Note. Unlike quotients of arbitrary functions, rational functions always have antiderivatives that can be expressed in terms of elementary functions on each interval of their domain. The challenge is not whether an elementary antiderivative exists, but how to find it efficiently. The goal is to simplify the integrand until it can be integrated using standard formulas or a few additional steps.

How to Integrate Rational Functions

Although rational functions can appear quite complicated, integrating them generally involves a systematic sequence of algebraic operations.

I usually follow these steps:

  • I check whether the numerator is the derivative of the denominator or a constant multiple of it. If so, I use substitution to obtain an antiderivative involving a natural logarithm.
  • I compare the degrees of the numerator and denominator. If the degree of the numerator is greater than or equal to that of the denominator, I perform polynomial long division.
  • I factor the denominator of the remaining proper rational expression into linear and irreducible quadratic factors over the real numbers.
  • I use partial fraction decomposition to rewrite the proper rational expression as a sum of simpler fractions, retaining any polynomial quotient obtained in the previous step.
  • I determine the unknown coefficients by clearing the denominators and equating the coefficients of like powers of x in the resulting polynomial identity.
  • I integrate each term separately.

Not every integral requires all six steps. In some cases, a simple substitution is enough. In others, polynomial division and partial fraction decomposition are necessary.

The main advantage of this approach is that it turns even a complicated integral of a rational function into a collection of much simpler integrals. Instead of trying to integrate the original expression directly, I break it down into terms whose antiderivatives are already known or easier to find.

Basic Integration Formulas for Rational Functions

Before exploring the different integration techniques, it is helpful to review a few standard formulas. These appear frequently when integrating rational functions, particularly after partial fraction decomposition.

The integral of a logarithmic derivative

\[ \int\frac{f'(x)}{f(x)}\,dx=\ln|f(x)|+C \]

The integral of the reciprocal of a linear polynomial

\[ \int\frac{1}{ax+b}\,dx=\frac{1}{a}\ln|ax+b|+C \]

The integral of the reciprocal of a power of a linear polynomial

\[ \int\frac{1}{(ax+b)^n}\,dx=\frac{(ax+b)^{1-n}}{a(1-n)}+C \]

The inverse tangent integration formula

\[ \int\frac{1}{x^2+a^2}\,dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)+C \]

The integral of x divided by a sum of two squares

\[ \int\frac{x}{x^2+a^2}\,dx=\frac{1}{2}\ln(x^2+a^2)+C \]

In these formulas, $ a $ is a nonzero real constant. In the formula involving powers of a linear polynomial, $ n $ is a positive integer greater than one. Each formula is valid on any interval on which the corresponding integrand is defined.

Note. These formulas are worth committing to memory. Once a complicated rational function has been rewritten as a sum of simpler terms, many of the resulting integrals can be evaluated simply by recognizing one of these standard forms. 

When the Numerator Is the Derivative of the Denominator

The simplest case occurs when the numerator is the derivative of the denominator or a constant multiple of it. When this happens, I can use the integration formula for logarithmic derivatives, which follows directly from the substitution rule.

\[ \int \frac{f'(x)}{f(x)}\,dx=\ln|f(x)|+C \]

If the numerator is a constant multiple of the derivative of the denominator, I can factor that constant out of the integral.

This is often the quickest way to integrate a rational function because it avoids polynomial division and partial fraction decomposition altogether.

A worked example

Suppose I want to evaluate the following integral:

\[ \int \frac{2x}{x^2+3}\,dx \]

Rather than trying to simplify the fraction immediately, I first differentiate the denominator with respect to x.

\[ \frac{d}{dx}(x^2+3)=2x \]

Notice that the derivative of the denominator is exactly the numerator of the integrand.

This means that the integrand already has the form of a logarithmic derivative. I can therefore apply the integration formula directly.

\[ \int \frac{2x}{x^2+3}\,dx=\ln(x^2+3)+C \]

In this example, I can omit the absolute value signs because the argument of the natural logarithm, x^2+3, is strictly positive for every real value of x.

This example illustrates why it is always worth checking the relationship between the numerator and denominator before attempting more elaborate integration techniques. Recognizing a logarithmic derivative can turn an apparently complicated integral into a straightforward calculation.

Integrating Improper Rational Functions by Polynomial Division

A rational expression is called improper if the degree of its numerator is greater than or equal to that of its denominator.

When integrating an improper rational expression, I generally begin with polynomial long division.

The idea is to rewrite the original expression in the following form:

\[ \frac{P(x)}{Q(x)}=S(x)+\frac{R(x)}{Q(x)} \]

Here, S(x) is the quotient polynomial and R(x) is the remainder polynomial.

Polynomial division transforms the original rational expression into the sum of a polynomial and a proper rational expression. If the remainder is nonzero, its degree is strictly less than that of the denominator. If the remainder is zero, the rational expression reduces to a polynomial wherever the original denominator is nonzero.

Using this decomposition, I can rewrite the original integral as follows:

\[ \int\frac{P(x)}{Q(x)}\,dx=\int S(x)\,dx+\int\frac{R(x)}{Q(x)}\,dx \]

The first integral is straightforward because it involves a polynomial and can be evaluated using the power rule for integration. The second involves a proper rational function, which is generally easier to integrate and may require further decomposition into partial fractions.

A worked example

Suppose I want to evaluate the following integral:

\[ \int\frac{x^2+2x+3}{x+1}\,dx \]

The numerator is a quadratic polynomial, while the denominator is linear. Since the degree of the numerator is greater than that of the denominator, the rational expression is improper.

I therefore begin by performing polynomial long division.

\[ \frac{x^2+2x+3}{x+1}=x+1+\frac{2}{x+1} \]

The division gives a quotient of x+1 and a remainder of 2.

I now substitute this equivalent expression into the original integral.

\[ \int\left(x+1+\frac{2}{x+1}\right)\,dx \]

The integrand is now much easier to work with. By the linearity of integration, I can split the integral into three separate integrals and factor the constant 2 out of the last one.

\[ \int x\,dx+\int 1\,dx+2\int\frac{1}{x+1}\,dx \]

Each of these integrals has a familiar form. I use the power rule for the first two integrals and the logarithmic integration formula for the third.

\[ \frac{x^2}{2}+x+2\ln|x+1|+C \]

This is the general antiderivative of the original rational function on either of the intervals $ (-\infty,-1) $ and $ (-1,+\infty) $. Since the integrand is undefined at x=-1, the constant of integration may be chosen independently on each interval.

The example highlights the usefulness of polynomial division. What initially appeared to be a single, relatively complicated rational function has been reduced to three elementary integrals. The integration itself becomes straightforward once the algebraic structure of the integrand has been simplified.

Integrating Proper Rational Functions by Partial Fractions

When the degree of the numerator is less than that of the denominator, I can use an integration technique known as partial fraction decomposition, also called the method of partial fractions.

The idea behind this technique is simple but powerful. Instead of trying to integrate a complicated rational expression directly, I break it down into a sum of simpler fractions whose antiderivatives are easier to find.

The key is to examine the factorization of the denominator. Different types of factors require different forms of partial fraction decomposition.

Distinct Linear Factors

The simplest case occurs when the denominator factors into distinct linear factors. Each factor contributes one term to the partial fraction decomposition.

For example, if the denominator is the product of two distinct linear factors, I can write:

\[ \frac{P(x)}{(x-a)(x-b)}=\frac{A}{x-a}+\frac{B}{x-b} \]

Here, A and B are unknown constants to be determined, and P(x) is a polynomial of degree less than two.

A worked example

Suppose I want to evaluate the following integral:

\[ \int\frac{3x+5}{x^2+3x+2}\,dx \]

The numerator is linear, while the denominator is quadratic. Since the degree of the numerator is less than that of the denominator, this is a proper rational expression, and I can proceed directly with partial fraction decomposition.

I begin by factoring the denominator.

\[ x^2+3x+2=(x+1)(x+2) \]

The denominator is the product of two distinct linear factors. I can therefore rewrite the rational expression as a sum of two partial fractions, one for each factor.

\[ \frac{3x+5}{(x+1)(x+2)}=\frac{A}{x+1}+\frac{B}{x+2} \]

The next step is to determine the values of A and B that make this equality hold.

To do so, I combine the fractions on the right-hand side over a common denominator.

\[ \frac{3x+5}{(x+1)(x+2)}=\frac{A(x+2)+B(x+1)}{(x+1)(x+2)} \]

Since both sides have the same denominator, I equate their numerators.

\[ 3x+5=A(x+2)+B(x+1) \]

I expand the right-hand side.

\[ 3x+5=Ax+2A+Bx+B \]

Next, I collect like terms.

\[ 3x+5=(A+B)x+2A+B \]

This is a polynomial identity. For it to hold for every value of x, the coefficients of like powers of x must agree on both sides.

By equating the coefficients of x and the constant terms, I obtain a system of two linear equations in two unknowns.

\[ \begin{cases} A+B=3 \\ 2A+B=5 \end{cases} \]

Solving the system gives:

\[ A=2 \qquad B=1 \]

I substitute these values into the partial fraction decomposition.

\[ \frac{3x+5}{x^2+3x+2}=\frac{2}{x+1}+\frac{1}{x+2} \]

The difficult part of the problem is now over. I can rewrite the original integral as a sum of two much simpler integrals.

\[ \int\frac{3x+5}{x^2+3x+2}\,dx=2\int\frac{1}{x+1}\,dx+\int\frac{1}{x+2}\,dx \]

Both integrals have the standard logarithmic form, so I can evaluate them directly.

\[ 2\ln|x+1|+\ln|x+2|+C \]

This gives the general antiderivative of the original rational function on each interval of its domain. Since the integrand is undefined at x=-1 and x=-2, the constant of integration may be chosen independently on each of the three intervals.

Note. A useful way to check the result is to differentiate the antiderivative. \[ \frac{d}{dx}[2\ln|x+1|+\ln|x+2|]=\frac{2}{x+1}+\frac{1}{x+2} \] Combining these fractions over a common denominator gives: \[ \frac{2(x+2)+(x+1)}{(x+1)(x+2)}=\frac{3x+5}{x^2+3x+2} \] Since differentiating the antiderivative gives back the original integrand, the result is correct.

Repeated Linear Factors

What happens when the same linear factor appears more than once in the denominator?

In this case, a single partial fraction is not enough. The decomposition must include a separate term for every positive integer power of the repeated factor, from the first power up to its highest power in the denominator.

For example, if a linear factor has multiplicity three, the decomposition takes the following form:

\[ \frac{P(x)}{(x-a)^3}=\frac{A}{x-a}+\frac{B}{(x-a)^2}+\frac{C}{(x-a)^3} \]

Here, A, B, and C are unknown constants to be determined, and P(x) is a polynomial of degree less than three.

A worked example

Suppose I want to evaluate the following integral:

\[ \int\frac{2x+3}{(x+1)^2}\,dx \]

The denominator contains the linear factor x+1 with multiplicity two.

I therefore introduce two partial fractions, one with x+1 in the denominator and another with its square.

\[ \frac{2x+3}{(x+1)^2}=\frac{A}{x+1}+\frac{B}{(x+1)^2} \]

As in the previous example, I determine the unknown coefficients by combining the fractions on the right-hand side over a common denominator.

\[ \frac{2x+3}{(x+1)^2}=\frac{A(x+1)+B}{(x+1)^2} \]

Since both sides have the same denominator, I equate the numerators.

\[ 2x+3=A(x+1)+B \]

Expanding the right-hand side gives:

\[ 2x+3=Ax+A+B \]

Matching the coefficients of x and the constant terms yields the following system of equations:

\[ \begin{cases} A=2 \\ A+B=3 \end{cases} \]

Solving the system gives A=2 and B=1.

I substitute these values into the partial fraction decomposition.

\[ \frac{2x+3}{(x+1)^2}=\frac{2}{x+1}+\frac{1}{(x+1)^2} \]

I can now rewrite the original integral as a sum of two simpler integrals.

\[ 2\int\frac{1}{x+1}\,dx+\int\frac{1}{(x+1)^2}\,dx \]

The first integral has the familiar logarithmic form.

\[ 2\int\frac{1}{x+1}\,dx=2\ln|x+1|+C_1 \]

For the second integral, I rewrite the integrand using a negative exponent.

\[ \int\frac{1}{(x+1)^2}\,dx=\int(x+1)^{-2}\,dx \]

Since the derivative of x+1 is one, I can apply the power rule for integration directly.

\[ \frac{(x+1)^{-1}}{-1}+C_2=-\frac{1}{x+1}+C_2 \]

Finally, I combine the two antiderivatives.

\[ 2\ln|x+1|-\frac{1}{x+1}+C \]

Here, C is an arbitrary constant of integration that absorbs the two constants $ C_1 $ and $ C_2 $.

Notice the difference between this example and the previous one. Distinct linear factors produce logarithmic terms, whereas repeated linear factors can also produce rational terms in the antiderivative.

Irreducible Quadratic Factors

Not every polynomial can be factored completely into linear factors over the real numbers.

For example, a quadratic polynomial with a negative discriminant has no real zeros. As a result, it cannot be factored into real linear factors and is said to be irreducible over the real numbers.

When a nonrepeated irreducible quadratic factor appears in the denominator, the corresponding partial fraction must have a numerator of degree at most one. Instead of introducing a single unknown constant, I use a numerator of the general form Ax+B.

\[ \frac{Ax+B}{ax^2+bx+c} \]

Either coefficient may be zero, so the numerator can also be a constant.

Integrals of this form lead to antiderivatives involving natural logarithms, inverse tangent functions, or a combination of the two.

A first worked example

Suppose I want to evaluate the following integral:

\[ \int\frac{1}{x^2+4}\,dx \]

The quadratic polynomial in the denominator has no real zeros, so factoring it into real linear factors is not an option.

However, I can rewrite the denominator as a sum of two squares.

\[ \int\frac{1}{x^2+2^2}\,dx \]

The integral now matches one of the standard integration formulas involving the inverse tangent function.

\[ \int\frac{1}{x^2+a^2}\,dx=\frac{1}{a}\arctan\left(\frac{x}{a}\right)+C \]

Here, a is a positive constant.

Setting a=2 in this formula gives:

\[ \frac{1}{2}\arctan\left(\frac{x}{2}\right)+C \]

In this case, recognizing the sum of two squares in the denominator is all that is needed to evaluate the integral.

A second worked example

Next, I consider a slightly more involved example in which the numerator is a linear polynomial.

\[ \int\frac{3x+2}{x^2+1}\,dx \]

The denominator is an irreducible quadratic polynomial because it has no real zeros.

However, the two terms in the numerator suggest two different integration techniques. I begin by separating them.

\[ \int\left(\frac{3x}{x^2+1}+\frac{2}{x^2+1}\right)\,dx \]

By the linearity of integration, I obtain:

\[ 3\int\frac{x}{x^2+1}\,dx+2\int\frac{1}{x^2+1}\,dx \]

In the first integral, the numerator x is half the derivative of the denominator. I can therefore rewrite the first term as follows:

\[ \frac{3}{2}\int\frac{2x}{x^2+1}\,dx \]

The integrand now has the form of a logarithmic derivative, so I can apply the standard logarithmic integration formula.

\[ \frac{3}{2}\ln(x^2+1)+C_1 \]

The second integral, on the other hand, already matches the standard inverse tangent integration formula.

\[ 2\int\frac{1}{x^2+1}\,dx=2\arctan(x)+C_2 \]

Finally, I combine the two antiderivatives and absorb their constants of integration into a single arbitrary constant C.

\[ \frac{3}{2}\ln(x^2+1)+2\arctan(x)+C \]

This example illustrates why irreducible quadratic factors often lead to both logarithmic and inverse tangent terms. Each part of the numerator corresponds to a different standard integration formula.

Note. If the quadratic denominator also contains a linear term, I can use the method of completing the square to express it as a nonzero constant times a sum of two squares. More generally, I can rewrite the numerator as a constant multiple of the derivative of the denominator plus a constant. The first part leads to a natural logarithm, while the second can be integrated using the inverse tangent formula after an appropriate substitution.

Repeated Irreducible Quadratic Factors

The most involved case occurs when an irreducible quadratic factor appears more than once in the denominator.

As with repeated linear factors, the partial fraction decomposition must include a separate term for every positive integer power of the quadratic factor, up to and including its highest power in the denominator.

There is, however, an important difference. Each partial fraction has a numerator of degree at most one. Its general form is Ax+B, which also allows for a constant or zero numerator.

For example:

\[ \frac{P(x)}{(x^2+1)^2}=\frac{Ax+B}{x^2+1}+\frac{Cx+D}{(x^2+1)^2} \]

Here, A, B, C, and D are unknown constants to be determined, and P(x) is a polynomial of degree less than four.

The procedure for finding these coefficients is essentially the same as in the case of linear factors. I clear the denominators, expand the resulting expressions, and equate the coefficients of like powers of x in the polynomial identity.

The integration itself, however, may require additional techniques. Depending on the form of the integrand, I may need to use substitution, integration by parts, or a suitable reduction formula.

A worked example

Suppose I want to evaluate the following integral:

\[ \int\frac{1}{(x^2+1)^2}\,dx \]

The denominator contains the irreducible quadratic factor x^2+1 with multiplicity two.

In this particular example, the integrand is already in partial fraction form, so no further decomposition is necessary.

At first glance, the integral resembles the standard inverse tangent formula. However, that formula does not apply directly because the quadratic factor in the denominator is squared.

To overcome this difficulty, I use a technique known as trigonometric substitution.

I introduce a new variable t by expressing x as the tangent of t. I restrict t to the interval $ (-\pi/2,\pi/2) $ so that the substitution is one-to-one and can be reversed using the inverse tangent function.

\[ x=\tan(t) \]

Differentiating both sides gives the differential dx in terms of dt.

\[ dx=\frac{1}{\cos^2(t)}\,dt \]

The reason for choosing this substitution becomes clear from the following Pythagorean trigonometric identity:

\[ 1+\tan^2(t)=\frac{1}{\cos^2(t)} \]

This identity allows me to simplify the quadratic expression in the denominator. I now substitute the expressions for x and dx into the original integral.

\[ \int\frac{1}{[1+\tan^2(t)]^2}\cdot\frac{1}{\cos^2(t)}\,dt \]

Applying the Pythagorean identity gives:

\[ \int\cos^4(t)\cdot\frac{1}{\cos^2(t)}\,dt \]

After simplifying the integrand, I obtain:

\[ \int\cos^2(t)\,dt \]

The original rational function has now been transformed into a much simpler trigonometric integral.

To integrate the square of the cosine function, I use the power-reduction identity derived from the cosine double-angle formula.

\[ \cos^2(t)=\frac{1+\cos(2t)}{2} \]

Substituting this identity into the integral gives:

\[ \frac{1}{2}\int[1+\cos(2t)]\,dt \]

By the linearity of integration, I separate this expression into two elementary integrals.

\[ \frac{1}{2}\int 1\,dt+\frac{1}{2}\int\cos(2t)\,dt \]

Evaluating each integral separately yields:

\[ \frac{t}{2}+\frac{\sin(2t)}{4}+C \]

Next, I use the sine double-angle identity to rewrite the second term in a form that will make it easier to return to the original variable.

\[ \frac{t}{2}+\frac{\sin(t)\cos(t)}{2}+C \]

The integration is complete, but the result is still expressed in terms of t rather than x.

Since the substitution was defined by x=tan(t), I can recover t by taking the inverse tangent of x.

\[ t=\arctan(x) \]

Using the trigonometric identities relating sine, cosine, and tangent, I can also express the product of sine and cosine in terms of x.

\[ \sin(t)\cos(t)=\frac{\tan(t)}{1+\tan^2(t)}=\frac{x}{1+x^2} \]

I substitute these expressions back into the antiderivative.

\[ \frac{1}{2}\arctan(x)+\frac{x}{2(1+x^2)}+C \]

Therefore, the original integral evaluates to:

\[ \int\frac{1}{(x^2+1)^2}\,dx=\frac{x}{2(x^2+1)}+\frac{1}{2}\arctan(x)+C \]

Notice that the resulting antiderivative contains both a rational term and an inverse tangent term. This is an important feature of repeated irreducible quadratic factors: their integrals can produce rational terms in addition to the logarithmic and inverse tangent terms encountered in simpler cases.

Note. Integrating partial fractions involving repeated irreducible quadratic factors generally requires more work than integrating those involving nonrepeated quadratic factors. Nevertheless, these integrals can always be evaluated in terms of elementary functions using suitable substitutions, integration by parts, or reduction formulas. In fact, every rational function with real coefficients has an elementary antiderivative on each interval of its domain. Such an antiderivative can be expressed as a combination of rational functions, natural logarithms, and inverse tangent functions, together with an arbitrary constant of integration.

Integrating Rational Functions with Higher-Degree Denominators

Partial fraction decomposition is not limited to rational functions with linear or quadratic denominators. The same technique works when the denominator is a polynomial of degree three, four, or higher.

In these cases, the denominator may contain a combination of distinct linear factors, repeated linear factors, irreducible quadratic factors, and repeated irreducible quadratic factors.

The key is to apply the appropriate partial fraction decomposition rule to each factor. Although higher-degree denominators may involve more algebra, the underlying integration method remains the same.

A worked example

Suppose I want to evaluate the following integral:

\[ \int\frac{x^2+2x+3}{x^3+x^2+x+1}\,dx \]

The numerator is a quadratic polynomial, while the denominator is cubic.

Since the degree of the numerator is less than that of the denominator, this is a proper rational expression. I can therefore proceed directly with partial fraction decomposition without performing polynomial division first.

I begin by factoring the denominator using the grouping method.

\[ x^3+x^2+x+1=x^2(x+1)+(x+1) \]

I then factor out the common binomial x+1.

\[ x^3+x^2+x+1=(x+1)(x^2+1) \]

The original integral can now be rewritten as:

\[ \int\frac{x^2+2x+3}{(x+1)(x^2+1)}\,dx \]

Notice that the denominator contains two different types of factors:

  • A linear factor (x+1).
  • An irreducible quadratic factor (x^2+1).

The quadratic factor is irreducible over the real numbers because it has no real zeros and therefore cannot be factored into real linear factors.

Each of these factors requires a different type of partial fraction. For the linear factor, I use a constant numerator. For the irreducible quadratic factor, I use a numerator of the general form Bx+C.

Combining these two decomposition rules gives:

\[ \frac{x^2+2x+3}{(x+1)(x^2+1)}=\frac{A}{x+1}+\frac{Bx+C}{x^2+1} \]

The next step is to determine the values of the three unknown coefficients A, B, and C.

As in the previous examples, I combine the fractions on the right-hand side over a common denominator.

\[ \frac{x^2+2x+3}{(x+1)(x^2+1)}=\frac{A(x^2+1)+(Bx+C)(x+1)}{(x+1)(x^2+1)} \]

Since both sides have the same denominator, I equate their numerators.

\[ x^2+2x+3=A(x^2+1)+(Bx+C)(x+1) \]

I expand the products on the right-hand side.

\[ x^2+2x+3=Ax^2+A+Bx^2+Bx+Cx+C \]

Next, I collect like terms and arrange the expression in descending powers of x.

\[ x^2+2x+3=(A+B)x^2+(B+C)x+A+C \]

For this polynomial identity to hold for every value of x, the coefficients of corresponding powers of x must be equal on both sides.

By matching the quadratic, linear, and constant terms, I obtain a system of three linear equations in three unknowns.

\[ \begin{cases} A+B=1 \\ B+C=2 \\ A+C=3 \end{cases} \]

I solve the system using substitution. From the first equation, I express B in terms of A.

\[ B=1-A \]

I substitute this expression into the second equation.

\[ 1-A+C=2 \]

Solving for C gives:

\[ C=1+A \]

I then substitute this expression for C into the third equation.

\[ A+1+A=3 \]

Collecting like terms and solving for A, I obtain:

\[ 2A=2 \]

\[ A=1 \]

Now that I know the value of A, I can find the remaining two coefficients by back-substitution.

\[ B=1-A=1-1=0 \]

\[ C=1+A=1+1=2 \]

The solution to the system is therefore:

\[ A=1 \qquad B=0 \qquad C=2 \]

I substitute these values into the partial fraction decomposition.

\[ \frac{x^2+2x+3}{(x+1)(x^2+1)}=\frac{1}{x+1}+\frac{2}{x^2+1} \]

Notice that B=0. This simplifies the second partial fraction considerably because its numerator reduces to a constant.

The algebraic part of the problem is now complete. By the linearity of integration, I can rewrite the original integral as a sum of two elementary integrals.

\[ \int\frac{1}{x+1}\,dx+2\int\frac{1}{x^2+1}\,dx \]

The first integral has the familiar logarithmic form.

\[ \int\frac{1}{x+1}\,dx=\ln|x+1|+C_1 \]

The second integral matches the standard inverse tangent integration formula.

\[ 2\int\frac{1}{x^2+1}\,dx=2\arctan(x)+C_2 \]

Finally, I add the two antiderivatives and combine their constants of integration into a single arbitrary constant C.

\[ \ln|x+1|+2\arctan(x)+C \]

Therefore, the original integral evaluates to:

\[ \int\frac{x^2+2x+3}{x^3+x^2+x+1}\,dx=\ln|x+1|+2\arctan(x)+C \]

This formula gives the general antiderivative on either of the intervals $ (-\infty,-1) $ and $ (-1,+\infty) $. Since the integrand is undefined at x=-1, the constant of integration may be chosen independently on each interval.

What initially appeared to be a complicated integral involving a cubic denominator has been reduced to two familiar integrals: one yielding a natural logarithm and the other an inverse tangent function.

Checking the result

As with any indefinite integral, I can verify my answer by differentiating the antiderivative. If the integration is correct, the derivative must reproduce the original integrand.

\[ \frac{d}{dx}[\ln|x+1|+2\arctan(x)]=\frac{1}{x+1}+\frac{2}{x^2+1} \]

I combine the two fractions over a common denominator and simplify the numerator.

\[ \frac{x^2+1+2(x+1)}{(x+1)(x^2+1)}=\frac{x^2+2x+3}{(x+1)(x^2+1)} \]

Expanding the product in the denominator gives:

\[ \frac{x^2+2x+3}{x^3+x^2+x+1} \]

The derivative matches the original integrand wherever it is defined, confirming that the result is correct.

Note. This example illustrates how different partial fraction decomposition rules can be combined within the same problem. I used one rule for the linear factor and another for the irreducible quadratic factor. The same approach works for denominators of degree four or higher. This is because every nonconstant polynomial with real coefficients can be factored over the real numbers into linear and irreducible quadratic factors, possibly with repeated factors. As the degree of the denominator increases, factoring the polynomial and determining the unknown coefficients may require more work. Nevertheless, the integration strategy remains unchanged. Once the denominator has been factored and the partial fraction coefficients have been determined, the original integral can be reduced to a sum of simpler integrals that can be evaluated using standard formulas or other elementary integration techniques.

Integrating Rational Functions with Quadratic Denominators

Using the Discriminant to Choose an Integration Method

When the denominator of a rational function is a quadratic polynomial, the discriminant provides a useful starting point for choosing the most appropriate integration technique.

Consider an integral of the general form:

\[ \int\frac{px+q}{ax^2+bx+c}\,dx \]

Here, a, b, c, p, and q are real constants, with a nonzero.

I begin by calculating the discriminant of the quadratic denominator.

\[ \Delta=b^2-4ac \]

The sign of the discriminant tells me which of three possible cases I am dealing with:

  • Positive discriminant. The denominator has two distinct real zeros and can be factored into two distinct linear factors, apart from a constant multiplier.
  • Zero discriminant. The denominator has a repeated real zero and can be expressed as a nonzero constant times the square of a linear factor.
  • Negative discriminant. The denominator has no real zeros and is therefore irreducible over the real numbers.

More specifically, the factorization of the denominator depends on the discriminant as follows:

  • If \(\Delta>0\), the denominator can be factored as \[ a(x-x_1)(x-x_2) \]
  • If \(\Delta=0\), the denominator can be factored as \[ a(x-x_1)^2 \]
  • If \(\Delta<0\), the denominator is an irreducible quadratic polynomial over the real numbers.

Note. Calculating the discriminant is not an integration technique in itself. Its purpose is to reveal the algebraic structure of the denominator. Once I know what kind of factors the denominator contains, I can choose the appropriate partial fraction decomposition rule or another suitable integration technique.

Completing the Square for Irreducible Quadratic Factors

What happens when the quadratic denominator has a negative discriminant and cannot be factored into real linear factors?

In this case, a particularly useful technique is completing the square. It allows me to rewrite the denominator in a form that is suitable for applying the inverse tangent integration formula.

In general, any quadratic polynomial with a nonzero leading coefficient can be written as:

\[ ax^2+bx+c=a\left[\left(x+\frac{b}{2a}\right)^2+\frac{4ac-b^2}{4a^2}\right] \]

Since the discriminant is negative, the constant added to the squared expression inside the brackets is strictly positive.

I can therefore rewrite the denominator in the following form:

\[ a[(x+h)^2+k^2] \]

Here, h is a real constant and k is a positive constant.

The advantage of this form is that it reveals a familiar pattern. When the numerator is constant, I can factor out any constant multiplier and apply the standard inverse tangent integration formula.

\[ \int\frac{1}{a[(x+h)^2+k^2]}\,dx=\frac{1}{ak}\arctan\left(\frac{x+h}{k}\right)+C \]

A Worked Example: Completing the Square

Suppose I want to evaluate the following integral:

\[ \int\frac{1}{x^2+4x+5}\,dx \]

I begin by calculating the discriminant of the quadratic denominator.

\[ \Delta=4^2-4\cdot1\cdot5=-4 \]

The discriminant is negative, so the denominator cannot be factored into real linear factors.

Instead, I complete the square.

To do this, I add and subtract 4 in the denominator. This changes the form of the expression without changing its value.

\[ x^2+4x+5=x^2+4x+4-4+5 \]

The first three terms form a perfect-square trinomial, which I can rewrite as the square of a binomial.

\[ x^2+4x+5=(x+2)^2+1 \]

The original integral can now be rewritten as:

\[ \int\frac{1}{(x+2)^2+1}\,dx \]

Notice how much simpler the integrand looks after completing the square. It now matches the standard integration formula associated with the derivative of the inverse tangent function.

\[ \int\frac{f'(x)}{1+[f(x)]^2}\,dx=\arctan[f(x)]+C \]

In this example, f(x)=x+2 and f'(x)=1.

Applying the formula gives:

\[ \arctan(x+2)+C \]

Therefore, the original integral evaluates to:

\[ \int\frac{1}{x^2+4x+5}\,dx=\arctan(x+2)+C \]

This example illustrates the usefulness of completing the square. A quadratic denominator that initially appears difficult to integrate can often be rewritten in a form that immediately matches a standard integration formula.

Integrating a Linear Numerator over an Irreducible Quadratic Denominator

The integration becomes slightly more involved when the numerator is a linear polynomial rather than a constant.

When the denominator is an irreducible quadratic polynomial, a useful strategy is to rewrite the numerator as the sum of two terms.

One term is a constant multiple of the derivative of the denominator, while the other is a constant.

This approach is particularly effective because it reduces the problem to two familiar types of integrals: one involving a natural logarithm and the other involving an inverse tangent function.

Consider an integral of the general form:

\[ \int\frac{px+q}{ax^2+bx+c}\,dx \]

The derivative of the denominator is:

\[ \frac{d}{dx}(ax^2+bx+c)=2ax+b \]

I therefore rewrite the numerator in the following form:

\[ px+q=A(2ax+b)+B \]

Here, A and B are two unknown constants whose values I need to determine.

I expand the right-hand side.

\[ px+q=2aAx+Ab+B \]

For this equation to hold as a polynomial identity, the coefficients of x and the constant terms must agree on both sides.

By equating these coefficients, I obtain the following system of equations:

\[ \begin{cases} 2aA=p \\ Ab+B=q \end{cases} \]

Solving the system gives:

\[ A=\frac{p}{2a} \]

\[ B=q-\frac{pb}{2a} \]

Now that I have determined the values of A and B, I can use the linearity of integration to rewrite the original integral as a sum of two simpler integrals.

\[ A\int\frac{2ax+b}{ax^2+bx+c}\,dx+B\int\frac{1}{ax^2+bx+c}\,dx \]

The first integrand has the form of a logarithmic derivative, so I can evaluate it using the standard logarithmic integration formula.

For the second integral, I complete the square in the denominator and apply the inverse tangent integration formula.

In this way, I can evaluate any integral of this form by combining two standard integration techniques.

A Worked Example: Combining Logarithmic and Inverse Tangent Integrals

Suppose I want to evaluate the following integral:

\[ \int\frac{2x+5}{x^2+2x+5}\,dx \]

I begin by calculating the discriminant of the denominator.

\[ \Delta=2^2-4\cdot1\cdot5=-16 \]

The discriminant is negative, so the quadratic denominator is irreducible over the real numbers.

Next, I differentiate the denominator with respect to x.

\[ \frac{d}{dx}(x^2+2x+5)=2x+2 \]

Notice that the numerator is almost identical to the derivative of the denominator. The only difference is the constant term.

I can therefore rewrite the numerator as the sum of the derivative of the denominator and a constant.

\[ 2x+5=(2x+2)+3 \]

I substitute this expression into the original integral.

\[ \int\frac{(2x+2)+3}{x^2+2x+5}\,dx \]

Using the linearity of integration, I separate the two terms and factor the constant 3 out of the second integral.

\[ \int\frac{2x+2}{x^2+2x+5}\,dx+3\int\frac{1}{x^2+2x+5}\,dx \]

The original integral has now been reduced to two simpler integrals, which I can evaluate separately.

The first integral

In the first integral, the numerator is exactly the derivative of the denominator.

I can therefore apply the logarithmic integration formula directly.

\[ \int\frac{2x+2}{x^2+2x+5}\,dx=\ln(x^2+2x+5)+C_1 \]

There is no need for absolute value signs around the argument of the logarithm because the quadratic polynomial x^2+2x+5 is strictly positive for all real values of x.

The second integral

To evaluate the second integral, I complete the square in the denominator.

\[ x^2+2x+5=x^2+2x+1+4 \]

The first three terms form a perfect-square trinomial, giving:

\[ x^2+2x+5=(x+1)^2+4 \]

I substitute this equivalent expression into the second integral.

\[ 3\int\frac{1}{(x+1)^2+4}\,dx \]

Since 4 is the square of 2, the integral now matches the following standard inverse tangent integration formula:

\[ \int\frac{f'(x)}{[f(x)]^2+k^2}\,dx=\frac{1}{k}\arctan\left(\frac{f(x)}{k}\right)+C \]

In this formula, k is a positive constant.

In the present example, f(x)=x+1, f'(x)=1, and k=2.

Substituting these values into the formula gives:

\[ \frac{3}{2}\arctan\left(\frac{x+1}{2}\right)+C_2 \]

Finally, I add the two antiderivatives and combine their constants of integration into a single arbitrary constant C.

\[ \ln(x^2+2x+5)+\frac{3}{2}\arctan\left(\frac{x+1}{2}\right)+C \]

Therefore, the original integral evaluates to:

\[ \int\frac{2x+5}{x^2+2x+5}\,dx=\ln(x^2+2x+5)+\frac{3}{2}\arctan\left(\frac{x+1}{2}\right)+C \]

Notice that the resulting antiderivative contains both a natural logarithm and an inverse tangent function. Each term comes from a different part of the original numerator.

Note. The main advantage of this approach is that it reduces the integral of a rational function with a linear numerator and an irreducible quadratic denominator to two standard integrals. One produces a natural logarithm, while the other produces an inverse tangent function. Depending on the coefficients of the numerator, either term may be absent. For example, if the numerator is proportional to the derivative of the denominator, the antiderivative contains only a logarithmic term and a constant of integration.

Additional Observations

Is There a Quotient Rule for Integration?

Unlike differentiation, integration has no general quotient rule.

A common mistake when integrating rational functions is to assume that the numerator and denominator can be integrated separately and that their antiderivatives can then be divided.

In general, the integral of a quotient of two functions is not equal to the quotient of their individual integrals.

\[ \int\frac{f(x)}{g(x)}\,dx\neq\frac{\int f(x)\,dx}{\int g(x)\,dx} \]

To see why this approach does not work, consider the following integral:

\[ \int\frac{x}{x^2+1}\,dx \]

If I were to integrate the numerator and denominator separately and then form their quotient, I would obtain:

\[ \frac{\int x\,dx}{\int(x^2+1)\,dx}=\frac{\frac{x^2}{2}+C_1}{\frac{x^3}{3}+x+C_2} \]

However, the correct antiderivative follows from the logarithmic integration formula.

\[ \int\frac{x}{x^2+1}\,dx=\frac{1}{2}\ln(x^2+1)+C \]

The two expressions are fundamentally different. In this example, no choice of the constants of integration makes the quotient of the individual antiderivatives an antiderivative of the original integrand on an open interval.

This example highlights an important distinction between differentiation and integration. Although differentiation has a quotient rule, there is no corresponding general rule that allows me to integrate a quotient by integrating its numerator and denominator separately.

Instead, I must transform the integrand into a form that can be evaluated using a valid integration technique, such as substitution, polynomial division, or partial fraction decomposition.

Can Every Rational Function Be Integrated in Terms of Elementary Functions?

Yes. One of the most remarkable properties of rational functions is that every rational function with real coefficients has an elementary antiderivative on each interval of its domain.

The same is not necessarily true of quotients of arbitrary functions, even when both the numerator and the denominator are elementary functions.

What makes rational functions particularly amenable to integration is that polynomial division and partial fraction decomposition provide a systematic way to break them down into simpler terms.

These terms can then be integrated using standard integration formulas or other elementary integration techniques.

The resulting antiderivatives can always be expressed as finite sums involving:

  • Polynomial terms.
  • Rational terms.
  • Constant multiples of natural logarithms.
  • Constant multiples of inverse tangent functions.
  • An arbitrary constant of integration.

Not every antiderivative contains all of these types of terms. The particular combination depends on the numerator, the factorization of the denominator, and the multiplicity of its factors.

This is what makes the integration of rational functions different from many other integration problems. Although the algebra may become quite involved, there is always a systematic procedure for finding an elementary antiderivative.

The Domain of an Antiderivative of a Rational Function

When integrating rational functions, it is important to pay attention not only to the integration technique but also to the domain of the integrand.

If the denominator of a rational expression vanishes at one or more real points, the expression is undefined at those points.

Consequently, I must consider the antiderivative separately on each connected interval of the integrand's domain. The constant of integration may be chosen independently on each of these intervals.

For example, consider the following indefinite integral:

\[ \int\frac{1}{x-2}\,dx=\ln|x-2|+C \]

The integrand is undefined at x=2 because the denominator vanishes at that point.

Its domain therefore consists of two disjoint intervals.

\[ (-\infty,2)\cup(2,+\infty) \]

Although the expression containing the absolute value is valid on both intervals, the constant of integration does not have to be the same on each interval.

To describe the most general antiderivative on the entire domain, I can write it as a piecewise-defined function.

\[ F(x)=\begin{cases} \ln(2-x)+C_1 & x<2 \\ \ln(x-2)+C_2 & x>2 \end{cases} \]

Here, $ C_1 $ and $ C_2 $ are arbitrary constants of integration that can be chosen independently of one another.

The reason is that the two intervals are separate connected components of the domain. Since the integrand is undefined at x=2, there is no requirement for the constants of integration to agree on opposite sides of that point.

The same principle applies to rational functions whose denominators vanish at several distinct real points. Each connected component of the domain has its own independent constant of integration.

Therefore, when finding the general antiderivative of a rational function, I must take into account both the integration formula and the intervals on which the original function is defined.

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Calculus

Exercises

Definite Integrals

Indefinite Integrals

Multivariable Integration

Numerical Integration

Math Tools