       Re: Unexpected condition on convergence of integral

• To: mathgroup at smc.vnet.net
• Subject: [mg67329] Re: Unexpected condition on convergence of integral
• From: ab_def at prontomail.com
• Date: Sun, 18 Jun 2006 05:13:29 -0400 (EDT)
• References: <e6tc9d\$dtn\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Andrew Moylan wrote:
> Integrate[1 / (1 + (x - y)^2), {y, -Infinity, Infinity}] yields If[Im[x] != 0, Pi, ...], but (I think) this integral should converge to Pi unconditionally (try it for some real values of x).
>
> Using the option "Assumptions -> Im[x] == 0" in Integrate[] further yields the following warning: "Integral of [bla] does not converge on {-Infinity, Infinity}".
>
> Can anyone shed some light on why Integrate can't determine that this integral converges for all x?

The answer that Mathematica gives is incorrect, as the integral isn't
always equal to Pi when Im[x] != 0. The value of the integral depends
on the position of the poles of 1 + (x - y)^2. Here's the condition
that determines when the poles are on different sides of the real line:

In:= P[x_, y_] := 1 + (x - y)^2

In:= Reduce[Times @@ (Im[y] /. Solve[P[x, y] == 0, y]) < 0, x]

Out= -1 < Im[x] < 1

For such x the integral is equal to 2*Pi*I times the residue at the
upper pole:

In:= 2*Pi*I*Residue[1/P[x, y], {y, Root[P[x, #]&, 2]}]

Out= Pi

If Abs[Im[x]] > 1, then both poles lie either above or below the real
line and the integral is zero. If Abs[Im[x]] == 1, the integral
diverges.

Another way is to set x = a + I*b and expand the integrand into the
real and imaginary parts. The integral is independent of a, so the
problem reduces to integrating 1/(y^2 + (b + 1)^2) and 1/(y^2 + (b -
1)^2), which is elementary:

In:= Assuming[Element[{a, b}, Reals],
Integrate[ComplexExpand[Re[1/P[a + I*b, y]]],
{y, -Infinity, Infinity}]]

Out= If[b < -1 || -1 < b < 1 || b > 1, (1/2)*Pi*(Sign[1 - b] +
Sign[1 + b]), Integrate[(1 - b^2 + (a - y)^2)/(((-1 + b)^2 + (a -
y)^2)*((1 + b)^2 + (a - y)^2)), {y, -Infinity, Infinity}, Assumptions
-> a \[Element] Reals && (b == -1 || b == 1)]]

Note that the conditions in the result of Integrate aren't supposed to
give the exact region of convergence, they just (should) give a
sufficient condition:

In:= Integrate[1/(x^2 + y^2), {y, -Infinity, Infinity}]

Out= If[Re[x] > 0, Pi/x, Integrate[1/(x^2 + y^2), {y, -Infinity,
Infinity}, Assumptions -> Re[x] <= 0]]

Then we can reevaluate the output:

In:= Take[#, {2, -2}]&@ FixedPointList[Evaluate //@ #&, %]

Out= {If[Re[x] > 0, Pi/x, If[Re[x] < 0, -(Pi/x), Integrate[1/(x^2 +
y^2), {y, -Infinity, Infinity}, Assumptions -> Re[x] == 0]]], If[Re[x]
> 0, Pi/x, If[Re[x] < 0, -(Pi/x), If[Re[x^2] >= 0 || Im[x^2] != 0, Pi*Sqrt[1/x^2], Integrate[1/(x^2 + y^2), {y, -Infinity, Infinity}, Assumptions -> False]]]]}

Assumptions -> False seems to be the result of a bug in Reduce:

In:= Reduce[Re[x] == 0 && !(Re[x^2] >= 0 || Im[x^2] != 0), x]

Out= False

I think here Mathematica follows the rule to evaluate Integrate[...,
Assumptions -> assum] to If[assum2, ..., Integrate[..., Assumptions ->
!assum2 && assum]] in order to avoid infinite loops, but it's not
always so:

In:= Integrate[Sin[x - a]/(x^2 - a^2), {x, -Infinity, Infinity},
Assumptions -> a != 0]

Out= If[Im[a] > 0, -(((-1 + E^(2*I*a))*Pi)/(2*a)), Integrate[Sin[a -
x]/(a^2 - x^2), {x, -Infinity, Infinity}, Assumptions -> Im[a] <= 0]]

The condition Im[a] <= 0 doesn't imply a != 0 and after a few steps the
sequence will repeat itself:

In:= Nest[Evaluate //@ #&, %, 2]

Out= If[Im[a] > 0, -(((-1 + E^(2*I*a))*Pi)/(2*a)), If[Im[a] < 0,
(Pi*Sin[a]*(I*Cos[a] + Sin[a]))/a, If[a == 0, 0, Integrate[Sin[a -
x]/(a^2 - x^2), {x, -Infinity, Infinity}, Assumptions -> a != 0]]]]

So here we would get infinite recursion if we tried to evaluate to the
fixed point. Incidentally, PiecewiseExpand avoids infinite recursion
because it stops at a certain depth:

f[x_] := (Print[x]; If[x > 10, 0, If[a > 0, 0, f[x + 1]]])
PiecewiseExpand[f]

Maxim Rytin
m.r at inbox.ru

```

• Prev by Date: Re: standard errors and confidence intervals in NonlinearRegress
• Next by Date: Re: Problem with derivate of product
• Previous by thread: Re: Unexpected condition on convergence of integral
• Next by thread: GraphPlot question