Introduction
In this module we will discuss functions $\frac{P(x)}{Q(x)}$,
where $P$ and $Q$ are polynomials
with the degree of $P$ less than the
degree of $Q$. We call these proper (degree of top less than
the degree of bottom) rational
(poly over poly) functions.
In order to find $\int\frac{P(x)}{Q(x)}\,dx$, we first see if we
know the antiderivative, then we see if substitution will work,
then we see if we may have an easy trig substitution. If
not, we will consider the integration technique of partial fraction decomposition,
which is a technique for turning proper
rational functions $\frac{P(x)}{Q(x)}$ into sums of
simpler rational functions that can be more easily integrated.
We begin with an example of a proper rational function, on the
left below. Notice that by getting a common denominator on
the righthand side of the equation below, we get the lefthand
side. Using partial fraction decomposition, we can reverse
this process, beginning with the LHS and determining the RHS.
$$\displaystyle\frac{3x+4}{x^2+3x+2}=\displaystyle\frac{1}{x+1}+\displaystyle\frac{2}{x+2}$$
This allows us to integrate the LHS: $$\int
\frac{3x+4}{x^2+3x+2}\,dx = \int \left( \frac{1}{x+1} +
\frac{2}{x+2}\right )\,dx = \ln\lvert x+1\rvert + 2\ln\lvert
x+2\rvert+C.$$
There are four general cases, depending on what happens when we
factor the denominator $Q(x)$:
Partial fraction decomposition overview
 Distinct Linear Factors:
The simplest case is where all the roots of $Q(x)$ are
real and all are different, so that $Q(x)$ factors as
a product of distinct linear factors. E.g.,
$Q(x)=x(x1)(x+2)(x+7)$.
 Repeated Linear Factors:
The next simplest case is where are the factors are
linear, but some are repeated, such as in
$Q(x)=x(x1)^2(x+2)^3$.
 Nonrepeated quadratic factors:
When $Q(x)$ has complex roots, then we get irreducible
quadratic factors. Case 3 is where these are all
distinct such as in $Q(x)=x(x1)(x^2+4)$.
 Repeated quadratic factors:
The most complex case is where there are repeated
quadratic factors, such as in $Q(x)=x(x1)(x^2+4)^2$.

