I've been playing around with an integral that seems to give two contradictory results and I cannot figure out why. Let $a$ be some real positive constant.
Then on the one hand, we can consider the integral
$I=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \left(\log (a x)-\log (a y)\right)}{(x-i y)^2}=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \left(\log (x)-\log (y)\right)}{(x-i y)^2}$,
where admittedly one may have factors of $\pm i \pi$ whether $x$ and $y$ are positive or negative, but nonetheless we see $\log(a)$ drops out of the formula.
But on the other hand, we consider the log integrals separately:
$I_1=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \log (a x)}{(x-i y)^2}=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \log (a x)}{(x^2+ y^2)^2}(x^2+2i x y-y^2)$,
$I_2=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx\left(-\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \log (a y)}{(x-i y)^2}\right)=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \log (a y)}{(x^2+ y^2)^2}(y^2-2i x y-x^2)$.
Now changing variables in $I_2$ such that $x$ is renamed $y$ and vice versa, we finally obtain
$I=I_1+I_2=\int_{-\infty}^{\infty}dy\int_{-\infty}^{\infty}dx \left(2\frac{e^{-\frac{x^2}{2}-\frac{y^2}{2}} \log (a x)}{(x^2+ y^2)^2}(x^2-y^2)\right)$
How could it be that in one way the $\log(a)$ term vanished but another way it does not?
One can actually compute this base double integral on mathematica for example. We find
$I_1=-\frac{\pi}{2}(1+\gamma-\log[-\frac{a^2}{2}] )$.
So I am trying to figure out what is the actual value of I in my case.
The issue might be that the integral containing $\log(x)$ in each case has to be treated with the principal value prescription. As such, the very first line may not make sense and should instead be written as
$I=\int_{-\infty}^{\infty}dy \left(\text{PV} \int_{-\infty}^{\infty}dx e^{\frac12 x^2-\frac12 y^2}\frac{\log(a x)}{(x-i y)^2}\right)-\left(\text{PV} \int_{-\infty}^{\infty}dy \int_{-\infty}^{\infty}dx e^{\frac12 x^2-\frac12 y^2}\frac{\log(a y)}{(x-i y)^2}\right)$.
In that case the initial cancellation of $\log(a)$ would not occur, and the second manipulation would still be valid.
This seems to make sense, but of course the best approach would be to just perform numerical integration of I and see what the result agrees with.