1

What is the integral of $1/\sqrt{x^2+y^2}$ over a rectangle, i.e. what is the solution to the following integral?

$$\int_{x_1}^{x_2} \int_{y_1}^{y_2} \frac{1}{\sqrt{x^2+y^2}} \, dy\, dx$$

I am aware that some posts indicate a change to polar coordinates, but how are the integration limits then defined?

Basically I just need some expression to put inside a piece of code.

Thanks in advance!

Thomas Andrews
  • 177,126
Tim
  • 11
  • 2
  • Assuming the rectangle is in the First Cuadrant (and far away from zero) $\int\frac{1}{\sqrt{x^2+y^2}}dx={\rm arcsinh}(x/y)$. – Tito Eliatron Sep 23 '21 at 07:18
  • 1
    Actually, it is $\frac1{y^2}\operatorname{arcsinh}(x/|y|),$ @TitoEliatron – Thomas Andrews Sep 23 '21 at 07:26
  • Thank you very much Tito! Actually, the zero-point of the reference system will most likely be at the center of the quadrant, but can in general be anywhere. – Tim Sep 23 '21 at 07:44
  • 1
    I believe that using $f(x,y)=f(-x,y)=f(x,-y)$ one can get expression for any rectangle using combination of origin-centered rectangles. – Ivan Kaznacheyeu Sep 23 '21 at 07:58
  • For positive $a$ and $b$, it can be shown that $\int_{0}^{a}\mathrm{d}x\int_{0}^{b}\mathrm{d}y,\frac{1}{\sqrt{x^{2}+y^{2}}}=a\operatorname{arsinh}{\left(\frac{b}{a}\right)}+b\operatorname{arsinh}{\left(\frac{a}{b}\right)}$. – David H Sep 23 '21 at 15:17
  • Thanks @DavidH! However, I guess I am more looking for something like $\int_{-dx/2}^{dx/2} \int_{-dy/2}^{dy/2} \frac{1}{\sqrt{x^2+y^2}} dx dy$ – Tim Sep 27 '21 at 11:05

0 Answers0