# Complex Analysis/Residue Theory/The Basics
## What is a residue?

When we say we want a Residue of a function at a point, we mean that we want the coefficients of the term of the expanded function with a simple pole (something that gives a zero in the denominator) at that point. For example, the residue of the function:
$f(x)={\frac {3}{x+1}}$
About $-1$ is 3.
And similarly for:
$f(x)={\frac {3}{x+1}}+{\frac {3}{x+2}}$
Is also 3, for the second term isn't a pole at -1.
Of course, the functions we will be dealing with will be much more complicated, some may have quadratics on the denominator, some may not be well defined like $\sin({\frac {1}{z}})$; and according to the type of function, there are different types of what's called isolated singularities that we'll run across. Of course, such things need to be well defined to include possible conflicts before we continue. Also because our method of finding the residue varies with the type of the singularity! This is probably the most important point in this chapter.

## Isolated Singularities

There are three types:
1) Removable Singularities
2) Poles of order m
3) Essential Singularites
Which we will cover in detail one-by-one.

### Removable Singularities

The rigorous definition is a function such that $\lim _{z\rightarrow z_{0}}f(z)=k$ where $k$ is some constant value (you may have to use L'Hopital's Rule to come to this conclusion).
In layman's terms, this is a function that has a similar term multiplied on the numerator and denominator that can be cancelled.
For example, the following function:
$f(x)={\frac {3(x+1)}{x+1}}$
has a removable singularity at $z_{0}=-1$.
as for what this has to do with residues, with the rigorous definition, this means that the function's residue at that point is considered to be 0. If after cancellation some of the same terms are left over, like in the following function:
$f(x)={\frac {3(x+1)}{(x+1)^{2}}}$

### Poles of order m

Again, the rigorous definition is a function f has a pole at $z_{0}$ if $\lim _{z\rightarrow z_{0}}||f(z)||=\infty$, we classify the order m by the highest power of the pole in the Laurent series (in more layman's terms, the number of the power after it has been cancelled). Another way of say this would be:
       The order of a pole at $z_{0}$ is the least integer m such that $\lim _{z\to z_{0}}(z-z_{0})^{m}f(z)$ is bounded.
Example:
$f(x)={\frac {3}{x+1}}+{\frac {3}{(x+1)^{2}}}$
has a 2nd order pole about $-1$. This could be said to follow from the fact that: $(x+1)^{2}f(x)=3(x+1)+3$ for $x$ not equal to $-1$ and thus $\lim _{x\to -1}(x+1)^{2}f(x)=3<\infty$

### Essential Singularity

The rigorous definition is a function such that $\lim _{z\rightarrow z_{0}}f(z)$ is neither bounded nor infinite, like the limit being undefined. A good example of such a function is a typical example from 1st semester Calculus classes:
$f(z)=\sin(1/z)$
about $0$ is an essential singularity.
What typically happens with these functions is when the Laurent (or in the case for the function above, Taylor) series is examined, it turns out that the order m is infinite (there are an infinite number of poles). Keeping along the lines of our example, if we perform a Taylor series expansion we obtain:
$f(z)=\sin(1/z)=\sum _{n=1}^{\infty }{\frac {(-1)^{n+1}n!}{z^{n}}}$
Which shows our infinite number of poles.
This is the only type of isolated singularity where the only way known to determine the residue (the power of that 1/z term) is to manually create the Laurent series and read off the coefficient.
Also, but beyond the scope of this book, is an interesting theorem regarding functions with essential singularities called Picard's Theorem, which states that a function with an essential singularity approaches every value except possibly one around a neighborhood about the singularity.