-1
$\begingroup$

I wanted to evaluate the following integral:

Integrate[(2 - 2 Cos[a - b])/(1 + x^2 - 2 x Cos[a - b]), {a, 0, 2 Pi}, {b, 0, 2 Pi}]

which yields (4 Pi^2)/x as the result. However, the same integral upon with substitution of variables and expressed as

Integrate[(2 - 2 Cos[y])/(1 + x^2 - 2 x Cos[y]), {a, 0, 2 Pi}, {y, 0, 2 Pi}]

yields (8 Pi^2)/(1 + x) as the answer. I can't trace the root for this error. Can somebody clarify why Mathematica gives a wrong answer for the first input?

$\endgroup$
3
  • $\begingroup$ Why do you think the substitution of variables in the double integral under consideration is correctly done? $\endgroup$
    – user64494
    Dec 9, 2016 at 8:37
  • $\begingroup$ I vote to close this question because has nothing to do with MMA. $\endgroup$ Dec 9, 2016 at 9:53
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because it has nothing to do with Mathematica but follows from a misunderstanding of the underlying mathematics. $\endgroup$
    – Feyre
    Dec 9, 2016 at 16:41

1 Answer 1

6
$\begingroup$

This is simply a math error that has nothing to do with MMA. Consider the transformation from the $(a,b)$ coordinates to the $(y,z)$ coordinates under the following transformation: $$a=z \;,$$ $$b=z-y \;.$$ This will give $a-b =y$, but we must also transform the $da\;db=|J|dz\;dy$. We calculate the determinant of the Jacobian matrix to be -1. Finally, we must also transform the limits of integration. Where we had $0<a<2\pi$, we get $0<z<2\pi$. Where we had $0<b<2\pi$ we get $z<y<z-2\pi$.

So, the transformated integral, using $a$ instead of $z$, is

Integrate[-(2 - 2 Cos[y])/(1 + x^2 - 2 x Cos[y]),
 {a, 0, 2 Pi}, {y, a, a - 2 Pi}]

The integral evaluates to $\frac{4\pi}{x}$.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.