# How to calculate $\int_{\partial B_2(0)}\frac{2z^2+7z+11}{z^3+4z^2-z-4}\;dz$?

I want to calculate $$\displaystyle\int_{\partial B_2(0)}\underbrace{\frac{2z^2+7z+11}{z^3+4z^2-z-4}}_{=:f(z)}\;dz\tag{0}$$ Partial fraction decomposition yields $$f(z)=\underbrace{\frac{1}{z+4}}_{=:f_1(z)}-\underbrace{\frac{1}{z+1}}_{=:f_2(z)}+\underbrace{\frac{2}{z-1}}_{=:f_3(z)}\tag{1}$$ From this representation of $f$, it's easy to see that $-4$ and $\pm 1$ are poles of $f$. That means, that we can't take benefit from Cauchy's integral theorem, since $f$ is unbounded in a neighborhood of one of these poles.

However, since $f$ is holomorphic on $\mathbb{C}\setminus\left\{-4,\pm 1\right\}$ we can apply the residue theorem which states here $$\int_{\partial B_2(0)}f(z)\;dz=2\pi i\sum_{z_0\in\left\{-4,\pm 1\right\}}\text{res}(f,z_0)\;\text{ind}_{\partial B_2(0)}\text{ }z_0$$ The winding number of $-4$ is obvious equal to $0$ while that ones of $\pm 1$ are equal to $1$.

So, what would be smart to do now? Either we consider $f$ as a whole or as the sum of $f_1$, $f_2$ and $f_3$:

1. In the first case, we would need to calculate the integrals $$\int_{\partial B_{\delta_\pm}(\pm 1)}f(z)\;dz$$ with $B_{\delta_\pm}(\pm 1)\subset B_2(0)$
2. In the second case, we would need to determine the Laurent series expansion of $f_1$, $f_2$ and $f_3$ at $\pm 1$. We can take advantage of the fact, that $f_1$, $f_2$ and $f_3$ in $(1)$ are in their Laurent series form at $-4$, $-1$ and $1$, respectively.

What would be the easier way? Is there some rule of thumb in general?

It seems like in this case, both options are too complicated and it would be easier to calculate $(0)$ from the definition without the residue theorem. Or is there something what prevents me from doing this?

Notes:

• $B_r(z_0):=\left\{z\in\mathbb{C}:|z-z_0|<r\right\}$
• $A_{r,R}(z_0):=\left\{z\in\mathbb{C}:r<|z-z_0|<R\right\}$
• $\text{ind}_{\gamma}\text{ }z_0$ is the winding number of $z_0$ wrt $\gamma$
• When you already have the partial fraction decomposition, you can directly read off the residues from that. Note that $f \mapsto \operatorname{res}(f,z_0)$ is linear, and $\operatorname{res}\left(\frac{1}{z-z_1}, z_0\right) = 0$ for $z_1 \neq z_0$. So $$\int_{\partial B_2(0)} \frac{2z^2+7z+11}{z^3+4z^2-z-4}\,dz = 2\pi i\left(\operatorname{res}\left(\frac{2}{z-1},1\right) - \operatorname{res}\left(\frac{1}{z+1},-1\right)\right) = 2\pi i(2-1) = 2\pi i,$$ you don't need to develop any of the fractions into a Taylor series around one of the other poles. – Daniel Fischer Jul 13 '14 at 14:06
• @DanielFischer So, we've always got $$\operatorname{res}\left(\frac{\alpha}{z-z_0},z_0\right)=\alpha\;,$$ right?  There is another thing I stumbled about: If we're looking at a path integral of a function which has a pole (or an other singularity) at $z_0$ and we're integrating along a path whose trace intersects $z_0$; do we need to pay attention to this situation? – 0xbadf00d Jul 13 '14 at 14:17
• Right. And we absolutely need to pay attention when a singularity lies on the path of integration. If a branch-cut intersects the path transversally, the integral exists, but you can't simply use the residue theorem to evaluate it. If a branch point lies on the path, but the branch-cut lies completely outside the contour, you can use the residue theorem to evaluate the integral over a slightly deformed path avoiding the branch point, and get the result of the original by continuity. If a pole lies on the path, the integral does not exist as an improper Riemann or a Lebesgue integral, but if – Daniel Fischer Jul 13 '14 at 14:27
• For $n \neq 1$, we always have $$\operatorname{res}\left(\frac{\alpha}{(z-z_0)^n}, z_1\right) = 0,$$ regardless of whether $z_0 = z_1$ or not. Only terms of the form $\frac{\alpha}{(z-z_0)^1}$ can give a (nonzero) residue. – Daniel Fischer Jul 13 '14 at 14:58
• You forgot the essential singularity of $\sin \frac{1}{z-2}$ in $2$. The residue there is $1$, so the integral ought to be $2\pi i$. Why Wolfram Alpha evaluated it as $(2\pi i)(1+i)$, I don't see. I suspect you had a typo in your input, for WA should be able to compute that correctly. – Daniel Fischer Jul 14 '14 at 12:53

Notice that $f_1$ and $f_2$ are already in their laurent series form. You can just read off the residues.
$\displaystyle\int_{\partial B_2(0)}-\frac{1}{z+1}\;dz=-2\pi i$ and $\displaystyle\int_{\partial B_2(0)}\frac{2}{z-1}\;dz=4\pi i$