next up previous index
Next: Bibliography Up: 17. Antidifferentiation Techniques Previous: 17.6 Substitution in Integrals   Index


17.7 Rational Functions

In this section we present a few rules for finding antiderivatives of simple rational functions.


To antidifferentiate $\displaystyle { {{P(x)}\over {(x-c)^n}}}$ where $P$ is a polynomial, make the substitution $u=x-c$.

17.56   Example. To find $\displaystyle { \int {{x^2+1}\over {(x-2)^2}}dx}$.

Let $u=x-2$. Then $x=2+u$ so $dx=du$, and

\begin{eqnarray*}
\int {{(x^2+1)}\over {(x-2)^2}}dx &=& \int {{(2+u)^2+1}\over {...
...-{5\over u}\\
&=& (x-2)+4\ln (\vert x-2\vert)-{5\over {(x-2)}}.
\end{eqnarray*}




To find $\displaystyle { \int {{R(x)}\over {(x-a)(x-b)}}dx}$ where $a\neq b$ and $R$ is a polynomial of degree less than $2$.

We will find numbers $A$ and $B$ such that

\begin{displaymath}
{{R(x)}\over {(x-a)(x-b)}}={A\over {(x-a)}}+{B\over {(x-b)}}.
\end{displaymath} (17.57)

Suppose (17.57) were valid. If we multiply both sides by $(x-a)$ we get

\begin{displaymath}{{R(x)}\over {(x-b)}}=A+{{B(x-a)}\over {x-b}}.\end{displaymath}

Now take the limit as $x$ goes to $a$ to get

\begin{displaymath}{{R(a)}\over {a-b}}=A.\end{displaymath}

The reason I took a limit here, instead of saying ``now for $x = a$ we get $\cdots$'' is that $a$ is not in the domain of the function we are considering. Similarly

\begin{displaymath}{{R(x)}\over {x-a}}={{A(x-b)}\over {x-a}}+B,\end{displaymath}

and if we take the limit as $x$ goes to $b$, we get

\begin{displaymath}{{R(b)}\over {b-a}}=B.\end{displaymath}

Thus,
\begin{displaymath}
{{R(x)}\over {(x-a)(x-b)}}={1\over {a-b}}\Bigg[ {{R(a)}\over
{x-a}}-{{R(b)}\over {x-b}}\Bigg].
\end{displaymath} (17.58)

I have now shown that if there are numbers $A$ and $B$ such that (17.57) holds, then (17.58) holds. Since I have not shown that such numbers exist, I will verify directly that (17.58) is valid. Write $R(x)=px+q$. Then

\begin{eqnarray*}
{1\over {a-b}}\Bigg[ {{R(a)}\over {x-a}}-{{R(b)}\over {x-b}}\B...
...(x-a)(x-b)}} = {{R(x)}\over {(x-a)(x-b)}}.\mbox{ $\diamondsuit$}
\end{eqnarray*}



17.59   Example. To find $\displaystyle { \int {{x+1}\over {(x+2)(x+3)}}dx}$.

Let $\displaystyle { {{x+1}\over {(x+2)(x+3)}}={A\over {x+2}}+{B\over {x+3}}}$.

Then

\begin{displaymath}{{x+1}\over {x+3}}=A+{{x+2}\over {x+3}}B,\end{displaymath}

so

\begin{displaymath}A= {{-2+1}\over {-2+3}}=-1,\end{displaymath}

and

\begin{displaymath}{{x+1}\over {x+2}}=A{{(x+3)}\over{x+2}}+B,\end{displaymath}

so

\begin{displaymath}B={{-3+1}\over {-3+2}}=2.\end{displaymath}

Hence

\begin{eqnarray*}
\int {{x+1}\over {(x+2)(x+3)}}dx &=& \int {{-1}\over {x+2}}+{2\over {x+3}}dx \\
&=& -\ln (\vert x+2\vert)+2\ln (\vert x+3\vert).
\end{eqnarray*}



In this example I did not use formula (17.58), because I find it easier to remember the procedure than the general formula. I do not need to check my answer, because my proof of (17.58) shows that the procedure always works. (In practice, I usually do check the result because I am likely to make an arithmetic error.)


To find $\displaystyle { \int {{R(x)}\over {x^2+ax+b}}dx}$ where $R$ is a polynomial of degree $<2$, and $x^2+ax+b$ does not factor as a product of two first degree polynomials.

Complete the square to write

\begin{displaymath}x^2+ax+b=(x-m)^2+k.\end{displaymath}

Then $k>0$, since if $k=0$ then we have factored $x^2+ax+b$, and if $k < 0$ we can write $k=-n^2$, and then

\begin{displaymath}(x-m)^2+k=(x-m)^2-n^2=\Big((x-m)-n\Big)\Big((x-m)+n\Big)\end{displaymath}

and again we get a factorization of $x^2+ax+b$. Since $k>0$, we can write $k=q^2$ for some $q\in\mbox{{\bf R}}$, and

\begin{displaymath}x^2+ax+b=(x-m)^2+q^2.\end{displaymath}

Now

\begin{displaymath}\int {{R(x)}\over {x^2+ax+b}}dx=\int {{R(x)}\over {(x-m)^2+q^2}}dx.\end{displaymath}

Make the substitution $u=x-m$ to get an antiderivative of the form

\begin{eqnarray*}
\int {{Au+B}\over {u^2+q^2}}du &=& {A\over 2}\int {{2u}\over {...
...}}du \\
&=& {A\over 2}\ln (u^2+q^2)+B\int {1\over {u^2+q^2}}du.
\end{eqnarray*}



The last antiderivative can be found by a trigonometric substitution.

17.60   Example. To find $\displaystyle {\int {u\over {4u^2+8u+7}}du}$:

Let

\begin{eqnarray*}
I=\int {u\over {4u^2+8u+7}}du &=& {1\over 4}\int {u\over {u^2+...
...r 4}}}du \\
&=& {1\over 4}\int {u\over {(u+1)^2+{3\over 4}}}du.
\end{eqnarray*}



Let $t=u+1$, so $u=t-1$ and $du=dt$. Then

\begin{eqnarray*}
I &=& {1\over 4}\int {{t-1}\over {t^2+{3\over 4}}}dt = {1\over...
... (u^2+2u+{7\over 4})-{1\over 4}\int {1\over {t^2+{3\over
4}}}dt.
\end{eqnarray*}



Now let $\displaystyle { t={{\sqrt 3}\over 2}\tan\theta}$, so $\displaystyle { dt={{\sqrt 3}\over
2}\sec^2\theta \; d\theta}$, and $\displaystyle { t^2+{3\over 4}={3\over 4}\sec^2\theta}$. Then

\begin{eqnarray*}
\int {1\over {t^2+{3\over 4}}}dt &=& \int {{ {{\sqrt 3}\over
2...
...&=& {2\over {\sqrt 3}}\arctan\Big( {{2u+2}\over {\sqrt 3}}\Big).
\end{eqnarray*}



Hence,

\begin{displaymath}I={1\over 8}\ln\Big( u^2+2u+{7\over 4}\Big)-{1\over {2\sqrt 3}}\arctan \Big(
{{2u+2}\over {\sqrt 3}}\Big).\end{displaymath}


To find $\displaystyle { \int {{R(x)}\over {x^2+ax+b}}dx}$ where $R$ is a polynomial of degree $>1$.

First use long division to write

\begin{displaymath}{{R(x)}\over {x^2+ax+b}}=Q(x)+{{P(x)}\over {x^2+ax+b}}\end{displaymath}

where $Q$ is a polynomial, and $P$ is a polynomial of degree $\leq 1$. Then use one of the methods already discussed.

17.61   Example. To find $\displaystyle {\int {{x^3+1}\over {x^2+1}}dx}$. By using long division, we get
\psfig{file=ch17c.eps,width=2.5in}

\begin{displaymath}{{x^3+1}\over {x^2+1}}=x+{{-x+1}\over {x^2+1}}.\end{displaymath}

Hence

\begin{eqnarray*}
\int {{x^3+1}\over {x^2+1}}dx &=& \int x - {x\over {x^2+1}}+{1...
...x^2+1}}dx &=& {1\over 2}x^2-{1\over 2}\ln (x^2+1)+\arctan (x).
\end{eqnarray*}



17.62   Example. In exercise 17.7, you showed that $\ln\Big(
\vert\sec(x)+\tan(x)\vert\Big)$ is an antiderivative for $\sec(x)$. The function $\ln\Big(
\vert\sec(x)+\tan(x)\vert\Big)$ in that exercise appeared magically with no motivation. I will now derive the formula, using standard methods:

\begin{displaymath}\int\sec(x)\;dx=\int {1\over {\cos(x)}}\;dx=\int{{\cos(x)}\over
{\cos^2(x)}}\;dx=\int {{\cos(x)}\over {1-\sin^2(x)}}\;dx.\end{displaymath}

Now let $u=\sin(x)$. Then $du=\cos(x)\;dx$, and

\begin{displaymath}\int\sec(x)\;dx=\int {{du}\over {1-u^2}}.\end{displaymath}

Suppose $\displaystyle { {1\over {1-u^2}}={A\over {1-u}}+{B\over {1+u}}}$. Then

\begin{displaymath}{1\over {1+u}}=A+{{B(1-u)}\over {(1+u)}},\end{displaymath}

and if we take the limit of both sides as $u\to 1$ we get $\displaystyle {A={1\over 2}}$. Also

\begin{displaymath}{1\over {1-u}}={{A(1+u)}\over {1-u}}+B,\end{displaymath}

and if we take the limit as $u\to-1$, we get $\displaystyle {B={1\over 2}}$. Thus

\begin{eqnarray*}
\int\sec(x)\;dx &=& \int {1\over {1-u^2}}\;du \\
&=&{1\over 2...
...eft(\left\vert {{1+\sin(x)}\over
{1-\sin(x)}}\right\vert\right).
\end{eqnarray*}



Now

\begin{displaymath}{{1+\sin(x)}\over {1-\sin(x)}}={{1+\sin(x)}\over
{1-\sin(x)}}...
...over
{1-\sin^2(x)}}={{\Big(1+\sin(x)\Big)^2}\over {\cos^2(x)}},\end{displaymath}

so

\begin{eqnarray*}
{1\over 2}\ln\left(\left\vert {{1+\sin(x)}\over
{1-\sin(x)}}\r...
...right\vert\right)\\
&=&\ln\Big( \vert\sec(x)+\tan(x)\vert\Big),
\end{eqnarray*}



and thus

\begin{displaymath}\int\sec(x)\;dx=\ln\Big(\vert \sec(x)+\tan(x)\vert\Big).\end{displaymath}

17.63   Exercise. Criticize the following argument:

I want to find $\displaystyle {\int {{x^2}\over {x^2-1}}dx = \int {{x^2}\over
{(x-1)(x+1)}}dx}$. Suppose

\begin{displaymath}{{x^2}\over {(x-1)(x+1)}}={A\over {x-1}}+{B\over {x+1}}.\end{displaymath}

Then

\begin{displaymath}{{x^2}\over {x+1}}=A+{{(x-1)B}\over {x+1}}.\end{displaymath}

If we take the limit of both sides as $x\to 1$, we get $\displaystyle { {1\over 2}=A}$. Also

\begin{displaymath}{{x^2}\over {x-1}}={{A(x+1)}\over {x-1}}+B,\end{displaymath}

and if we take the limit of both sides as $x\to -1$, we get $\displaystyle { -{1\over
2}=B}$. Thus

\begin{displaymath}{{x^2}\over {x^2-1}}={1\over 2}{1\over {x-1}}-{1\over 2}{1\over {x+1}}.\end{displaymath}

Hence,

\begin{displaymath}\int {{x^2}\over {x^2-1}}dx ={1\over 2}\ln (\vert x-1\vert)-{1\over 2}\ln
(\vert x+1\vert).\end{displaymath}

17.64   Exercise. Find the following antiderivatives:

a)
$\displaystyle { \int {1\over {4x^2-1}}dx}$

b)
$\displaystyle {\int {1\over {4x^2+1}}dx}$

c)
$\displaystyle {\int {{x+1}\over {x^2-6x+8}}dx}$

d)
$\displaystyle { \int {{x+1}\over {x^2-6x+9}}dx}$

e)
$\displaystyle {\int {1\over {9x^2+6x+2}}dx}$

f)
$\displaystyle {\int {{x^3}\over {x^2+1}}dx}$

g)
$\displaystyle {\int {1\over {\sqrt{x^2+2x+2}}}dx}$ A

17.65   Exercise. Find the following antiderivatives:
a)
$\displaystyle {\int{\cos(ax) \over \sin^3(ax)} dx }$.
b)
$\displaystyle {\int{\sin(t)\cos(t) \over \cos^2(t) +1}dt}$.
c)
$\displaystyle {\int{1\over(1-t)^3}dt}$.
d)
$\displaystyle {\int{1 \over 5+4x+x^2} dx}$.
e)
$\displaystyle {\int x^3 \sqrt{x^2+1} dx}$.
f)
$\displaystyle {\int {1\over\sqrt{ -3 -4x -x^2}}}$.
g)
$\displaystyle { \int{\sin(2\theta) \over \cos^2(\theta) - \sin^2(\theta)}
d\theta }$.
h)
$\displaystyle {\int(1+\tan(u))^2du}$.
i)
Choose a number $p$, and find $\displaystyle {\int x^p(x^{10} -2)^{10} dx}$.
j)
Choose a number $q$, and find $\displaystyle {\int x^q e^{-{1\over x}}dx}$.
k)
$\displaystyle {\int x e^{-x^2} dx}$.
l)
$\displaystyle {\int{ u^3\over 1+u^2} du}$.
m)
$\displaystyle {\int x^2 \arctan(x) dx}$.
n)
$\displaystyle { \int x^3(1+x)^{1\over 4} dx}$.
o)
$\displaystyle {\int x e^{2x} dx}$.
p)
$\displaystyle {\int \arcsin(x) dx}$.


next up previous index
Next: Bibliography Up: 17. Antidifferentiation Techniques Previous: 17.6 Substitution in Integrals   Index
Ray Mayer 2007-09-07