Rational functions integration (HL)

Recall from polynomial division that

p(x)d(x)=q(x)+r(x)d(x)\frac{p(x)}{d(x)} = q(x) + \frac{r(x)}{d(x)}

This page is about integration of r(x)d(x)\displaystyle \frac{r(x)}{d(x)} where the the degree of dd is at most 22, and is strictly greater than the degree of rr.

We also assume that it is established that rr and dd share no common roots.

The following cases depend on d(x)d(x).

Contents

Linear

See indefinite integrals#linear over linear integration.

Quadratic with two real roots

This is best solved using partial fractions. Certain problems can be solved with substitution, but it is not reliable, whereas method of partial fractions is reliable.

Example: Find ∫x−7x2−7 dx\displaystyle\int \frac{x - 7}{x^2 -7} \d x.


Denominator factors as (x−7)(x+7)(x - \sqrt 7)(x + \sqrt 7). Now apply partial fractions

 x−7(x−7)(x+7)= Ax−7+Bx+7= A(x+7)+B(x−7)(x−7)(x+7)x−7= A(x+7)+B(x−7)\begin{align*}&\,\frac{x - 7}{(x - \sqrt 7)(x + \sqrt 7)} \\ =&\, \frac{A}{x - \sqrt 7} + \frac{B}{x + \sqrt 7} \\ =&\, \frac{A(x + \sqrt 7) + B(x - \sqrt 7)}{(x - \sqrt 7)(x + \sqrt 7)} \\ x - 7 =&\, A(x + \sqrt 7) + B(x - \sqrt 7)\end{align*}

Evaluate at x=7x = \sqrt 7 yields

7−7=2A71−7=2A1−72=A\begin{align*} \sqrt 7 - 7 &= 2A\sqrt 7 \\ 1 - \sqrt7&= 2A \\ \frac{1 - \sqrt7}{2} &= A\end{align*}

Evaluate at x=−7x = -\sqrt 7 yields

−7−7=−2B7−1−7=2B1+72=B\begin{align*} -\sqrt 7 - 7 &= -2B\sqrt 7 \\ - 1 - \sqrt7 &= 2B \\\frac{1 + \sqrt7}{2} &= B\end{align*}
 ∫x−7x2−7 dx= ∫(1−72(x−7)+1+72(x+7)) dx= 1−72ln⁡∣x−7∣+1+72ln⁡∣x+7∣+C■\begin{align*} &\, \int \frac{x - 7}{x^2 -7} \d x \\ =&\, \int \left(\frac{1 - \sqrt7}{2(x-\sqrt7)} + \frac{1 + \sqrt7}{2(x + \sqrt7)} \right) \d x \\ =&\, \frac{1 - \sqrt7}{2} \ln \lvert x-\sqrt7\rvert + \frac{1 + \sqrt7}{2} \ln \lvert x+\sqrt7\rvert + C \qed \end{align*}

You may also get 1−72ln⁡∣2x−27∣+1+72ln⁡∣2x+27∣+C\displaystyle\frac{1 - \sqrt7}{2} \ln \lvert 2x-2\sqrt7\rvert + \frac{1 + \sqrt7}{2} \ln \lvert 2x+2\sqrt7\rvert + C.

They are equivalent as ln⁡2a=ln⁡2+ln⁡a\ln 2a = \ln 2 + \ln a and the ln⁡2\ln 2 just goes into the +C+C. This only works for logarithms.

Quadratic with no real roots

This uses

∫1x2+a2 dx=1aarctan⁡xa+C\int \frac{1}{x^2 + a^2}\d x = \frac 1a \arctan \frac xa + C

and sometimes a substitution.

Example: Find ∫2x+12x2+4x+5 dx\displaystyle \int \frac{2x + 1}{2x^2 + 4x + 5} \d x.


We need to split this into

I=12∫4x+4−22x2+4x+5 dx=12∫4x+42x2+4x+5 dx−∫12x2+4x+5 dx=12I1−I2\begin{align*} I &= \frac12 \int \frac{4x + 4 - 2}{2x^2 + 4x + 5} \d x \\ &= \frac12 \int \frac{4x + 4}{2x^2 + 4x + 5} \d x - \int \frac{1}{2x^2 + 4x + 5} \d x \\ &= \frac12I_1 - I_2\end{align*}

Let u=2x2+4x+5>0, du=4x+4u = 2x^2 + 4x + 5 > 0, \d u = 4x + 4. It is because of this substitution that we know how to split up the integrand. Then

I1=∫ duu=ln⁡u+C=ln⁡(2x2+4x+5)+C\begin{align*} I_1 &= \int \frac{\d u}{u} \\ &= \ln u + C \\ &= \ln(2x^2 + 4x + 5) + C \end{align*}

Now for I2I_2, complete the square.

2x2+4x+5=2(x2+2x)+5=2(x2+2x+1−1)+5=2(x+1)2−2+5=(2x+2)2+3\begin{align*} 2x^2 + 4x + 5 &= 2(x^2 + 2x) + 5 \\ &= 2(x^2 + 2x + 1 - 1) + 5 \\ &= 2(x + 1)^2 - 2 + 5 \\ &= (\sqrt 2x + \sqrt2)^2 + 3 \end{align*}

We are ready to use arctan⁡\arctan, and integral of f(ax+b)f(ax + b)

I2=∫1(2x+2)2+(3)2 dx=123arctan⁡2x+23+C=66arctan⁡6x+63+C\begin{align*} I_2 &= \int \frac{1}{(\sqrt 2x + \sqrt2)^2 + (\sqrt 3)^2} \d x \\ &= \frac{1}{\sqrt2\sqrt3} \arctan\frac{\sqrt2x+\sqrt2}{\sqrt3} + C \\ &= \frac{\sqrt6}{6} \arctan\frac{\sqrt6x+\sqrt6}{3} + C \end{align*}
12I2−I2=12ln⁡(2x2+4x+5)−66arctan⁡6x+63+C■\begin{align*} \frac12 I_2 - I_2 = &\frac12 \ln(2x^2 + 4x + 5) \\ & - \frac{\sqrt6}{6} \arctan\frac{\sqrt6x+\sqrt6}{3} + C \qed\end{align*}

Quadratic with a repeated root

There is no point using partial fractions, since we can easily integrate (ax+b)−2(ax + b)^{-2}.

Substitutions can typically be bypassed as well.

Example: Find ∫3x(3x+2)2 dx\displaystyle \int \frac{3x}{(3x + 2)^2} \d x.


We can to split this into reciprocal of a linear function and a reciprocal of a quadratic function.

I=∫(3x+2(3x+2)2−2(3x+2)2) dx=∫(13x+2−2(3x+2)2) dx=13ln⁡∣3x+2∣+23(3x+2)+C■\begin{align*} I &= \int \left(\frac{3x + 2}{(3x + 2)^2} - \frac{2}{(3x+2)^2}\right) \d x \\ &= \int \left(\frac{1}{3x + 2} - \frac{2}{(3x+2)^2}\right) \d x \\ &= \frac13\ln\lvert3x+2\rvert + \frac{2}{3(3x+2)} + C\qed\end{align*}

And both terms were divided by 33 because of integration of f(3x+2){f(3x + 2)}.