# How to compute this double integral

I'm trying to show that $\int_0^1\int_0^1\frac{x^2-y^2}{(x^2+y^2)^2}dxdy \neq \int_0^1\int_0^1\frac{x^2-y^2}{(x^2+y^2)^2}dydx$ by computing these integrals directly.

I tried using polar coordinates with no success as the bounds of integration caused problems.

I also tried the substitution $x=ytan\theta$ but ended up getting something of the form $\infty-\infty$.

Can anyone offer a hint as to how I can compute these directly please???

• You don't really need to calculate it though. Just show they're not equal to 0. – YoTengoUnLCD Apr 7 '16 at 4:07
• Try to change to polar coordinates. – Mhenni Benghorbal Apr 7 '16 at 4:29

The integral is not absolutely convergent, so we cannot change the order of integration, or the coordinates used, and expect to get the same answer.

Polar Coordinates

If we try to convert to polar coordinates, \begin{align} \int_0^1\int_0^1\frac{x^2-y^2}{\left(x^2+y^2\right)^2}\,\mathrm{d}x\,\mathrm{d}y &=\int_0^1\int_0^{\pi/2}\left(\cos^2(\theta)-\sin^2(\theta)\right)\frac1r\,\mathrm{d}\theta\,\mathrm{d}r\\ &+\int_1^{\sqrt2}\int_{\cos^{-1}\left(\frac1r\right)}^{\sin^{-1}\left(\frac1r\right)}\left(\cos^2(\theta)-\sin^2(\theta)\right)\frac1r\,\mathrm{d}\theta\,\mathrm{d}r\\ &=\int_0^1\int_0^{\pi/2}\left(\cos^2(\theta)-\sin^2(\theta)\right)\frac1r\,\mathrm{d}\theta\,\mathrm{d}r\\ &=\int_0^10\cdot\frac1r\,\mathrm{d}r\\[6pt] &=0 \end{align} The integral for $1\le r\le\sqrt2$ converges absolutely and is equal to its negative under the substitution $\theta\mapsto\frac\pi2-\theta$. Therefore, the integral for $1\le r\le\sqrt2$ is $0$.

The integral for $0\le r\le1$ is equal to $0$ for each $r$, so the integral is $0$ if integrated in $\theta$ first.

Of course, the integral does not converge when integrated in $r$ first since $\int_0^1\frac1r\,\mathrm{d}r$ diverges.

Rectangular Coordinates \begin{align} \int_0^1\int_0^1\frac{x^2-y^2}{\left(x^2+y^2\right)^2}\,\mathrm{d}x\,\mathrm{d}y &=\int_0^1\frac1y\int_0^{1/y}\frac{x^2-1}{\left(x^2+1\right)^2}\,\mathrm{d}x\,\mathrm{d}y\\ &=\int_0^1\frac1y\int_0^{\tan^{-1}(1/y)}\left(\sin^2(u)-\cos^2(u)\right)\,\mathrm{d}u\,\mathrm{d}y\\ &=-\int_0^1\frac1y\left[\sin(u)\cos(u)\vphantom{\frac1y}\right]_0^{\tan^{-1}(1/y)}\,\mathrm{d}y\\ &=-\int_0^1\frac1{y^2+1}\,\mathrm{d}y\\[6pt] &=-\frac\pi4 \end{align} Similarly, we get \begin{align} \int_0^1\int_0^1\frac{x^2-y^2}{\left(x^2+y^2\right)^2}\,\mathrm{d}y\,\mathrm{d}x &=\int_0^1\int_0^1\frac{y^2-x^2}{\left(x^2+y^2\right)^2}\,\mathrm{d}x\,\mathrm{d}y\\[6pt] &=\frac\pi4 \end{align}

• I think you have a tiny error at the start in the first equality. The 1/y should be a 1/y^2, but slight modifications make the proof go through. Thanks again for the post! – Buklau Apr 8 '16 at 2:43
• I don't see any error. After the substitution $x\mapsto yx$, there are two factors of $y$ from the numerator, four factors of $y$ from the denominator and one from the $\mathrm{d}x$. That leaves one left over in the denominator. – robjohn Apr 8 '16 at 2:49
• Thanks! Missed the y from the substitution. – Buklau Apr 8 '16 at 3:05

Put $$f(x,y) = \arctan\left( \tfrac x y \right), \,\,\,\,\,\, (x,y) \in (0,1).$$ We see $$\frac{\partial f}{\partial y} = \frac{1}{1+\left(\tfrac x y \right)^2}\left( - \frac x {y^2} \right) = -\frac{x}{x^2 + y^2}.$$ Then $$\frac{\partial }{\partial x}\frac{\partial f}{\partial y} = - \frac{1}{x^2 + y^2} + \frac{x}{(x^2 + y^2)^2}(2x) = \frac{x^2 - y^2}{(x^2+y^2)^2}.$$ Next put $$g(x,y) = -\arctan\left( \tfrac y x \right), \,\,\,\,\,\, (x,y) \in (0,1).$$ Then $$\frac{\partial g}{\partial x} = \frac{1}{1+ \left(-\tfrac{y}{x}\right)^2} \left(\frac{y}{x^2} \right) = \frac{y}{x^2 + y^2}$$ so $$\frac{\partial}{\partial y}\frac{\partial g}{\partial x} = \frac{1}{x^2+y^2} - \frac{y}{(x^2+y^2)^2}(2y) = \frac{x^2 - y^2}{(x^2+y^2)^2}.$$ Then \begin{align*} \int^1_0 \int^1_0 \frac{x^2 - y^2}{(x^2+y^2)^2} dx dy &= \int^1_0 \int^1_0 \frac{\partial }{\partial x}\frac{\partial f}{\partial y} dx dy \\ &= \int^1_0 \frac{\partial f}{ \partial y}(1,y) - \frac{\partial f}{ \partial y}(0,y) dy \\ &=- \int^1_0 \frac{1}{1+y^2} dy = - \arctan(1) = - \frac \pi 4 \end{align*} and \begin{align*} \int^1_0 \int^1_0 \frac{x^2 - y^2}{(x^2+y^2)^2} dy dx &= \int^1_0 \int^1_0 \frac{\partial }{\partial y}\frac{\partial g}{\partial x} dy dx \\ &= \int^1_0 \frac{\partial g}{ \partial x}(x,1) - \frac{\partial g}{ \partial x}(x,0) dy \\ &= \int^1_0 \frac{1}{1+x^2} dx = \arctan(1) = \frac \pi 4. \end{align*}