\magnification=\magstep1
\centerline{Mathematics 136 -- Calculus 2}
\centerline{Everything You Need To Know About Partial Fractions}
\centerline{(and maybe more!)}
\centerline{February 17 and 18, 2020}
\bigskip
Every rational function (quotient of polynomials) can 
be written as {\it a polynomial plus a sum of one or more terms of the following 
forms}:
$${Ax+B\over (x^2+2bx+c)^k},\qquad {C\over (x-a)^k}.$$
A rational function expressed this way is said to be {\it decomposed
into partial fractions}.  The process of finding this decomposition
is as follows:  Given a rational function ${f(x) \over g(x)}$,
\bigskip
\item{1.}  First, if the degree of $g$ is larger already, just
proceed to step 2 with ${f(x)\over g(x)}$.  
Otherwise, if the degree of $f(x)$ is greater than or equal to the 
degree of $g(x)$, {\it divide} $g(x)$ into $f(x)$ using polynomial
long division and write $f(x) = q(x)g(x) + r(x)$ for some
quotient $q(x)$ and remainder $r(x)$.  Then 
$${f(x)\over g(x)} = q(x) + {r(x)\over g(x)}$$
and the degree of $r(x)$ is less than the degree of $g(x)$.  Continue 
to step 2 with ${r(x)\over g(x)}$.  
\item{2.}  {\it Factor} $g(x)$ completely into a product of 
powers of linear polynomials and powers of quadratic
polynomials with no real roots (``irreducible'' quadratics).  
(The fact that this can always be done is one
form of the so-called ``Fundamental Theorem of Algebra''.  The
famous mathematician and physicist Carl Friedrich Gauss gave the first
complete proof of this result in 1799.)
\item{3.}  Assemble the partial fractions:  For each $(x-a)^m$ appearing 
in the factorization of $g(x)$, include a {\it group of terms}
$${C_1\over (x-a)} + {C_2\over (x-a)^2} + \cdots + {C_m\over (x-a)^m}$$
For each $(x^2+2bx+c)^n$ appearing 
in the factorization of $g(x)$, include a {\it group of terms}:
$${A_1x+B_1\over x^2+2bx+c} + {A_2x+B_2\over (x^2+2bx+c)^2} + \cdots + {A_n x+B_n\over (x^2+2bx+c)^n}$$
\item{4.}  Set the rational function from step 1 (either the original
$f/g$ or $r/g$ as appropriate) equal to the sum of the partial fractions,
clear denominators, and solve for the coefficients.  
This last step can be done either by substituting well-chosen $x$-values,
or by equating coefficients of like powers of $x$ on both sides
and solving the resulting system of equations.
\bigskip
\noindent
An interesting consequence of the partial fraction decomposition is that it
shows, {\it in principle}, that 
\bigskip
\proclaim Theorem. Every rational function has elementary antiderivatives.\par
\bigskip
\noindent
(That is, it has antiderivatives that can be expressed in terms of the 
basic functions we know -- logarithms, inverse trig functions, polynomials,
rational functions, etc.)   We add the ``in principle'' here because
determining the factorization of $g(x)$ will not be simple in
some cases, and the methods that allow 
us to integrate the partial fractions with higher powers
of quadratic polynomials in the denominator can involve algebraic maneuvers 
and trig substitutions that can get slightly ``hairy.''  

\bigskip
\noindent
{\it Example 1.}  
In any case, here's a first example of the nicest and simplest type -- 
the top already has smaller degree than the bottom and the 
denominator factors into a product of distinct linear factors:
$$\int {1 \over x^2 + 5x + 6}\ dx = \int {1\over (x + 2)(x + 3)}\ dx.$$
The partial fractions will look like 
$${1\over (x + 2)(x + 3)} = {A\over x + 2} + {B\over x + 3}$$
Clearing denominators and collecting like terms:
$$1 = (A + B)x + (3A + 2B)$$
So $A + B = 0$ and $3A + 2B = 1$.  Solving simultaneously, 
$A = 1$ and $B = -1$.  Hence
$$\int {1\over (x + 2)(x + 3)}\ dx = \int {1 \over x + 2} - {1\over x + 3}\ dx$$
This equals
$$\ln(x + 2) - \ln(x + 3) + C = \ln\left({x + 2 \over x + 3}\right) + C.$$
\bigskip
\noindent
Here's a next example showing most of the different things that can 
happen, except the higher powers of quadratic factors: 
\bigskip
\noindent
{\it Example 2.}  Say we want to decompose 
$${x^4+1\over x^4 + x^2}$$ 
into partial fractions.  First, the degree of the top is $4$ and the 
degree of the bottom is $4$ also, so we begin by dividing the 
bottom into the top:
$$x^4 + 1 = 1(x^4 + x^2) + (- x^2 + 1)$$
This means 
$${x^4+1\over x^4 + x^2} = 1 + {- x^2 + 1\over x^4 + x^2}$$
We continue to step 2 with the rational function 
$${-x^2 + 1\over x^4 + x^2}$$
The factorization of the denominator is 
$$x^4 + x^2 = x^2(x^2 + 1)$$
Hence our general recipe for assembling the partial fractions says:
$${-x^2 + 1\over x^4 + x^2}
= {C_1 \over x} + {C_2 \over x^2} + {A x + B \over x^2 + 1}$$
So after clearing denominators and collecting terms,
$$-x^2 + 1 = C_1x(x^2+1) + C_2(x^2+1) + (A x + B)x^2
=(A + C_1)x^3 + (B+C_2)x^2+C_1 x + C_2$$
Equating coefficients of like powers of $x$,
$$C_2 = 1, C_1 = 0, B+C_2 = -1, A + C_1 = 0,$$
so 
$$C_2 = 1, C_1 = 0, B = -2, A = 0.$$
In other words, 
$${x^4+1\over x^4 + x^2} = 1 + {-x^2 + 1\over x^4 + x^2} = 1 + {1 \over x^2} + {-2 \over x^2 + 1}$$
From this we can integrate:
$$\int {x^4+1\over x^4 + x^2}\ dx
 = \int 1 + {1 \over x^2} + {-2 \over x^2 + 1}\ dx
 = x - {1\over x}  - 2\arctan(x) + C$$
\bigskip
\noindent
{\it Example 3.}  Here's a final example that illustrates how the higher powers of 
quadratic polynomials would be handled.  We will find:
$$\int {x + 1 \over x^5 + 6x^3 + 9x}\ dx$$
The denominator factors as $x(x^4 + 6x^2 + 9) = x(x^2 + 3)^2$.  The
The partial fractions now will look like
$${x + 1\over x(x^2 + 3)^2} = {A\over x} + {Bx + C\over x^2 + 3} + {Dx + E\over (x^2 + 3)^2}$$
Clearing denominators:
$$x + 1 = A(x^4 + 6x^2 + 9) + (Bx + C)(x^3 + 3x) + (Dx + E)x,$$
so 
$$x + 1 = (A + B)x^4 + Cx^3 + (6A + 3B + D)x^2 + (3C +  E)x + 9A.$$
Equating coefficients of like powers of $x$:
$$\eqalign{
0 &= A + B\cr
0 &= C\cr
0 &= 6A + 3B + D\cr
1 &= 3C + E\cr
1 &= 9A\cr}
$$
So we have $A = 1/9$, $B = -1/9$, $C = 0$, $D = -1/3$ and $E = 1$.
The partial fraction decomposition is
$$ {1\over x(x^2 + 1)^2} = {1/9 \over x} + {-x/9 \over x^2 + 3} + {-x/3 + 1\over (x^2 + 3)^2}$$   
To see what to do to integrate, notice that the first two terms are ${du \over u}$ forms.
The last term can be split up like this:
$${-x/3 \over (x^2 + 3)^2} + {1\over (x^2 + 3)^2}$$
The first one here is a ${du \over u^2}$ form.  The last term can be handled by the 
trig substitution $x = \sqrt{3} \tan\theta$.  (This sort of substitution will 
always work on these, but you might need to complete the square and do other
algebra before the proper substitution becomes clear.)  In any case, we have
$$\eqalign{
\int  {1\over (x^2 + 3)^2}\ dx &= \int {\sqrt{3} \sec^2\theta\over (3 \tan^2\theta + 3)^2}\ d\theta\cr
&= {1\over 3\sqrt{3}} \int {\sec^2\theta \over \sec^4\theta}\ d\theta\cr
&= {1\over 3\sqrt{3}} \int \cos^2\theta\ d\theta\cr
&= {1\over 3\sqrt{3}} \left( {\theta \over 2} + {\sin\theta \cos\theta\over 2}\right) \cr
&= {\tan^{-1}(x/\sqrt{3}) \over 6\sqrt{3}} + {x \over 6 (x^2 + 3)}\cr}
$$
by the trig integral methods we introduced before. 
The final answer is
$${1\over 9}\ln|x| - {1\over 18}\ln|x^2 + 3| + {1 \over 6 }{1 \over x^2 + 3} + {\tan^{-1}(x/\sqrt{3})\over 6\sqrt{3}} + 
{x \over 6(x^2 + 3)} + C$$
(which can be further simplified, but let's not!)
\bye
