MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Demonstrate that 1==-1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23247] Re: [mg23220] Re: [mg23171] Demonstrate that 1==-1
  • From: Andrzej Kozlowski <andrzej at bekkoame.ne.jp>
  • Date: Sat, 29 Apr 2000 22:04:53 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Actually it is rather easy to see the source of the problem. Consider simply
the indefinite integrals:

In[2]:=
f[u_] = Integrate[(-1 - a/E^(I*u))/(1 - a/E^(I*u)), u] // Simplify
Out[2]=
                  I u
u + 2 I Log[-a + E   ]

In[3]:=
g[u_] = Integrate[(1 + a/E^(I*u))/(-1 + a/E^(I*u)), u] // Simplify
Out[3]=
                   a
-u + 2 I Log[-1 + ----]
                   I u
                  E

In[7]:=
f[2Pi] - f[0]
Out[7]=
2 Pi

In[8]:=
g[2Pi] - g[0]
Out[8]=
-2 Pi

It looks like that is  how Mathematica got its answers. However, the problem
is that each answer is correct only for certain a's. The reason for this is
that Log has a branch cut along the negative real axis. As u goes from 0 to
2Pi we need to avoid the branch cut. If the absolute value of a is greater
than 1 the second function is the correct one to take, otherwise it is the
first one. One can show this using Mathematica as follows. We write the
condition that -a + E^(I*u) lies on the negative real axis and FullSimplify
it:

In[9]:=
FullSimplify[ComplexExpand[Im[-a + E^(I*u)], {a},
     TargetFunctions -> {Im, Re}] == 0 &&
   ComplexExpand[Re[-a + E^(I*u)], {a}, TargetFunctions ->
      {Im, Re}] < 0, {u \[Element] Reals}]
Out[9]=
Cos[u] < Re[a] && Im[a] == Sin[u]


This of course implies that
Abs[a]=Sqrt[Re[a]^2+Im[a]^2]>Sqrt[Cos[u]^2+Sin[u]^2]==1.  (Unfortunately
Mathematica is  unable to verify this obvious fact:

In[10]:=
FullSimplify[Abs[a] > 1, Cos[u] < Re[a] && Im[a] == Sin[u]]

Out[10]=
Abs[a] > 1 )

In the same way one can deal with the second function.

The problem seems to be that  choosing integration paths which avoid branch
cuts is, I think, rather difficult for computer programs. I am not sure why
Mathematica decided to choose each indefinite integral in each case but
clearly it was "correct" to do so. In as much as one can talk of an
"indefinite integral"  one is as good as the other.
The problem arises when an indefinite integral is used to solve a "definite"
integration problem. To give the correct answer (say, in the form of a
conditional statement) Mathematica would have to carefully consider the
question of branch cuts. It is not at all obvious to me what sort of general
algorithm could be used to do that so I can't blame Mathematica for taking a
rather simple minded approach.

The alternative, perhaps prefarable, is to refuse to give any answers to
integrals of this type, or maybe just to issue a warning that the answer
might be incorrect.

Andrzej Kozlowski

on 4/25/00 2:40 PM, Kevin J. McCann at kevinmccann at home.com wrote:

> f1[a_] := Integrate[ (-1 - a/E^(I*u))/(1 - a/E^(I*u)), {u, 0, 2*Pi}]
> 
> 
> f2[a_] := Integrate[(1 + a/E^(I*u))/(-1 + a/E^(I*u)), {u, 0, 2*Pi}]
> 
> 
> 
> {f1[a],f2[a]} = {2*Pi, -2*Pi}
> 
> {f1[2],f2[2]} = {2*Pi, 2*Pi}
> 
> {f1[-2],f2[-2]} = {2*Pi, 2*Pi}
> 
> {f1[1/2],f2[1/2]} = {-2*Pi, -2*Pi}
> 
> Seems that it works fine with a definite choice for a, but not when a is a
> variable.  Not sure what Mathematica is assuming for a, or why. Ordinarily
> Mathematica puts
> out a conditional answer where appropriate. Not so here for a > 1 or a < 1.
> Normal behavior is that Mathematica puts out a conditional, not so here. This
> is a
> BUG.
> 
> Cheers,
> 
> Kevin
> 
> "David Withoff" <withoff at wolfram.com> wrote in message
> news:8e0mhl$f25 at smc.vnet.net...
>>> Compute
>>> Integrate[(1 + a/E^(I*u))/(-1 + a/E^(I*u)), {u, 0, 2*Pi}]
>>> 
>>> Mathematica gives -2Pi
>>> 
>>> Now multiply the numerator and the denominator by -1
>>> 
>>> Integrate[(-1 - a/E^(I*u))/(1 - a/E^(I*u)), {u, 0, 2*Pi}]
>>> 
>>> Mathematica gets 2*Pi
>>> 
>>> This is only possible if 1==-1
>> 
>> It is also possible if the first integral implicitly makes
>> the assumption Abs[a]<1 and the second integral implicitly
>> makes the assumption Abs[a]>1.  Implicit assumptions like
>> this are quite common in definite Integrate with symbolic
>> parameters.  Although it is often desirable for Integrate
>> to report such assumptions, that does not yet happen in
>> all examples.
>> 
> 
> 
> 



  • Prev by Date: Re: Q: PlotPoints has dramatic timing effect (and not trivialy)
  • Next by Date: Re: Vector Union
  • Previous by thread: Re: Demonstrate that 1==-1
  • Next by thread: AW: Slow System reaction under WinNt4.0 SP 6, during Mathematica is running......