MathGroup Archive 2005

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

Search the Archive

Re: with 5.2 Mac

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60004] Re: with 5.2 Mac
  • From: sbjensen at midway.uchicago.edu (Steuard Jensen)
  • Date: Sun, 28 Aug 2005 03:07:39 -0400 (EDT)
  • Organization: The University of Chicago
  • References: <de45i8$qtf$1@smc.vnet.net> <dehjl8$c6t$1@smc.vnet.net> <200508251033.GAA10092@smc.vnet.net> <demmb5$rec$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Quoth Andrzej Kozlowski <akoz at mimuw.edu.pl> in article
<demmb5$rec$1 at smc.vnet.net>:
> On 25 Aug 2005, at 11:33, Steuard Jensen wrote:
> > Quoth Andrzej Kozlowski <akoz at mimuw.edu.pl>:
> >> In fact using Complex[a_,b_]->Complex[a,-b] instead of Conjugate can
> >> cause more serious problems and actually give wrong answers.

> >> The reason is that if f is a function in the complex plane that
> >> is not holomorphic then it it not necessarily true that
> >> Conjugate[f[z]] = f [Conjugate[z]].

> >> As an example take
> >> u = Im[Sqrt[2 + 3*I]];

I think I understand your point here now.  I had thought that you were
talking only about functions like Sqrt[#] or (#)^(4/5) (from your
earlier example), but it looks like the real issue was with functions
like Im[#].  My response (below) was aimed only at the former; I can
see that it didn't apply at all to the latter.

> > As far as I can tell, the only difference between using, e.g.,
> > ComplexExpand[Conjugate[#]] and (#/.Complex[a_,b_]->Complex[a,-b])
> > in these examples is which branch of the function you end up on.
> > (That is, you'll still get a square root of (2-3 I) or a fifth
> > root of Conjugate[1]=1 using either method.)

> > So these changes will only be an issue if your work depends
> > somehow on the exact order in which Mathematica sorts roots or
> > other branches of functions.

> I am not quite sure what you mean but here is an example that I  
> produced essentially at random:
> 
> u = Arg[Sqrt[a + b*I]] + Cos[Im[Sin[a + b*I]]];

So in your example here, for instance, it's the presence of Arg and Im
that make the results of "Complex[a_,b_]->Complex[a,-b]" incorrect
rather than simply different (as I've used the terms).  Conjugate[]
knows that Arg and Im return real numbers and hence should be left
alone, but the substitution method doesn't.

For what it's worth, I don't think that any functions like Arg or Im
show up in my actual work, but this is precisely the sort of exception
I was hoping to identify.

> > For my purposes, I'm not particular about what order the various
> > branches are listed in, unless that somehow leads to inconsistent
> > results.  (In fact, I'm not certain that my current work has any
> > roots that aren't of non-negative reals, but I'm still interested
> > in a solution that's reliable in general.)  So are there potential
> > pitfalls of the "simple substitution conjugation" approach that
> > would lead to a truly wrong answer (as opposed to simply a
> > different one)?

> I would consider the above answers to be "truly different", although
> if you look at their symbolic form you will see some "similarities".
> The point is however, that as long as the expressions you are
> dealing with contain non-holomorphic "named" functions such as Arg,
> Im etc, you can easily get numerical results that will be
> numerically "truly different". If the named functions in your
> expressions are all holomorphic (and take real values on the real
> axis) one can prove that there will be no such problems.

For the reasons outlined above, I'm pretty comfortable with the
results for powers, roots, trig functions, and the like as well.  But
cases like Arg and Im do present a problem for a direct substitution
method like this.  Even though I doubt that the issue would come up in
my work, I'd really prefer that it not sneak up and bite me in the
future.  So ComplexExpand it is. :)

Thanks to you and everyone else who has offered suggestions for your
help!  (I assume nobody's come up with an explanation of the reduced
success of Refine yet, eh?)

						Steuard Jensen


  • References:
  • Prev by Date: Re: help working with functions (follow-up)
  • Next by Date: Volterra integral equation of the first kind
  • Previous by thread: Re: Re: with 5.2 Mac
  • Next by thread: Re: Simplifying Conjugate[] with 5.2 Mac