# Integrals Involving Rational Functions

Consider integral $\int\frac{{{4}{x}-{6}}}{{{{x}}^{{2}}-{3}{x}+{2}}}{d}{x}$.

This integral can be easily evaluated using substitution ${u}={{x}}^{{2}}-{3}{x}+{2}$.

Indeed, ${d}{u}={\left({2}{x}-{3}\right)}{d}{x}$. So, integral becoms ${2}\int\frac{{{d}{u}}}{{u}}={2}{\ln}{\left|{u}\right|}+{C}={2}{\ln}{\left|{{x}}^{{2}}-{3}{x}+{2}\right|}+{C}$.

This integral is easy, because in numerator there is exact derivative of denominator (or a constant multiply). But in many cases there is no derivative in numerator. For example, how to integrate $\int\frac{{1}}{{{{x}}^{{2}}-{3}{x}+{2}}}{d}{x}$?

Example 1. Integrate $\int\frac{{{d}{x}}}{{{{x}}^{{2}}-{3}{x}+{2}}}$.

Note, that ${\left({{x}}^{{2}}-{3}{x}+{2}\right)}={\left({x}-{2}\right)}{\left({x}-{1}\right)}$.

So, $\frac{{1}}{{{{x}}^{{2}}-{3}{x}+{2}}}=\frac{{1}}{{{\left({x}-{2}\right)}{\left({x}-{1}\right)}}}$.

Now, suppose you can decompose it as $\frac{{A}}{{{x}-{2}}}+\frac{{B}}{{{x}-{1}}}$. We need to determine constants A and B.

So, $\frac{{A}}{{{x}-{2}}}+\frac{{B}}{{{x}-{1}}}=\frac{{{A}{\left({x}-{1}\right)}+{B}{\left({x}-{2}\right)}}}{{{\left({x}-{2}\right)}{\left({x}-{1}\right)}}}$.

And this must be equal for any ${x}$ to $\frac{{1}}{{{\left({x}-{2}\right)}{\left({x}-{1}\right)}}}$. Denominators are equal, so we require equality of numerators:

Thus, ${A}{\left({x}-{1}\right)}+{B}{\left({x}-{2}\right)}={1}$.

At this point we have one of two ways to proceed. One way will always work, but is often requires more work. The other, while it wonâ€™t always work, is often quicker when it does work.

First way that always works. We can rewrite equation as ${\left({A}+{B}\right)}{x}+{\left(-{A}-{2}{B}\right)}={0}\cdot{x}+{1}$.

Equating coefficients near like terms gives:

${\left\{\begin{array}{c}{A}+{B}={0}\\-{A}-{2}{B}={1}\\ \end{array}\right.}$.

Adding two equations gives that $-{B}={1}$ or ${B}=-{1}$. From first equation ${A}=-{B}=-{\left(-{1}\right)}={1}$.

Second way that will not always work. Note that ${A}{\left({x}-{1}\right)}+{B}{\left({x}-{2}\right)}={1}$ must hold for any ${x}.$ Therefore, choosing appropriate ${x}$'s we got the unknown constants to quickly drop out.

If ${x}={1}$ then ${x}-{1}={0}$ and ${A}\cdot{\left({1}-{1}\right)}+{B}{\left({1}-{2}\right)}={1}$,so ${B}=-{1}$.

If ${x}={2}$ then ${x}-{2}={0}$ and ${A}\cdot{\left({2}-{1}\right)}+{B}{\left({2}-{2}\right)}={1}$, so ${A}={1}$.

Therefore $\frac{{1}}{{{\left({x}-{2}\right)}{\left({x}-{1}\right)}}}=\frac{{1}}{{{x}-{2}}}-\frac{{1}}{{{x}-{1}}}$.

Finally, $\int\frac{{{d}{x}}}{{{{x}}^{{2}}-{3}{x}+{2}}}{d}{x}=\int{\left(\frac{{1}}{{{x}-{2}}}-\frac{{1}}{{{x}-{1}}}\right)}{d}{x}={\ln}{\left|{x}-{2}\right|}-{\ln}{\left|{x}-{1}\right|}+{C}$.

The process described in example 1 is called partial fraction decomposition.

Definition. Partial Fraction Decomposition is a process of taking a rational expression and decomposing it into simpler rational expressions that we can add or subtract to get the original rational expression. Many integrals are solved quickly with performing partial fraction decomposition.

Partial fractions can only be done if the degree of the numerator is strictly less than the degree of the denominator. If this doesn't hold, we first need to perform long division.

Example 2. Evaluate $\int\frac{{{{x}}^{{3}}-{3}{{x}}^{{2}}+{2}{x}+{4}}}{{{{x}}^{{2}}-{3}{x}+{2}}}{d}{x}$.

Here degree of numerator is greater than degree of denominator, so perform long division first:

$\int\frac{{{{x}}^{{3}}-{3}{{x}}^{{2}}+{2}{x}+{4}}}{{{{x}}^{{2}}-{3}{x}+{2}}}{d}{x}=\int\frac{{{x}{\left({{x}}^{{2}}-{3}{x}+{2}\right)}+{4}}}{{{{x}}^{{2}}-{3}{x}+{2}}}{d}{x}=\int{\left({x}+{4}\frac{{1}}{{{{x}}^{{2}}-{3}{x}+{2}}}\right)}{d}{x}=$

$=\int{\left({x}+\frac{{4}}{{{x}-{2}}}-\frac{{4}}{{{x}-{1}}}\right)}{d}{x}=\frac{{1}}{{2}}{{x}}^{{2}}+{4}{\ln}{\left|{x}-{2}\right|}-{4}{\ln}{\left|{x}-{1}\right|}+{C}$.

In general if you have in denominator ${{\left({a}_{{n}}{{x}}^{{n}}+{a}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+\ldots+{a}_{{0}}\right)}}^{{k}}$ then corresponding term in partial fraction decomposition is $\frac{{{A}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+{A}_{{{n}-{2}}}{{x}}^{{{n}-{2}}}+\ldots+{A}_{{0}}}}{{{a}_{{n}}{{x}}^{{n}}+{a}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+\ldots+{a}_{{0}}}}+\frac{{{A}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+{A}_{{{n}-{2}}}{{x}}^{{{n}-{2}}}+\ldots+{A}_{{0}}}}{{{\left({a}_{{n}}{{x}}^{{n}}+{a}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+\ldots+{a}_{{0}}\right)}}^{{2}}}+\ldots+$

$+\frac{{{A}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+{A}_{{{n}-{2}}}{{x}}^{{{n}-{2}}}+\ldots+{A}_{{0}}}}{{{\left({a}_{{n}}{{x}}^{{n}}+{a}_{{{n}-{1}}}{{x}}^{{{n}-{1}}}+\ldots+{a}_{{0}}\right)}}^{{k}}}$.

In particular,

1. ${a}{x}+{b}\to\frac{{A}}{{{a}{x}+{b}}}$
2. ${a}{{x}}^{{2}}+{b}{x}+{c}\to\frac{{{A}{x}+{B}}}{{{a}{{x}}^{{2}}+{b}{x}+{c}}}$
3. ${{\left({a}{x}+{b}\right)}}^{{2}}\to\frac{{A}}{{{a}{x}+{b}}}+\frac{{B}}{{{\left({a}{x}+{b}\right)}}^{{2}}}$
4. ${{\left({a}{{x}}^{{2}}+{b}{x}+{c}\right)}}^{{2}}\to\frac{{{A}{x}+{B}}}{{{a}{{x}}^{{2}}+{b}{x}+{c}}}+\frac{{{C}{x}+{D}}}{{{\left({a}{{x}}^{{2}}+{b}{x}+{c}\right)}}^{{2}}}$.

Often there are quadratic terms that can't be reduced (discriminant is negative). In this case you should complete a square.

Example 3. Find $\int\frac{{1}}{{{{x}}^{{2}}-{6}{x}+{10}}}{d}{x}$.

${{x}}^{{2}}-{6}{x}+{10}$ cannot be factored, so complete a square: ${{x}}^{{2}}-{6}{x}+{10}={{x}}^{{2}}-{6}{x}+{9}+{1}={{\left({x}-{3}\right)}}^{{2}}+{1}$.

$\int\frac{{1}}{{{{\left({x}-{3}\right)}}^{{2}}+{1}}}{d}{x}={\operatorname{arctan}{{\left({x}-{3}\right)}}}+{C}$.

In general you will need following integrals:

1. $\int\frac{{1}}{{{a}{x}+{b}}}{d}{x}=\frac{{1}}{{a}}{\ln}{\left|{a}{x}+{b}\right|}+{C}$
2. $\int\frac{{x}}{{{{x}}^{{2}}\pm{a}}}{d}{x}=\frac{{1}}{{2}}{\ln}{\left|{{x}}^{{2}}\pm{a}\right|}+{C}$
3. $\int\frac{{1}}{{{{\left({x}+{a}\right)}}^{{2}}+{{b}}^{{2}}}}{d}{x}=\frac{{1}}{{b}}{{\tan}}^{{-{1}}}{\left(\frac{{{x}+{a}}}{{b}}\right)}+{C}$
4. $\int\frac{{1}}{{{\left({a}{x}+{b}\right)}}^{{2}}}{d}{x}=-\frac{{1}}{{a}}\frac{{1}}{{{a}{x}+{b}}}+{C}$

Example 4. Integrate $\int\frac{{{2}{{x}}^{{2}}-{x}+{4}}}{{{{x}}^{{3}}+{4}{x}}}{d}{x}$

Since ${{x}}^{{3}}+{4}{x}={x}{\left({{x}}^{{2}}+{4}\right)}$ then partial fraction decomposition is $\frac{{{2}{{x}}^{{2}}-{x}+{4}}}{{{x}{\left({{x}}^{{2}}+{4}\right)}}}=\frac{{A}}{{x}}+\frac{{{B}{x}+{C}}}{{{{x}}^{{2}}+{4}}}$.

Multiplying by ${x}{\left({{x}}^{{2}}+{4}\right)}$ we have that ${\left({2}{{x}}^{{2}}-{x}+{4}\right)}={A}{\left({{x}}^{{2}}+{4}\right)}+{x}{\left({B}{x}+{C}\right)}={\left({A}+{B}\right)}{{x}}^{{2}}+{C}{x}+{4}{A}$.

Equating coefficients near like terms yields ${A}+{B}={2}$, ${C}=-{1}$ and ${4}{A}={4}$.

Thus, ${A}={1}$, ${B}={1}$, ${C}=-{1}$.

$\int\frac{{{2}{{x}}^{{2}}-{x}+{4}}}{{{{x}}^{{3}}+{4}{x}}}{d}{x}=\int{\left(\frac{{1}}{{x}}+\frac{{{x}-{1}}}{{{{x}}^{{2}}+{4}}}\right)}{d}{x}=\int{\left(\frac{{1}}{{x}}+\frac{{x}}{{{{x}}^{{2}}+{4}}}-\frac{{1}}{{{{x}}^{{2}}+{4}}}\right)}{d}{x}=$

$={\ln}{\left|{x}\right|}+\frac{{1}}{{2}}{\ln}{\left|{{x}}^{{2}}+{4}\right|}-\frac{{1}}{{2}}{{\tan}}^{{-{1}}}{\left(\frac{{x}}{{2}}\right)}+{C}$.

Example 5. Evaluate $\int\frac{{{2}{{x}}^{{3}}-{11}{{x}}^{{2}}-{2}{x}+{2}}}{{{2}{{x}}^{{2}}+{x}-{1}}}{d}{x}$.

Degree of numerator is greater than degree of denominator, so we must first perform long division.

$\frac{{{2}{{x}}^{{3}}-{11}{{x}}^{{2}}-{2}{x}+{2}}}{{{2}{{x}}^{{2}}+{x}-{1}}}={x}-{6}+\frac{{{5}{x}-{4}}}{{{2}{{x}}^{{2}}+{x}-{2}}}={x}-{6}+\frac{{{5}{x}-{4}}}{{{\left({2}{x}-{1}\right)}{\left({x}+{1}\right)}}}$.

Partial fraction decomposition is $\frac{{{5}{x}-{4}}}{{{\left({2}{x}-{1}\right)}{\left({x}+{1}\right)}}}=\frac{{A}}{{{2}{x}-{1}}}+\frac{{B}}{{{x}+{1}}}$.

Multiplying by ${\left({2}{x}-{1}\right)}{\left({x}+{1}\right)}$ gives the following: ${5}{x}-{4}={A}{\left({x}+{1}\right)}+{B}{\left({2}{x}-{1}\right)}$.

If ${x}=-{1}$ then ${5}\cdot{\left(-{1}\right)}-{4}={A}{\left(-{1}+{1}\right)}+{B}{\left({2}\cdot{\left(-{1}\right)}-{1}\right)}$ or ${B}={3}$.

If ${x}=\frac{{1}}{{2}}$ then ${5}\cdot\frac{{1}}{{2}}-{4}={A}{\left(\frac{{1}}{{2}}+{1}\right)}+{B}{\left({2}\cdot\frac{{1}}{{2}}-{1}\right)}$ or ${A}=-{1}$.

So, $\frac{{{5}{x}-{4}}}{{{\left({2}{x}-{1}\right)}{\left({x}+{1}\right)}}}=-\frac{{1}}{{{2}{x}-{1}}}+\frac{{3}}{{{x}+{1}}}$.

Finally, $\int\frac{{{2}{{x}}^{{3}}-{11}{{x}}^{{2}}-{2}{x}+{2}}}{{{2}{{x}}^{{2}}+{x}-{1}}}{d}{x}=\int{\left({x}-{6}-\frac{{1}}{{{2}{x}-{1}}}+\frac{{3}}{{{x}+{1}}}\right)}{d}{x}=$

$=\frac{{1}}{{2}}{{x}}^{{2}}-{6}{x}-\frac{{1}}{{2}}{\ln}{\left|{2}{x}-{1}\right|}+{3}{\ln}{\left|{x}+{1}\right|}+{C}$.

Example 6. Evaluate $\int\frac{{{15}{{x}}^{{2}}-{29}{x}+{15}}}{{{x}{\left({x}-{3}\right)}{\left({4}{x}-{5}\right)}}}{d}{x}$.

Partial fraction decomposition is $\frac{{{15}{{x}}^{{2}}-{29}{x}+{15}}}{{{x}{\left({x}-{3}\right)}{\left({4}{x}-{5}\right)}}}=\frac{{A}}{{x}}+\frac{{B}}{{{x}-{3}}}+\frac{{C}}{{{4}{x}-{5}}}$.

Multiplying by ${x}{\left({x}-{3}\right)}{\left({4}{x}-{5}\right)}$ yields ${15}{{x}}^{{2}}-{29}{x}+{15}={A}{\left({x}-{3}\right)}{\left({4}{x}-{5}\right)}+{B}{x}{\left({4}{x}-{5}\right)}+{C}{x}{\left({x}-{3}\right)}.$

If ${x}={0}$ then ${15}\cdot{{0}}^{{2}}-{29}\cdot{0}+{15}={A}{\left({0}-{3}\right)}{\left({4}\cdot{0}-{5}\right)}+{B}\cdot{0}\cdot{\left({4}\cdot{0}-{5}\right)}+{C}\cdot{0}\cdot{\left({0}-{3}\right)}$ or ${A}={1}$.

If ${x}={3}$ then ${15}\cdot{{3}}^{{2}}-{29}\cdot{3}+{15}={A}{\left({3}-{3}\right)}{\left({4}\cdot{3}-{5}\right)}+{B}\cdot{3}\cdot{\left({4}\cdot{3}-{5}\right)}+{C}\cdot{3}\cdot{\left({3}-{3}\right)}$ or ${B}={3}$.

If ${x}=\frac{{5}}{{4}}$ then ${15}\cdot{{\left(\frac{{5}}{{4}}\right)}}^{{2}}-{29}\cdot{\left(\frac{{5}}{{4}}\right)}+{15}=$

$={A}{\left({\left(\frac{{5}}{{4}}\right)}-{3}\right)}{\left({4}\cdot{\left(\frac{{5}}{{4}}\right)}-{5}\right)}+{B}\cdot{\left(\frac{{5}}{{4}}\right)}\cdot{\left({4}\cdot{\left(\frac{{5}}{{4}}\right)}-{5}\right)}+{C}\cdot{\left(\frac{{5}}{{4}}\right)}\cdot{\left({\left(\frac{{5}}{{4}}\right)}-{3}\right)}$ or ${C}=-{1}$.

So, $\frac{{{15}{{x}}^{{2}}-{29}+{15}}}{{{x}{\left({x}-{3}\right)}{\left({4}{x}-{5}\right)}}}=\frac{{1}}{{x}}+\frac{{3}}{{{x}-{3}}}-\frac{{1}}{{{4}{x}-{5}}}$.

Thus, required integral is $\int{\left(\frac{{1}}{{x}}+\frac{{3}}{{{x}-{3}}}+\frac{{1}}{{{4}{x}-{5}}}\right)}{d}{x}={\ln}{\left|{x}\right|}+{\ln}{\left|{x}-{3}\right|}+\frac{{1}}{{4}}{\ln}{\left|{4}{x}-{5}\right|}+{C}$.

Example 7. Integrate $\int\frac{{x}}{{{{\left({x}+{2}\right)}}^{{2}}{\left({x}-{1}\right)}{d}{x}}}$.

Partial fraction decomposition is $\frac{{x}}{{{{\left({x}+{2}\right)}}^{{2}}{\left({x}-{1}\right)}}}=\frac{{A}}{{{x}+{2}}}+\frac{{B}}{{{\left({x}+{2}\right)}}^{{2}}}+\frac{{C}}{{{x}-{1}}}$.

Multiplying both by denominator gives ${x}={A}{\left({x}+{2}\right)}{\left({x}-{1}\right)}+{B}{\left({x}-{1}\right)}+{C}{{\left({x}+{2}\right)}}^{{2}}$.

If ${x}={1}$ then ${1}={A}{\left({1}+{2}\right)}{\left({1}-{1}\right)}+{B}{\left({1}-{1}\right)}+{C}{{\left({1}+{2}\right)}}^{{2}}$ or ${C}=\frac{{1}}{{9}}$.

If ${x}=-{2}$ then $-{2}={A}{\left(-{2}+{2}\right)}{\left(-{2}-{1}\right)}+{B}{\left(-{2}-{1}\right)}+{C}{{\left(-{2}+{2}\right)}}^{{2}}$ or ${B}=\frac{{2}}{{3}}$.

To find constant A we can't use second method anymore, so we rewrite ${x}={A}{\left({x}+{2}\right)}{\left({x}-{1}\right)}+{B}{\left({x}-{1}\right)}+{C}{{\left({x}+{2}\right)}}^{{2}}$ as

${x}={\left({A}+{C}\right)}{{x}}^{{2}}+{\left({A}+{B}+{4}{C}\right)}{x}+{\left(-{2}{A}-{B}+{4}{C}\right)}$.

From this we have that ${A}+{C}={0}$. We've already found that ${C}=\frac{{1}}{{9}}$, so ${A}=-\frac{{1}}{{9}}$.

Therefore, $\frac{{x}}{{{{\left({x}+{2}\right)}}^{{2}}{\left({x}-{1}\right)}}}=-\frac{{1}}{{9}}\frac{{1}}{{{x}+{2}}}+\frac{{2}}{{3}}\frac{{1}}{{{\left({x}+{2}\right)}}^{{2}}}+\frac{{1}}{{9}}\frac{{1}}{{{x}-{1}}}$.

Thus, required integral is $\int{\left(-\frac{{1}}{{9}}\frac{{1}}{{{x}+{2}}}+\frac{{1}}{{3}}\frac{{1}}{{{\left({x}+{2}\right)}}^{{2}}}+\frac{{1}}{{9}}\frac{{1}}{{{x}-{1}}}\right)}{d}{x}=$

$=-\frac{{1}}{{9}}{\ln}{\left|{x}+{2}\right|}-\frac{{2}}{{3}}\frac{{1}}{{{x}+{2}}}+\frac{{1}}{{9}}{\ln}{\left|{x}-{1}\right|}+{C}$.

Example 8. Find $\int\frac{{{x}}^{{2}}}{{{{x}}^{{2}}-{1}}}{d}{x}$.

First perform long division: $\frac{{{{x}}^{{2}}}}{{{{x}}^{{2}}-{1}}}={1}+\frac{{1}}{{{{x}}^{{2}}-{1}}}$.

Partial fraction decomposition is $\frac{{1}}{{{{x}}^{{2}}-{1}}}=\frac{{1}}{{2}}\frac{{1}}{{{x}-{1}}}-\frac{{1}}{{2}}\frac{{1}}{{{x}+{1}}}$.

Therefore, $\int\frac{{{{x}}^{{2}}}}{{{{x}}^{{2}}-{1}}}{d}{x}=\int{\left({1}+\frac{{1}}{{2}}\frac{{1}}{{{x}-{1}}}-\frac{{1}}{{2}}\frac{{1}}{{{x}+{1}}}\right)}{d}{x}={x}+\frac{{1}}{{2}}{\ln}{\left|{x}-{1}\right|}-\frac{{1}}{{2}}{\ln}{\left|{x}+{1}\right|}+{C}$.

Some integral with roots can be expressed as integral of rational function.

Example 9. $\int\frac{{1}}{{{x}-\sqrt{{{x}+{2}}}}}{d}{x}$.

Let ${u}=\sqrt{{{x}+{2}}}$ then ${d}{u}=\frac{{1}}{{2}}\frac{{1}}{{\sqrt{{{x}+{2}}}}}{d}{x}$ or ${d}{x}={2}\sqrt{{{x}+{2}}}{d}{u}={2}{u}{d}{u}$.

Also since ${u}=\sqrt{{{x}+{2}}}$ then ${x}={{u}}^{{2}}-{2}$.

So, $\int\frac{{1}}{{{x}-\sqrt{{{x}+{2}}}}}{d}{x}=\int\frac{{{2}{u}}}{{{{u}}^{{2}}-{u}-{2}}}{d}{u}$.

Since ${{u}}^{{2}}-{u}-{2}={\left({u}-{2}\right)}{\left({u}+{1}\right)}$ then partial fraction decomposition is $\frac{{{2}{u}}}{{{\left({u}-{2}\right)}{\left({u}+{1}\right)}}}=\frac{{A}}{{{u}-{2}}}+\frac{{B}}{{{u}+{1}}}$.

Multiplying by ${\left({u}-{2}\right)}{\left({u}+{1}\right)}$ yields ${2}{u}={A}{\left({u}+{1}\right)}+{B}{\left({u}-{2}\right)}$.

If ${u}=-{1}$ then ${2}\cdot{\left(-{1}\right)}={A}{\left(-{1}+{1}\right)}+{B}{\left(-{1}-{2}\right)}$ or ${B}=\frac{{2}}{{3}}$.

If ${u}={2}$ then ${2}\cdot{2}={A}{\left({2}+{1}\right)}+{B}{\left({2}-{2}\right)}$ or ${A}=\frac{{4}}{{3}}$.

So, $\int\frac{{{2}{u}}}{{{{u}}^{{2}}-{u}-{2}}}{d}{u}=\int{\left(\frac{{4}}{{3}}\frac{{1}}{{{u}-{2}}}+\frac{{2}}{{3}}\frac{{1}}{{{u}+{1}}}\right)}{d}{u}=\frac{{4}}{{3}}{\ln}{\left|{u}-{2}\right|}+\frac{{2}}{{3}}{\ln}{\left|{u}+{1}\right|}+{C}=$

$=\frac{{4}}{{3}}{\ln}{\left|\sqrt{{{x}+{2}}}-{2}\right|}+\frac{{2}}{{3}}{\ln}{\left|\sqrt{{{x}+{2}}}+{1}\right|}+{C}$.

Example 10. Find $\int\frac{{{3}{x}+{5}}}{{{{x}}^{{2}}+{10}{x}+{34}}}{d}{x}$.

Factor in denominator is irreducible, so complete the square: ${{x}}^{{2}}+{10}{x}+{34}={{x}}^{{2}}+{10}{x}+{25}+{9}={{\left({x}+{5}\right)}}^{{2}}+{9}$.

Now make substitution ${u}={x}+{5}$ then ${d}{u}={d}{x}$ and ${x}={u}-{5}$.

Thus, $\int\frac{{{3}{x}+{5}}}{{{{x}}^{{2}}+{10}{x}+{34}}}{d}{x}=\int\frac{{{3}{\left({u}-{5}\right)}+{5}}}{{{{u}}^{{2}}+{9}}}{d}{u}={3}\int\frac{{u}}{{{{u}}^{{2}}+{9}}}{d}{u}-{10}\int\frac{{1}}{{{{u}}^{{2}}+{9}}}{d}{u}=$

$=\frac{{3}}{{2}}{\ln}{\left|{{u}}^{{2}}+{9}\right|}-\frac{{10}}{{3}}{\operatorname{arctan}{{\left(\frac{{u}}{{3}}\right)}}}+{C}=\frac{{3}}{{2}}{\ln{{\left({{\left({x}+{5}\right)}}^{{2}}+{9}\right)}}}-\frac{{10}}{{3}}{\operatorname{arctan}{{\left(\frac{{{x}+{5}}}{{3}}\right)}}}+{C}$.

Now, let's see how to handle integrals where irreducible factor is raised to some power.

Example 11. Evaluate $\int\frac{{1}}{{{\left({{x}}^{{2}}+{4}{x}+{13}\right)}}^{{3}}}{d}{x}$.

We first complete the square: ${{x}}^{{2}}+{4}{x}+{13}={{x}}^{{2}}+{4}{x}+{4}+{9}={{\left({x}+{2}\right)}}^{{2}}+{9}$.

Now, make substitution ${u}={x}+{2}$ then ${d}{u}={d}{x}$.

$\int\frac{{1}}{{{\left({{\left({x}+{2}\right)}}^{{2}}+{9}\right)}}^{{3}}}{d}{x}=\int\frac{{1}}{{{\left({{u}}^{{2}}+{9}\right)}}^{{3}}}{d}{u}$.

We will need trig substitution here.

Let ${u}={3}{\tan{{\left({t}\right)}}}$ then ${{u}}^{{2}}+{9}={9}{{\tan}}^{{2}}{\left({t}\right)}+{9}={9}{{\sec}}^{{2}}{\left({t}\right)}$ and ${d}{u}={3}{{\sec}}^{{2}}{\left({t}\right)}{d}{t}$.

So, $\int\frac{{1}}{{{\left({{u}}^{{2}}+{9}\right)}}^{{3}}}{d}{u}=\int\frac{{{3}{{\sec}}^{{2}}{\left({t}\right)}}}{{{9}{{\sec}}^{{2}}{\left({t}\right)}}}{d}{t}=\frac{{1}}{{243}}\int\frac{{1}}{{{{\sec}}^{{4}}{\left({t}\right)}}}{d}{t}$.

To find this integral we need to use techniques from Integrals Involving Trig Functions note.

$\frac{{1}}{{243}}\int\frac{{1}}{{{{\sec}}^{{4}}{\left({t}\right)}}}{d}{t}=\frac{{1}}{{243}}\int{{\cos}}^{{4}}{\left({t}\right)}{d}{t}=\frac{{1}}{{243}}\int{{\left({{\cos}}^{{2}}{\left({t}\right)}\right)}}^{{2}}{d}{t}=\frac{{1}}{{243}}\int{{\left(\frac{{1}}{{2}}{\left({1}+{\cos{{\left({2}{t}\right)}}}\right)}\right)}}^{{2}}{d}{t}=$

$=\frac{{1}}{{972}}\int{\left({1}+{2}{\cos{{\left({2}{t}\right)}}}+{{\cos}}^{{2}}{\left({2}{t}\right)}\right)}{d}{t}=\frac{{1}}{{972}}\int{\left({1}+{2}{\cos{{\left({2}{t}\right)}}}+\frac{{1}}{{2}}{\left({1}+{\cos{{\left({4}{t}\right)}}}\right)}\right)}{d}{t}=$

$=\frac{{1}}{{972}}{\left(\frac{{3}}{{2}}{t}+{\sin{{\left({2}{t}\right)}}}+\frac{{1}}{{8}}{\sin{{\left({4}{t}\right)}}}\right)}+{C}$.

Since ${u}={3}{\tan{{\left({t}\right)}}}$ and ${u}={\left({x}+{2}\right)}$ then ${t}={\operatorname{arctan}{{\left(\frac{{{x}+{2}}}{{3}}\right)}}}$.

So, $\int\frac{{1}}{{{\left({{x}}^{{2}}+{4}{x}+{13}\right)}}^{{3}}}{d}{x}=$

$=\frac{{1}}{{972}}{\left(\frac{{3}}{{2}}{\operatorname{arctan}{{\left(\frac{{{x}+{2}}}{{3}}\right)}}}+{\sin{{\left({2}{\operatorname{arctan}{{\left(\frac{{{x}+{2}}}{{3}}\right)}}}\right)}}}+\frac{{1}}{{8}}{\sin{{\left({4}{\operatorname{arctan}{{\left(\frac{{{x}+{2}}}{{3}}\right)}}}\right)}}}\right)}+{C}$.