I am self-studying the residue theorem and its applications and I tried solving a problem which involves finding the principal value for an improper integral but I am not sure if my approach/answer is correct.
I wish to find $P.V. \int_{-\infty}^{\infty} \frac{dx}{x(x^2+1)}$
I know that the integrand has a singularity at x = 0 on the real line, and this singularity is a simple pole since $\frac{d}{dx} x(x^2 + 1) = 3x^2 + 1$ which is not equal to zero at z = 0
I also know that the integrand has a simple pole at $z = i$ on the upper half plane and so I should have that
$$P.V. \int_{-\infty}^{\infty} \frac{dx}{x(x^2+1)} = 2 \pi i Res(f, i) + \pi i Res(f,0) = 2 \pi i (\frac{1}{-2}) + \pi i = 0$$
Does this look right, the answer being zero concerns me for some reason but I assume it seems true since the function may be symmetric
In short, you were right. In long, I'm going to do it here myself.
This is the contour I will be using
If we integrate around our contour and apply the residue theorem, we get the following
$ \begin{array}{l} \oint _{C}\frac{1}{z\left( z^{2} +1\right)} dz=\\ 2\pi i\cdot Res\left(\frac{1}{z\left( z^{2} +1\right)} ,\ z=0\right) +2\pi i\cdot Res\left(\frac{1}{z\left( z^{2} +1\right)} ,\ z=i\right) =\pi i,\\ \\ \oint _{C}\frac{1}{z\left( z^{2} +1\right)} dz=\int\limits ^{\infty }_{-\infty }\frac{1}{x\left( x^{2} +1\right)} dx+\int _{A} +\int _{B} \Longrightarrow \\ \\ \int\limits ^{\infty }_{-\infty }\frac{1}{x\left( x^{2} +1\right)} dx=\pi i-\int _{A} -\int _{B}\\ \\ \int _{A} =0,\ through\ triangle\ inequalities\ ( ask\ me\ if\ anyone\ wants\ futher\ details)\\ \\ \int _{B} =\pi i\cdot Res\left(\frac{1}{z\left( z^{2} +1\right)} ,\ 0\right) =\pi i\\ \\ \therefore \int\limits ^{\infty }_{-\infty }\frac{1}{x\left( x^{2} +1\right)} dx=\pi i-\pi i=0\\ \blacksquare \end{array}$
I believe the black square represents the phrase QED.
For an approach not using contour integration/complex analysis.
When a function is odd, it has this property $f(x)=-f(-x)$. The integrand of your integral is odd. The property of odd integrands can be taken advantage of like so
$ \begin{array}{l} \int\limits ^{\infty }_{-\infty }\frac{1}{x\left( x^{2} +1\right)} dx=\int\limits ^{\infty }_{0}\frac{1}{x\left( x^{2} +1\right)} dx+\underbrace{\int\limits ^{0}_{-\infty }\frac{1}{x\left( x^{2} +1\right)} dx}_{Make\ the\ subsitution\ here}\\ make\ a\ substitution,\ \ x\mapsto -x\Longrightarrow \\ \int\limits ^{\infty }_{-\infty }\frac{1}{x\left( x^{2} +1\right)} dx=\int\limits ^{\infty }_{0}\frac{1}{x\left( x^{2} +1\right)} dx-\int\limits ^{\infty }_{0}\frac{1}{x\left( x^{2} +1\right)} dx=0 \end{array}$
In general, you will find this
For an odd function $f( x) \\ \int\limits ^{k}_{-k} f( x) dx=0$
Also as a side note
For even functon $f(x)$
$f(x)=f(-x)$ and also
$\int\limits^{k}_{-k} f(x) dx=2\cdot\int\limits^{k}_{0} f(x) dx$
If anything needs a further explanation then please ask. Thanks!