I am using a trial version of Mathematica 12.2.0.0 on a 64-bit version of Windows 10. I am trying to evaluate simple integrals that come up in classical electrodynamics. In the first case, I evaluate
Integrate[1/(x^2 + y^2 + z^2)^(3/2), {x, -a, a}, {y, -a, a}, Assumptions -> a > 0 && z > 0]
and get a reasonable result:
(4 ArcTan[a^2/(z Sqrt[2 a^2 + z^2])])/z
If I rename the limits of integration under a basic transformation (a -> a/2), as such:
Integrate[1/(x^2 + y^2 + z^2)^(3/2), {x, -a/2, a/2}, {y, -a/2, a/2},
Assumptions -> a > 0 && z > 0]
I get the following result:
(1/z)I (-Log[-a^2 + 2 I a z - 4 z^2 - Sqrt[2] a Sqrt[a^2 + 2 z^2]] -
Log[a^2 + 2 I a z + 4 z^2 - Sqrt[2] a Sqrt[a^2 + 2 z^2]] +
Log[-a^2 + 2 I a z - 4 z^2 + Sqrt[2] a Sqrt[a^2 + 2 z^2]] +
Log[a^2 + 2 I a z + 4 z^2 + Sqrt[2] a Sqrt[a^2 + 2 z^2]])
Frustratingly, FullSimplify, Simplify, FunctionExpand, all with Assumptions -> a > 0 && z > 0, do not seem to simplify the expression satisfactorily. Neither do TrigToExp and ExpToTrig, unfortunately. I even tried:
Integrate[1/(x^2 + y^2 + z^2)^(3/2), {x, -a/2, a/2}, {y, -a/2, a/2},
Assumptions ->
a \[Element] Reals && x \[Element] Reals && y \[Element] Reals &&
a > 0 && z > 0]
with no luck. Does anybody know how to prevent this behavior, or how to convert this result into a reasonable one? The standard tricks don't seem to work. Thanks!