MathGroup Archive 2005

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

Search the Archive

Re: Re: with 5.2 Mac

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59952] Re: [mg59906] Re: with 5.2 Mac
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Fri, 26 Aug 2005 04:53:47 -0400 (EDT)
  • References: <de45i8$qtf$1@smc.vnet.net> <200508230851.EAA03009@smc.vnet.net> <8B09B5D2-0003-4529-8281-677494C3F6D9@mimuw.edu.pl> <dehjl8$c6t$1@smc.vnet.net> <200508251033.GAA10092@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 25 Aug 2005, at 11:33, Steuard Jensen wrote:

> Quoth Andrzej Kozlowski <akoz at mimuw.edu.pl> in article
> <dehjl8$c6t$1 at smc.vnet.net>:
>
>> In fact using Complex[a_,b_]->Complex[a,-b] instead of Conjugate can
>> cause more serious problems and actually give wrong answers.
>>
>
> That's certainly what I'm worried about.  But...
>
>
>> 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]];
>>
>
>
>> N[Conjugate[u]]
>> 0.895977
>>
>
>
>> but
>>
>
>
>> N[u/.Complex[a_,b_]->Complex[a,-b]]
>> -0.895977
>>
>
>
> ...but this example doesn't actually bother me at all (not yet, at
> least!), nor do your earlier examples involving (-1)^(4/5):
>
>
>
>> On 23 Aug 2005, at 15:27, Andrzej Kozlowski wrote:
>>
>>> w = Last[x /. Solve[x^5 == 1, x]]
>>> (-1)^(4/5)
>>>
>
>
>>> ComplexExpand[Conjugate[(-1)^(4/5)]]
>>>
>>> -(-1)^(1/5)
>>>
> ...
>
>>> but Complex[a_,b_]->Complex[a,-b] will obviously have no effect.
>>>
>
> 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.  (And for what it's worth, I think that both approaches
> will give the same answer if the branch you've chosen gives an answer
> on the real line.)

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]]];


v = u /. Complex[x_, y_] -> Complex[x, -y];


w = Conjugate[u];


N[{v, w} /. {a -> 1, b -> 2}]


{-0.9326569724236657, 0.1744917453704246}


These answers look pretty different to me and I would be bothered by  
a discrepancy of this kind.


>
> 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.

Andrzej Kozlowski 


  • Prev by Date: Re: format of "Solve" output
  • Next by Date: Re: my wish list for Mathematica next major version
  • Previous by thread: Re: with 5.2 Mac
  • Next by thread: Re: with 5.2 Mac