# How to evaluate $\iint_A \frac{1}{x^2+y^2}\,\mathrm dx\,\mathrm dy,$ where $A=[\frac{1}{a},a]\times[0,1]$ [duplicate]

I want to compute

$$\iint_A \frac{1}{x^2+y^2}\,\mathrm dx\,\mathrm dy$$ where $$A:=\left[\frac{1}{a},a\right]\times[0,1]$$.

I got that this is equal to $$\int_{1/a} ^a \frac{1}{x}\arctan \Big(\frac{1}{x}\Big) \mathrm dx\$$ and I don't know what to do from here. Can somebody help me, please?

• in this case i get $\int \frac{1}{u}arctanu \ du$ Commented Dec 29, 2019 at 16:30
• Hint: after you've integrated over $y$ make the change of variables $x\mapsto 1/x$, and add the resulting one-variable integral to the original one-variable integral. Commented Dec 29, 2019 at 16:37
• A nice property you may find useful: for $s>0$, $$\arctan\frac{1}{s}=\frac\pi2-\arctan s$$ Commented Dec 29, 2019 at 17:19
• Another way: Let $a\geq1$ and $$I(a)=\int_{\frac1a}^a \frac{\arctan(x)}x\,\mathrm dx.$$ Then, by the Fundamental Theorem of calculus (or Leibniz rule, if you want), $$I'(a)=\frac{\arctan(a)}{a}\cdot 1 - \frac{\arctan(\frac{1}{a})}{\frac{1}{a}} \cdot \left(-\frac{1}{a^2}\right)=\frac{\pi}{2a}$$ So, since $I(1)=0$, we get $I(a)=\frac\pi2\ln(a)$ Commented Dec 29, 2019 at 17:22

Let's catch up with you: \begin{align} \iint\limits_A \frac{1}{x^2+y^2}dx\,dy &= \int\limits_{\frac{1}{a}}^a\int\limits_0^1\frac{1}{x^2+y^2}dy\,dx\\ &=\int\limits_{\frac{1}{a}}^a\int\limits_0^1\frac{1}{x^2(1 + (y/x)^2)}dy\,dx. \end{align} Taking $$u = y/x, \frac{\partial u}{\partial y} = 1/x$$ so the last integral becomes
\begin{align} \int\limits_{\frac{1}{a}}^a\int\limits_0^{\frac{1}{x}}\frac{1}{x(1 + u^2)}du\,dx &= \int\limits_\frac{1}{a}^a\frac{1}{x}\arctan \left(\frac{1}{x}\right)\,dx \\ &=\int\limits_a^\frac{1}{a} -\frac{1}{u}\arctan u\,du \\ &= \int\limits_\frac{1}{a}^a \frac{1}{u}\arctan u\,du, \end{align} because $$u = 1/x \implies du = -1/x^2\,dx = -u^2 \,dx \implies dx = du/u^2$$ and $$1/a \mapsto a, a \mapsto 1/a$$. Accordingly to WolframAlpha, the indefinite integral for your expression has no closed form (in terms of elementary functions), but Wolfram Mathematica tells us it has a closed form with those integration limits (kudos to Semiclassical)!
So we have to exploit our integration limits. Let $$I =\int\limits_\frac{1}{a}^a\frac{1}{x}\arctan \left(\frac{1}{x}\right)\,dx$$. Since $$\arctan x = \pi/2 - \arctan 1/x$$,
\begin{align} I &= \int\limits_\frac{1}{a}^a \frac{1}{u}\arctan u\,du,\\ &= \int\limits_\frac{1}{a}^a \frac{1}{u}\left(\frac{\pi}{2}-\arctan \frac{1}{u}\right)\,du \\ &= \frac{\pi}{2}\left(\int\limits_\frac{1}{a}^a 1/u\,du\right) - I \\ &= \frac{\pi}{2}(\ln a - \ln(1/a)) - I \\ &= \pi \ln a - I. \end{align}
Therefore $$I = \frac{\pi}{2}\ln a$$, as desired.