Loophole? I'm getting 2 different answers when solving a differential equation in 2 different methods
Calculating the integral $\int_0^\infty \frac{\cos x}{1+x^2}\, \mathrm{d}x$ without using complex analysis