Partial fraction decomposition process
 Check that we have a proper fraction. If not, do
long division of polynomials.
 Factor $Q(x)$ into a product of linear and
irreducible quadratic terms.
 Write $\displaystyle\frac{P(x)}{Q(x)}$ as a sum of
terms with unknown coefficients:
 For every factor of $(xa)$ in $Q(x)$, we have
a term $\displaystyle\frac{A}{xa}$.
 For every repeated linear factor $(xa)^n$, we
have $$\displaystyle\frac{A_1}{(xa)} +
\frac{A_2}{(xa)^2} + \ldots +
\frac{A_n}{(xa)^n}.$$
 For every irreducible quadratic factor $x^2 +
bx + c$, we have
$$\displaystyle\frac{Ax+B}{x^2+bx+c}.$$
 For every repeated irreducible quadratic factor
$(x^2+bx+c)^n$, we have $$\displaystyle\frac{A_1 x
+ B_1}{x^2+bx+c} +
\frac{A_2x+B_2}{(x^2+bx+c)^2}+\ldots +
\frac{A_nx+B_n}{(x^2+bx+c)^n}.$$
 Multiply both sides of the equation by $Q(x)$. Then
plug in different values of $x$ to get equations that
determine the coefficients. For distinct linear
factors, we can always get the coefficients by
plugging in the $x$ value that will make the factor
zero. For repeated linear factors or for quadratic
factors, it can be a little trickier.
 If all else fails, compare the coefficients of 1,
$x$, $x^2$, etc. on both sides to get equations
involving $A$, $B$, etc.
 Integrate. Recall that $\int \frac{1}{xa}\,dx
=\ln\lvert xa\rvert +C$, and remember substitution
(for repeated linear factors), and trig substitution
with tangent (irreducible quadratic factors).
Integrating other quadratic expressions is done with
either a $u$substitution or a trig substitution with
tangent, after possibly completing the square.
