Use algebra to prove all proper rational function can be written in partial fraction decomposition I'm learning the general tactics to integrate all rational functions and here's a fact that is written in the notes.
It can be shown using algebra that every proper rational function $f$ can be written as an unique sum of functions of the form
$\dfrac{A}{(x-a)^k}$ and $\dfrac{Bx+c}{(x^2+bx+c)^k}$, where $x^2+bx+c$ is irreducible.
Can anyone show me how to prove this?
 A: Lemma. Let $f,g$ be co-prime polynomials, $k\in\Bbb N$. Then the rational function $\frac{f(x)}{g(x)^k}$can be written as
$$\frac{f(x)}{g(x)^k}=p(x)+\sum_{j=1}^k\frac{f_j(x)}{g(x)^j} $$
where $p$ and the $f_j$ are polynomials and $\deg f_j<\deg q$.
Proof. By induction on $\deg f$ (with the case $\deg f<\deg g$ being trivial). Using polynomial division, write $f(x)=q(x)g(x)+r(x)$ with $\deg r<\deg g$ and $\deg q<\deg f$. Then we apply the induction hypothesis and let $f_k=r$ to find $$\begin{align}\frac{f(x)}{g(x)^k}&=\frac{q(x)}{g(x)^{k-1}}+\frac{r(x)}{g(x)^k}\\&=p(x)+\sum_{j=1}^{k-1}\frac{f_j(x)}{g(x)^j}+\frac{r(x)}{g(x)^k}\\&=p(x)+\sum_{j=1}^{k}\frac{f_j(x)}{g(x)^j}\end{align} $$
as desired. $\square$.
Now let $h(x)=\frac{f(x)}{g(x)}$ be any rational function, where $f,g$ be polynomials without a common factor. We know that $g$ can be written as product of linear factors over the complex numbers, which means that is can be written as product of at most quadratic factors over the reals. So let $q$ be such a linear (a la $x-a$) or quadratic (a la $x^2+bx+c$) factor of $g$.
It may happen that $q$ divides $g$ to a higher power. At any rate, we can write $g(x)=q(x)^kr(x)$ where $q,r$ are coprime. Then there exist polynomials $u,v$ such that $u(x)q(x)^k+v(x)r(x)=1$.
Now
$$\frac{f(x)}{g(x)}=\frac{u(x)q(x)^kf(x)+v(x)r(x)f(x)}{q(x)^kr(x)} =\frac{u(x)f(x)}{r(x)}+\frac{v(x)f(x)}{q(x)^k}.$$
As $\deg r<\deg g$, w may assume by induction on the degree of the denominator, that the first summand can be written in the desired form. Also, by the lemma, the second summand can be written in the desired form.
