Any idea why WolframAlpha gives different answers when computing the indefinite integral of these functions with respect to x first or with respect to y first?



This question emerge from splitting this deleted question into two question because I thought it was too messy.
The short answer is that WolframAlpha produces different results because Mathematica produces different results:
This is not a bug, as the mixed partials of both expressions are the same.
More generally, there is no reason to expect that $$\iint f(x,y) \, dx \, dy = \iint f(x,y) \, dy \, dx,$$ as there is a choice of an arbitrary constant for the first integral. As a very simple example, $$\int 0 \, dx = 1 \mbox{ and } \int 0 \, dx = y^2$$ are both reasonable choices for an integral with respect to $x$, assuming that the integrand is implicitly a function of $x$ and $y$. The next integral with respect to $y$ then depends on which choice was made.
What is true is that (under reasonable assumptions on $f$), $$\int_0^X \int_0^Y f(x,y) \, dx \, dy = \int_0^Y \int_0^X f(x,y) \, dy \, dx.$$ This is called Fubini's theorem.
Thus,
Note that the
ArcTan[Y/X] -> Pi/2 - ArcTan[X/Y]is a simplification that didn't happen automatically.