I get that if both the limits are improper, I get the wrong answer in some cases theoretically.
For example, $$\int_{-\pi/2}^{\pi/2}\tan (x)\,dx$$ is divergent but if I use both limits improper together, i.e. lim ε→0 integral of tan(x) from -pi/2+ε to +pi/2-ε , being an odd function the resultant is $0$, thus convergent.
But why is this wrong? Intuitively, they both should return the same value of the integral.