Given double integral is :
$$\int _0^1\int _0^{\frac{1}{x}}\frac{x}{1+y^2}\:dx\,dy$$
My attempt :
We can't solve since variable $x$ can't remove by limits, but if we change order of integration, then
$$\int _0^1\int _0^{\frac{1}{x}}\frac{x}{1+y^2}\:dy\,dx$$
$$\implies\int _0^1\int _0^{\frac{1}{x}}\frac{x}{1+y^2}\:dy\,dx = \frac{1}{2}$$
Can you explain in formal way, please?
Edit : This question was from competitive exam GATE. The link is given below on comments by Alex M. and Martin Sleziak(Thanks).