I’m still not an expert in integration, and I’m still learning, so sorry if it’s a trivial question:
Here’s the general integral:
$$\int \frac{a}{x^2 + 1}\text{ } dx, a \in \mathbb R$$
I know that this antiderivative is $a \tan^{-1} (x)$.
Now, I want to compute
$$\int_{-\infty}^{\infty} \frac{a}{x^2 + 1}\text{ } dx = 2\int_{0}^{\infty} \frac{a}{x^2 + 1} \text{ } dx$$
This basically means
$$\left(a \lim\limits_{T\to \infty} \tan^{-1}(T)\right) - 0$$
I’ve heard a lot of people say it’s $\frac{a\pi}{2}$.
HOWEVER, the tangent also approaches infinity at any $x = \frac{a(2n+1)\pi}{2}$.
So really the entire area under that curve from negative to positive infinity, should be $a\pi$ but is equal to $a(2n+1)\pi = 2na\pi + a\pi$ by integrating algebraically.
What am I missing, and what should we do for other situations like this where the periodicity of the antiderivative can give multiple solutions?
$\tan^{-1}(x)$ is not just any $y$ with $\tan(y) = x$, it is specifically the one in the interval $(-\pi/2, \pi/2)$. So yes, $$ \int_0^\infty \frac{dx}{1+x^2} = \lim_{x \to +\infty} \tan^{-1}(x) = \frac{\pi}{2}$$