I am trying to calculate this integral:
$ I = \displaystyle\int_{\gamma }^{}dz\frac{1}{z(z+4)} $, where gamma is given by: $z = 1 + 4te^{-2\pi it}$, and the bounds on $t$ are $[0,1]$.
I have used Cauchy's Integral Formula to find the value of the integral along a closed path (the path given above + a horizontal line segment from $z = 1$ to $5$) and get an answer of $2\pi i$. However, I am expecting the answer to be value of $0.255$, simply from evaluating the integral directly between $z=1$ & $z=5$. Where am I going wrong?
Let $\eta$ be the path $\gamma$ followed to the line segment from $5$ to $1$, travelled at a constant speed. Then $\eta$ is a closed path, and$$\int_\eta f(z)\,\mathrm dz=-2\pi i\frac1{0+4}=-\frac{\pi i}2,$$where the minus sign is due to the fact that the oop $\eta$ goes around $0$ in the clockwise direction. In other words,$$\int_\gamma f(z)\,\mathrm dz-\int_1^5f(z)\,\mathrm dz=-\frac{\pi i}2.$$But$$\int_1^5f(z)\,\mathrm dz=\frac12\log\left(\frac53\right),$$and therefore$$\int_\gamma f(z)\,\mathrm dz=\frac12\log\left(\frac53\right)-\frac{\pi i}2.$$