(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

I wish to find the following integral over the rectangle [-a,a] in u and [-b,b] in v using Mathematica. The constants a and b are positive (and non-zero). The variables x and y are in Reals.

[tex]A(x,y)=\int_{-a}^a{\int_{-b}^b{\log{\left[(u-x)^2+(v-y)^2\right]}{\rm d}v}{\rm d}u}[/tex]

2. Relevant equations

see above

3. The attempt at a solution

I find using Mathematica a different integral depending if I integrate on u or v first. I use the following code:

To integrate on v first:

To integrate on u first:Code (Text):Integrate[Log[(u - x)^2 + (v - y)^2], v]

(% /. v -> b) - (% /. v -> -b)

Integrate[%, u]

(% /. u -> a) - (% /. u -> -a)

The difference between these two (definite) double integrals is:Code (Text):Integrate[Log[(u - x)^2 + (v - y)^2], u]

(% /. u -> a) - (% /. u -> -a)

Integrate[%, v]

(% /. v -> b) - (% /. v -> -b)

[tex](x-y) (x+y) \left(\text{ArcTan}\left[\frac{a-x}{b-y}\right]+\text{ArcTan}\left[\frac{a+x}{b-y}\right]+\text{ArcTan}\left[\frac{b-y}{a-x}\right]+\text{ArcTan}\left[\frac{b-y}{a+x}\right]+\text{ArcTan}\left[\frac{a-x}{b+y}\right]+\text{ArcTan}\left[\frac{a+x}{b+y}\right]+\text{ArcTan}\left[\frac{b+y}{a-x}\right]+\text{ArcTan}\left[\frac{b+y}{a+x}\right]\right)[/tex]

Could someone please tell me what I am doing wrong?

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Double integral of a Log (natural)

**Physics Forums | Science Articles, Homework Help, Discussion**