Type a command or search the notes. Tab cycles completions. Up and down recall history when blank. Escape dismisses, then leaves the prompt.
MATH
[1251]

Rational functions

Proper fractions, partial fractions and the integrals they become.

This page integrates rational functions, which are ratios of polynomials. If the fraction is improper, divide first; the polynomial part integrates immediately and the proper remainder decomposes uniquely into partial fractions. Linear factors lead to logarithms and negative powers, while non-repeated irreducible quadratics lead to logarithms and inverse tangents. Repeated quadratics may also need a reduction step or a trigonometric substitution.

Other integrands belong elsewhere: trigonometric powers in trigonometric integrals, quadratic surds in trigonometric and hyperbolic substitutions, and other algebraic surds in rationalising substitutions.

Classifying and dividing rational functions

[DEFINITION]

Rational function

A function ff is a rational function if it is of the form f(x)=P(x)Q(x)f(x)=\frac{P(x)}{Q(x)}, where PP and QQ are polynomials and QQ is not the zero polynomial. Its real domain excludes the zeros of QQ.

[DEFINITION]

Proper rational function

A rational function ff is proper if deg⁡P<deg⁡Q\deg P<\deg Q. If ff is not proper, long division writes it as a polynomial plus a proper rational function,

P(x)Q(x)=p(x)+R(x)Q(x),\frac{P(x)}{Q(x)}=p(x)+\frac{R(x)}{Q(x)},

with R(x)Q(x)\frac{R(x)}{Q(x)} proper.

The polynomial pp integrates termwise. Only the proper remainder needs a further decomposition.

[EXAMPLE]

Which of these are rational?

  • 2x+13x2−4\frac{2x+1}{3x^2-4} is rational and proper: deg⁡(2x+1)=1<2=deg⁡(3x2−4)\deg(2x+1)=1<2=\deg(3x^2-4).
  • cos⁡xx2+1\frac{\cos x}{x^2+1} is not rational: cos⁡x\cos x is not a polynomial.
  • x2x−1\frac{x^2}{x-1} is rational and improper: deg⁡(x2)=2>1=deg⁡(x−1)\deg(x^2)=2>1=\deg(x-1).
  • xx2+3\frac{\sqrt{x}}{x^2+3} is not rational: x\sqrt{x} is not a polynomial.

[routine]

  1. [1]:Rational function
[EXAMPLE]

Polynomial plus proper remainder

Write each rational function as a polynomial plus a proper rational function.

For 4x−52x+3\frac{4x-5}{2x+3}, the leading-term ratio is 22 and 2(2x+3)=4x+62(2x+3)=4x+6, so

(4x−5)−(4x+6)=−11.(4x-5)-(4x+6)=-11.

Hence

4x−52x+3=2−112x+3.\frac{4x-5}{2x+3}=2-\frac{11}{2x+3}.

For x3−x+1x2+3x−1\frac{x^3-x+1}{x^2+3x-1}, divide. The first quotient term is xx and

x(x2+3x−1)=x3+3x2−x,x(x^2+3x-1)=x^3+3x^2-x,

so

(x3−x+1)−(x3+3x2−x)=−3x2+1.(x^3-x+1)-(x^3+3x^2-x)=-3x^2+1.

The next quotient term is −3-3 and

−3(x2+3x−1)=−3x2−9x+3,-3(x^2+3x-1)=-3x^2-9x+3,

so

(−3x2+1)−(−3x2−9x+3)=9x−2.(-3x^2+1)-(-3x^2-9x+3)=9x-2.

Hence

x3−x+1x2+3x−1=x−3+9x−2x2+3x−1.\frac{x^3-x+1}{x^2+3x-1}=x-3+\frac{9x-2}{x^2+3x-1}.

Decomposing into partial fractions

Once the remainder is proper, cancel any common factors and factor its denominator over R\mathbb{R}. Cancellation simplifies the formula only on the original domain: any zero of the original denominator remains an excluded point when choosing an integration interval. A separate partial-fraction term is needed for every power of every factor; omitting a power can make the coefficient equations impossible to solve.

[THEOREM]

Partial fractions decomposition

For a fixed denominator after cancellation and factorisation, every proper rational function ff has a unique partial-fraction expansion with terms of the form

A(x−a)k,Bx+C(x2+bx+c)k,\frac{A}{(x-a)^k},\qquad \frac{Bx+C}{(x^2+bx+c)^k},

where the quadratic x2+bx+cx^2+bx+c is irreducible over the real numbers (i.e. b2−4c<0b^2-4c<0).

The integers kk run up to the multiplicity of each factor. Uniqueness means the linear equations for the undetermined coefficients have exactly one solution. The real irreducible quadratics arise by pairing a non-real complex root with its conjugate, as in real linear and quadratic factorisation.

For q(x)=ax2+bx+cq(x)=ax^2+bx+c, the quantity Δ=b2−4ac\Delta=b^2-4ac is its discriminant. If Δ<0\Delta<0, the quadratic has no real roots and is irreducible over R\mathbb R; this is the quadratic case in the partial-fraction forms above.

[METHOD]

Partial fraction terms

Given a proper rational function, each irreducible factor of the denominator contributes terms as follows.

  • Linear factor ax+bax+b: Aax+b\frac{A}{ax+b}.
  • Repeated linear factor (ax+b)k(ax+b)^k: A1ax+b+A2(ax+b)2+⋯+Ak(ax+b)k\frac{A_1}{ax+b}+\frac{A_2}{(ax+b)^2}+\cdots+\frac{A_k}{(ax+b)^k}.
  • Irreducible quadratic factor ax2+bx+cax^2+bx+c with a≠0a\ne0: Ax+Bax2+bx+c\frac{Ax+B}{ax^2+bx+c}.
  • Repeated irreducible quadratic factor (ax2+bx+c)k(ax^2+bx+c)^k: A1x+B1ax2+bx+c+A2x+B2(ax2+bx+c)2+⋯+Akx+Bk(ax2+bx+c)k\frac{A_1x+B_1}{ax^2+bx+c}+\frac{A_2x+B_2}{(ax^2+bx+c)^2}+\cdots+\frac{A_kx+B_k}{(ax^2+bx+c)^k}.

Here each factor has a general leading coefficient aa, whereas the decomposition theorem used the monic quadratic x2+bx+cx^2+bx+c, irreducible when b2−4c<0b^2-4c<0.

[METHOD]

Integrate a rational function

To integrate a rational function on an interval containing no zero of its denominator:

  1. If the function is improper, use polynomial division to write it as a polynomial plus a proper rational function and integrate the polynomial.
  2. Decompose the proper part into partial fractions.
  3. Integrate each linear-factor term using u=ax+bu=ax+b: its first power gives Aaln⁡∣ax+b∣\frac{A}{a}\ln|ax+b|, while a power k>1k>1 gives A(ax+b)1−ka(1−k)\frac{A(ax+b)^{1-k}}{a(1-k)}.
  4. For q(x)=ax2+bx+cq(x)=ax^2+bx+c and a term ∫Bx+Cq(x)k dx\int\frac{Bx+C}{q(x)^k}\,dx, split the numerator into a multiple of q′(x)=2ax+bq'(x)=2ax+b and a constant remainder:
Bx+Cq(x)k=B2aq′(x)q(x)k+Dq(x)k,D=C−Bb2a.\frac{Bx+C}{q(x)^k} =\frac{B}{2a}\frac{q'(x)}{q(x)^k}+\frac{D}{q(x)^k}, \qquad D=C-\frac{Bb}{2a}.

Then integrate the derivative term directly and complete the square in the constant remainder.

The derivative term is immediate:

∫g′(x)g(x) dx=ln⁡∣g(x)∣+K,\int\frac{g'(x)}{g(x)}\, dx=\ln|g(x)|+K,

and, for k>1k>1,

∫g′(x)g(x)k dx=g(x)1−k1−k+K.\int\frac{g'(x)}{g(x)^k}\,dx =\frac{g(x)^{1-k}}{1-k}+K.

For the constant term, complete the square. When k=1k=1, this produces the standard inverse-tangent integral

∫1h2+x2 dx=1htan⁡−1(xh)+K,h>0.\int\frac{1}{h^2+x^2}\, dx=\frac{1}{h}\tan^{-1}\left(\frac{x}{h}\right)+K, \qquad h>0.

For k>1k>1, reduce the remaining power or use a trigonometric substitution, as in the repeated-quadratic example below.

Integrating linear factors

[EXAMPLE]

Distinct linear factors

Find ∫2x2+2x−6(x−1)(x+1)(x−2) dx\int\frac{2x^2+2x-6}{(x-1)(x+1)(x-2)}\, dx.

The denominator is a product of distinct linear factors, so

2x2+2x−6(x−1)(x+1)(x−2)=Ax−1+Bx+1+Cx−2.\frac{2x^2+2x-6}{(x-1)(x+1)(x-2)}=\frac{A}{x-1}+\frac{B}{x+1}+\frac{C}{x-2}.

Call this identity (∗)(*). Heaviside's cover-up method finds AA, BB and CC. Multiplying (∗)(*) by x−1x-1 yields

2x2+2x−6(x+1)(x−2)=A+B(x−1)x+1+C(x−1)x−2.\frac{2x^2+2x-6}{(x+1)(x-2)}=A+\frac{B(x-1)}{x+1}+\frac{C(x-1)}{x-2}.

Identity (∗)(*) holds for x≠1,−1,2x\neq 1,-1,2, but after multiplying through by x−1x-1 both sides are defined at x=1x=1, so setting x=1x=1 is legitimate:

2(1)2+2(1)−6(1+1)(1−2)=−22⋅(−1)=1,\frac{2(1)^2+2(1)-6}{(1+1)(1-2)}=\frac{-2}{2\cdot(-1)}=1,

hence A=1A=1.

Similarly, multiplying (∗)(*) by x+1x+1 and setting x=−1x=-1 gives

B=2x2+2x−6(x−1)(x−2)∣x=−1=−1,B=\left.\frac{2x^2+2x-6}{(x-1)(x-2)}\right|_{x=-1}=-1,

and doing the same with x−2x-2 and x=2x=2 gives

C=2x2+2x−6(x−1)(x+1)∣x=2=2.C=\left.\frac{2x^2+2x-6}{(x-1)(x+1)}\right|_{x=2}=2.

Hence

∫2x2+2x−6(x−1)(x+1)(x−2) dx=∫dxx−1−∫dxx+1+∫2x−2 dx\int\frac{2x^2+2x-6}{(x-1)(x+1)(x-2)}\, dx=\int\frac{dx}{x-1}-\int\frac{dx}{x+1}+\int\frac{2}{x-2}\, dx=ln⁡∣x−1∣−ln⁡∣x+1∣+2ln⁡∣x−2∣+C.=\ln|x-1|-\ln|x+1|+2\ln|x-2|+C.
[EXAMPLE]

Repeated linear factors

Find I=∫8x+9(x−2)(x+3)2 dxI=\int\frac{8x+9}{(x-2)(x+3)^2}\, dx.

The factor x+3x+3 is repeated, so

8x+9(x−2)(x+3)2=Ax−2+Bx+3+C(x+3)2\frac{8x+9}{(x-2)(x+3)^2}=\frac{A}{x-2}+\frac{B}{x+3}+\frac{C}{(x+3)^2}

(or, equivalently, Ax−2+Bx+C(x+3)2\frac{A}{x-2}+\frac{Bx+C}{(x+3)^2}). With the three-term form, the cover-up method from the distinct linear factors example gives AA by multiplying by x−2x-2 and setting x=2x=2:

A=8x+9(x+3)2∣x=2=16+925=1.A=\left.\frac{8x+9}{(x+3)^2}\right|_{x=2}=\frac{16+9}{25}=1.

Multiplying by (x+3)2(x+3)^2 and setting x=−3x=-3 gives

C=8x+9x−2∣x=−3=−24+9−5=3.C=\left.\frac{8x+9}{x-2}\right|_{x=-3}=\frac{-24+9}{-5}=3.

Cover-up does not give BB: multiplying by x+3x+3 leaves a term Cx+3\frac{C}{x+3}, so x=−3x=-3 cannot be substituted. Instead, insert the known AA and CC,

8x+9(x−2)(x+3)2=1x−2+Bx+3+3(x+3)2\frac{8x+9}{(x-2)(x+3)^2}=\frac{1}{x-2}+\frac{B}{x+3}+\frac{3}{(x+3)^2}

and set x=0x=0:

9−18=−12+B3+13  ⟹  B=−1.\frac{9}{-18}=-\frac{1}{2}+\frac{B}{3}+\frac{1}{3}\implies B=-1.

Hence

I=∫dxx−2−∫dxx+3+∫3(x+3)2 dx=ln⁡∣x−2∣−ln⁡∣x+3∣−3x+3+C.I=\int\frac{dx}{x-2}-\int\frac{dx}{x+3}+\int\frac{3}{(x+3)^2}\, dx=\ln|x-2|-\ln|x+3|-\frac{3}{x+3}+C.

This formula is valid on any interval that contains neither pole, x=2x=2 nor x=−3x=-3; the constant need not be the same on different such intervals.

Integrating irreducible quadratics

For an irreducible quadratic denominator, rewrite the numerator around the derivative of the quadratic. This splits off a logarithm and the constant remainder becomes an inverse tangent after completing the square.

[EXAMPLE]

Linear numerator over a quadratic

Find I=∫2x+1x2+4x+5 dxI=\int\frac{2x+1}{x^2+4x+5}\, dx.

The quadratic x2+4x+5x^2+4x+5 is irreducible (42−4⋅5=−4<04^2-4\cdot5=-4<0), so write the numerator in terms of the derivative 2x+42x+4 of the denominator:

2x+1=(2x+4)−3.2x+1=(2x+4)-3.

Thus

I=∫2x+4x2+4x+5 dx−∫3x2+4x+5 dx.I=\int\frac{2x+4}{x^2+4x+5}\, dx-\int\frac{3}{x^2+4x+5}\, dx.

The first integrand is g′/gg'/g. Completing the square in the second, x2+4x+5=(x+2)2+1x^2+4x+5=(x+2)^2+1, gives

I=ln⁡∣x2+4x+5∣−∫3(x+2)2+1 dx=ln⁡∣x2+4x+5∣−3tan⁡−1(x+2)+C.I=\ln|x^2+4x+5|-\int\frac{3}{(x+2)^2+1}\, dx=\ln|x^2+4x+5|-3\tan^{-1}(x+2)+C.
[EXAMPLE]

A repeated irreducible quadratic

Find I=∫2x2−x(x2+1)2 dxI=\int\frac{2x^2-x}{(x^2+1)^2}\, dx.

Decompose as

2x2−x(x2+1)2=Ax+Bx2+1+Cx+D(x2+1)2.\frac{2x^2-x}{(x^2+1)^2}=\frac{Ax+B}{x^2+1}+\frac{Cx+D}{(x^2+1)^2}.

Multiplying by (x2+1)2(x^2+1)^2,

2x2−x=(Ax+B)(x2+1)+Cx+D=Ax3+Bx2+(A+C)x+(B+D).2x^2-x=(Ax+B)(x^2+1)+Cx+D=Ax^3+Bx^2+(A+C)x+(B+D).

Comparing coefficients, A=0A=0, B=2B=2, A+C=−1A+C=-1 so C=−1C=-1 and B+D=0B+D=0 so D=−2D=-2. Hence

I=∫2x2+1 dx−∫x+2(x2+1)2 dx=2tan⁡−1(x)−12∫2x(x2+1)2 dx−2∫1(x2+1)2 dx.I=\int\frac{2}{x^2+1}\, dx-\int\frac{x+2}{(x^2+1)^2}\, dx=2\tan^{-1}(x)-\frac{1}{2}\int\frac{2x}{(x^2+1)^2}\, dx-2\int\frac{1}{(x^2+1)^2}\, dx.

The middle integral is ∫g′/g2\int g'/g^2 with g(x)=x2+1g(x)=x^2+1, so

I=2tan⁡−1(x)+12(x2+1)−1−2∫1(x2+1)2 dx.I=2\tan^{-1}(x)+\frac{1}{2}(x^2+1)^{-1}-2\int\frac{1}{(x^2+1)^2}\, dx.

For the remaining integral, let x=tan⁡θx=\tan\theta, so dx=sec⁡2θ dθdx=\sec^2\theta\, d\theta (the x=atan⁡θx=a\tan\theta row of the trigonometric and hyperbolic substitutions, with a=1a=1). Then tan⁡2θ+1=sec⁡2θ\tan^2\theta+1=\sec^2\theta and

∫1(x2+1)2 dx=∫sec⁡2θ(sec⁡2θ)2 dθ=∫cos⁡2θ dθ.\int\frac{1}{(x^2+1)^2}\, dx=\int\frac{\sec^2\theta}{(\sec^2\theta)^2}\, d\theta=\int\cos^2\theta\, d\theta.

Using cos⁡2θ=1+cos⁡2θ2\cos^2\theta=\frac{1+\cos 2\theta}{2}, as in trigonometric integrals,

∫cos⁡2θ dθ=θ2+sin⁡(2θ)4+C=12tan⁡−1(x)+14sin⁡(2tan⁡−1(x))+C.\int\cos^2\theta\, d\theta=\frac{\theta}{2}+\frac{\sin(2\theta)}{4}+C=\frac{1}{2}\tan^{-1}(x)+\frac{1}{4}\sin(2\tan^{-1}(x))+C.

Altogether,

I=tan⁡−1(x)+12(x2+1)−1−12sin⁡(2tan⁡−1(x))+C.I=\tan^{-1}(x)+\frac{1}{2}(x^2+1)^{-1}-\frac{1}{2}\sin(2\tan^{-1}(x))+C.

To rewrite the sine, let α=tan⁡−1(x)\alpha=\tan^{-1}(x), so tan⁡α=x\tan\alpha=x and cos⁡α>0\cos\alpha>0. From 1+tan⁡2α=sec⁡2α1+\tan^2\alpha=\sec^2\alpha and the sign of cos⁡α\cos\alpha,

sin⁡α=xx2+1,cos⁡α=1x2+1.\sin\alpha=\frac{x}{\sqrt{x^2+1}},\qquad \cos\alpha=\frac{1}{\sqrt{x^2+1}}.

The double-angle formula sin⁡(2α)=2sin⁡αcos⁡α\sin(2\alpha)=2\sin\alpha\cos\alpha then gives

sin⁡(2tan⁡−1(x))=2(xx2+1)(1x2+1)=2xx2+1.\sin(2\tan^{-1}(x))=2\left(\frac{x}{\sqrt{x^2+1}}\right)\left(\frac{1}{\sqrt{x^2+1}}\right)=\frac{2x}{x^2+1}.

Thus

I=tan⁡−1(x)+1−2x2(x2+1)+C.I=\tan^{-1}(x)+\frac{1-2x}{2(x^2+1)}+C.

On this page