# Partial fractions in complex analysis

In complex analysis, a partial fraction expansion is a way of writing a meromorphic function $f(z)$ as an infinite sum of rational functions and polynomials. When $f(z)$ is a rational function, this reduces to the usual method of partial fractions.

## Motivation

By using polynomial long division and the partial fraction technique from algebra, any rational function can be written as a sum of terms of the form 1/((az+b)$^k$)+p(z){\textstyle {\frac {1}{(az+b)^{k}}}+p(z)}, where $a$ and $b$ are complex, $k$ is an integer, and $p(z)$ is a polynomial. Just as polynomial factorization can be generalized to the Weierstrass factorization theorem, there is an analogy to partial fraction expansions for certain meromorphic functions.
A proper rational function (one for which the degree of the denominator is greater than the degree of the numerator) has a partial fraction expansion with no polynomial terms. Similarly, a meromorphic function $f(z)$ for which $|f(z)|$ goes to 0 as $z$ goes to infinity at least as quickly as | 1/z |{\textstyle |{\frac {1}{z}}|} has an expansion with no polynomial terms.

## Calculation

Let $f(z)$ be a function meromorphic in the finite complex plane with poles at $\lambda _{1},\lambda _{2},...$ and let $(\Gamma _{1},\Gamma _{2},...)$ be a sequence of simple closed curves such that:
* The origin lies inside each curve $\Gamma _{k}$
* No curve passes through a pole of $f$
* $\Gamma _{k}$ lies inside $\Gamma _{k+1}$ for all $k$
* $\lim _{k\rightarrow \infty }d(\Gamma _{k})=\infty$, where $d(\Gamma _{k})$ gives the distance from the curve to the origin
* one more condition of compatibility with the poles $\lambda _{k}$, described at the end of this section
Suppose also that there exists an integer $p$ such that
    $\lim _{k\rightarrow \infty }\oint _{\Gamma _{k}}\left|{\frac {f(z)}{z^{p+1}}}\right||dz|<\infty$
Writing $\operatorname {PP} (f(z);z=\lambda _{k})$ for the principal part of the Laurent expansion of $f$ about the point $\lambda _{k}$, we have
    $f(z)=\sum _{k=0}^{\infty }\operatorname {PP} (f(z);z=\lambda _{k}),$
if $p=-1$. If $p>-1$, then
    $f(z)=\sum _{k=0}^{\infty }(\operatorname {PP} (f(z);z=\lambda _{k})+c_{0,k}+c_{1,k}z+\cdots +c_{p,k}z^{p}),$
where the coefficients $c_{j,k}$ are given by
    $c_{j,k}=\operatorname {Res} _{z=\lambda _{k}}{\frac {f(z)}{z^{j+1}}}$
$\lambda _{0}$ should be set to 0, because even if $f(z)$ itself does not have a pole at 0, the residues of f(z)/(z$^{j+1}$) {\textstyle {\frac {f(z)}{z^{j+1}}}} at $z=0$ must still be included in the sum.
Note that in the case of $\lambda _{0}=0$, we can use the Laurent expansion of $f(z)$ about the origin to get
    $f(z)={\frac {a_{-m}}{z^{m}}}+{\frac {a_{-m+1}}{z^{m-1}}}+\cdots +a_{0}+a_{1}z+\cdots$
    $c_{j,k}=\operatorname {Res} _{z=0}\left({\frac {a_{-m}}{z^{m+j+1}}}+{\frac {a_{-m+1}}{z^{m+j}}}+\cdots +{\frac {a_{j}}{z}}+\cdots \right)=a_{j},$
    $\sum _{j=0}^{p}c_{j,k}z^{j}=a_{0}+a_{1}z+\cdots +a_{p}z^{p}$
so that the polynomial terms contributed are exactly the regular part of the Laurent series up to $z^{p}$.
For the other poles $\lambda _{k}$ where $k\geq 1$, 1/(z$^{j+1}$) {\textstyle {\frac {1}{z^{j+1}}}} can be pulled out of the residue calculations:
    $c_{j,k}={\frac {1}{\lambda _{k}^{j+1}}}\operatorname {Res} _{z=\lambda _{k}}f(z)$
    $\sum _{j=0}^{p}c_{j,k}z^{j}=[\operatorname {Res} _{z=\lambda _{k}}f(z)]\sum _{j=0}^{p}{\frac {1}{\lambda _{k}^{j+1}}}z^{j}$
* To avoid issues with convergence, the poles should be ordered so that if $\lambda _{k}$ is inside $\Gamma _{n}$, then $\lambda _{j}$ is also inside $\Gamma _{n}$ for all $j<k$.

## Example

The simplest meromorphic functions with an infinite number of poles are the non-entire trigonometric functions. As an example, $\tan(z)$ is meromorphic with poles at (n+1/2)π{\textstyle (n+{\frac {1}{2}})\pi }, $n=0,\pm 1,\pm 2,...$ The contours $\Gamma _{k}$ will be squares with vertices at $\pm \pi k\pm \pi ki$ traversed counterclockwise, $k>1$, which are easily seen to satisfy the necessary conditions.
On the horizontal sides of $\Gamma _{k}$,
    $z=t\pm \pi ki,\ \ t\in [-\pi k,\pi k],$
so
    $|\tan(z)|^{2}=\left|{\frac {\sin(t)\cosh(\pi k)\pm i\cos(t)\sinh(\pi k)}{\cos(t)\cosh(\pi k)\pm i\sin(t)\sinh(\pi k)}}\right|^{2}$
    $|\tan(z)|^{2}={\frac {\sin ^{2}(t)\cosh ^{2}(\pi k)+\cos ^{2}(t)\sinh ^{2}(\pi k)}{\cos ^{2}(t)\cosh ^{2}(\pi k)+\sin ^{2}(t)\sinh ^{2}(\pi k)}}$
$\sinh(x)<\cosh(x)$ for all real $x$, which yields
    $|\tan(z)|^{2}<{\frac {\cosh ^{2}(\pi k)(\sin ^{2}(t)+\cos ^{2}(t))}{\sinh ^{2}(\pi k)(\cos ^{2}(t)+\sin ^{2}(t))}}=\coth ^{2}(\pi k)$
For $x>0$, $\coth(x)$ is continuous, decreasing, and bounded below by 1, so it follows that on the horizontal sides of $\Gamma _{k}$, $|\tan(z)|<\coth(\pi )$. Similarly, it can be shown that $|\tan(z)|<1$ on the vertical sides of $\Gamma _{k}$.
With this bound on $|\tan(z)|$ we can see that
    $\oint _{\Gamma _{k}}\left|{\frac {\tan(z)}{z}}\right|dz\leq \operatorname {length} (\Gamma _{k})\max _{z\in \Gamma _{k}}\left|{\frac {\tan(z)}{z}}\right|<8k\pi {\frac {\coth(\pi )}{k\pi }}=8\coth(\pi )<\infty .$
That is, the maximum of | 1/z |{\textstyle |{\frac {1}{z}}|} on $\Gamma _{k}$ occurs at the minimum of $|z|$, which is $k\pi$.
Therefore $p=0$, and the partial fraction expansion of $\tan(z)$ looks like
    $\tan(z)=\sum _{k=0}^{\infty }(\operatorname {PP} (\tan(z);z=\lambda _{k})+\operatorname {Res} _{z=\lambda _{k}}{\frac {\tan(z)}{z}}).$
The principal parts and residues are easy enough to calculate, as all the poles of $\tan(z)$ are simple and have residue -1:
    $\operatorname {PP} (\tan(z);z=(n+{\frac {1}{2}})\pi )={\frac {-1}{z-(n+{\frac {1}{2}})\pi }}$
    $\operatorname {Res} _{z=(n+{\frac {1}{2}})\pi }{\frac {\tan(z)}{z}}={\frac {-1}{(n+{\frac {1}{2}})\pi }}$
We can ignore $\lambda _{0}=0$, since both $\tan(z)$ and tan⁡(z)/z {\textstyle {\frac {\tan(z)}{z}}} are analytic at 0, so there is no contribution to the sum, and ordering the poles $\lambda _{k}$ so that λ$_1$=π/2, λ$_2$=−π/2, λ$_3$=3π/2 {\textstyle \lambda _{1}={\frac {\pi }{2}}, \lambda _{2}={\frac {-\pi }{2}}, \lambda _{3}={\frac {3\pi }{2}}}, etc., gives
    $\tan(z)=\sum _{k=0}^{\infty }\left[\left({\frac {-1}{z-(k+{\frac {1}{2}})\pi }}-{\frac {1}{(k+{\frac {1}{2}})\pi }}\right)+\left({\frac {-1}{z+(k+{\frac {1}{2}})\pi }}+{\frac {1}{(k+{\frac {1}{2}})\pi }}\right)\right]$
    $\tan(z)=\sum _{k=0}^{\infty }{\frac {-2z}{z^{2}-(k+{\frac {1}{2}})^{2}\pi ^{2}}}$

## Applications
### Infinite products

Because the partial fraction expansion often yields sums of 1/(a+bz) {\textstyle {\frac {1}{a+bz}}}, it can be useful in finding a way to write a function as an infinite product; integrating both sides gives a sum of logarithms, and exponentiating gives the desired product:
    $\tan(z)=-\sum _{k=0}^{\infty }\left({\frac {1}{z-(k+{\frac {1}{2}})\pi }}+{\frac {1}{z+(k+{\frac {1}{2}})\pi }}\right)$
    $\int _{0}^{z}\tan(w)dw=\log \sec z$
    $\int _{0}^{z}{\frac {1}{w\pm (k+{\frac {1}{2}})\pi }}dw=\log \left(1\pm {\frac {z}{(k+{\frac {1}{2}})\pi }}\right)$
Applying some logarithm rules,
    $\log \sec z=-\sum _{k=0}^{\infty }\left(\log \left(1-{\frac {z}{(k+{\frac {1}{2}})\pi }}\right)+\log \left(1+{\frac {z}{(k+{\frac {1}{2}})\pi }}\right)\right)$
    $\log \cos z=\sum _{k=0}^{\infty }\log \left(1-{\frac {z^{2}}{(k+{\frac {1}{2}})^{2}\pi ^{2}}}\right),$
which finally gives
    $\cos z=\prod _{k=0}^{\infty }\left(1-{\frac {z^{2}}{(k+{\frac {1}{2}})^{2}\pi ^{2}}}\right).$

### Laurent series

The partial fraction expansion for a function can also be used to find a Laurent series for it by simply replacing the rational functions in the sum with their Laurent series, which are often not difficult to write in closed form. This can also lead to interesting identities if a Laurent series is already known.
Recall that
    $\tan(z)=\sum _{k=0}^{\infty }{\frac {-2z}{z^{2}-(k+{\frac {1}{2}})^{2}\pi ^{2}}}=\sum _{k=0}^{\infty }{\frac {-8z}{4z^{2}-(2k+1)^{2}\pi ^{2}}}.$
We can expand the summand using a geometric series:
    ${\frac {-8z}{4z^{2}-(2k+1)^{2}\pi ^{2}}}={\frac {8z}{(2k+1)^{2}\pi ^{2}}}{\frac {1}{1-({\frac {2z}{(2k+1)\pi }})^{2}}}={\frac {8}{(2k+1)^{2}\pi ^{2}}}\sum _{n=0}^{\infty }{\frac {2^{2n}}{(2k+1)^{2n}\pi ^{2n}}}z^{2n+1}.$
Substituting back,
    $\tan(z)=2\sum _{k=0}^{\infty }\sum _{n=0}^{\infty }{\frac {2^{2n+2}}{(2k+1)^{2n+2}\pi ^{2n+2}}}z^{2n+1},$
which shows that the coefficients $a_{n}$ in the Laurent (Taylor) series of $\tan(z)$ about $z=0$ are
    $a_{2n+1}={\frac {T_{2n+1}}{(2n+1)!}}={\frac {2^{2n+3}}{\pi ^{2n+2}}}\sum _{k=0}^{\infty }{\frac {1}{(2k+1)^{2n+2}}}$
    $a_{2n}={\frac {T_{2n}}{(2n)!}}=0,$
where $T_{n}$ are the tangent numbers.
Conversely, we can compare this formula to the Taylor expansion for $\tan(z)$ about $z=0$ to calculate the infinite sums:
    $\tan(z)=z+{\frac {1}{3}}z^{3}+{\frac {2}{15}}z^{5}+\cdots$
    $\sum _{k=0}^{\infty }{\frac {1}{(2k+1)^{2}}}={\frac {\pi ^{2}}{2^{3}}}={\frac {\pi ^{2}}{8}}$
    $\sum _{k=0}^{\infty }{\frac {1}{(2k+1)^{4}}}={\frac {1}{3}}{\frac {\pi ^{4}}{2^{5}}}={\frac {\pi ^{4}}{96}}.$