Applying partial fraction decomposition when evaluating a contour integral

79 Views Asked by At

Take for example the integral in (1) where $\gamma$ is the anticlockwise path around the top half of the circle $|z|=r$

According to Wolfram, $$\int \frac{1}{z+w}dz=\operatorname{Log}\left(z+w\right)+C$$

Let $\gamma(t)=re^{it}$

Then

$$\int_{\gamma}\frac{dz}{a^{2}+z^{2}}=\int_{0}^{\pi}\frac{γ'\left(t\right)dt}{a^{2}+\left(γ\left(t\right)\right)^{2}}=\int_{0}^{\pi}\frac{ire^{it}dt}{a^{2}+r^{2}e^{2it}}=i\int_{r}^{-r}\frac{u\frac{du}{iu}}{a^{2}+u^{2}}$$

$$=\frac{1}{a}\left(\tan^{-1}\left(\frac{-r}{a}\right)-\tan^{-1}\left(\frac{r}{a}\right)\right)$$ $\tag1$

But

$$\int_{\gamma}\frac{dz}{a^{2}+z^{2}}=\int_{\gamma} \frac{\frac{i}{2a}}{z+ai}-\frac{\frac{i}{2a}}{z-ai}dz=\int_{0}^{\pi}(\frac{\frac{i}{2a}}{γ\left(t\right)+ai}-\frac{\frac{i}{2a}}{γ\left(t\right)-ai})γ'\left(t\right)dt$$ $$=\frac{1}{2a}\int_{0}^{\pi}\left(\frac{re^{it}}{re^{it}-ai}-\frac{re^{it}}{re^{it}+ai}\right)dt=\frac{1}{2a}\int_{r}^{-r}\left(\frac{u\frac{du}{iu}}{u-ai}\right)-\frac{1}{2a}\int_{r}^{-r}\left(\frac{u\frac{du}{iu}}{u+ai}\right)$$ $$=\frac{i}{2a}\left(\operatorname{Log}\left(r-ai\right)+\operatorname{Log}\left(-r+ai\right)-\operatorname{Log}\left(r+ai\right)-\operatorname{Log}\left(-r-ai\right)\right)$$ $\tag2$

Which then implies that (1) and (2) are equal, but according to Wolfram they are not.

All integration methods should converge on the same result, right? But something seems to go wrong when verifying that using partial fractions will yield the same result yielded by another method.

Wolfram does say that the imaginary part of the difference is zero

Update

It can be verified that (1) and (2) are equal for the case where $a=1$

Thus, what I'm fairly sure is going on is that they are indeed equal but Wolfram simply doesn't choose to state that zero is an alternate form of the difference when $a=1$

The verification goes as follows:

Since $\operatorname{Arctan}(z)=\frac{i}{2}\operatorname{Log}(\frac{i+z}{i-z})$, if $x$ is a positive real number then $\tan^{-1}(x)=\frac{i}{2}\operatorname{Log}(\frac{i+x}{i-x})$

Therefore,

$$\tan^{-1}\left(-r\right)-\tan^{-1}\left(r\right)=_{?}\frac{i}{2}\left(Log\left(r-i\right)+Log\left(-r+i\right)-Log\left(r+i\right)-Log\left(-r-i\right)\right)$$

$$-2\tan^{-1}\left(r\right)=_{?}\frac{i}{2}Log\left(\frac{\left(r-i\right)^{2}}{\left(r+i\right)^{2}}\right)$$

$$-2\left(\frac{i}{2}Log\left(\frac{i+r}{i-r}\right)\right)=_{?}\frac{i}{2}Log\left(\frac{\left(r-i\right)^{2}}{\left(r+i\right)^{2}}\right)$$

$$2\left(\frac{i}{2}Log\left(\frac{i-r}{i+r}\right)\right)=_{?}\frac{i}{2}Log\left(\frac{\left(r-i\right)^{2}}{\left(r+i\right)^{2}}\right)$$

$$\frac{i}{2}Log\left(\frac{\left(i-r\right)^{2}}{\left(i+r\right)^{2}}\right)=_{yes}\frac{i}{2}Log\left(\frac{\left(r-i\right)^{2}}{\left(r+i\right)^{2}}\right)$$

It can be justified that $\tan^{-1}(x)=\frac{i}{2}\operatorname{Log}(\frac{i+x}{i-x})$ by using partial fractions to evaluate the antiderivative of $\frac{1}{1+x^2}$ and using $\int \frac{1}{z+w}dz=\operatorname{Log}\left(z+w\right)+C$