Re: Re: More strange behavior by ComplexExpand
- To: mathgroup at smc.vnet.net
- Subject: [mg60678] Re: [mg60607] Re: [mg60603] More strange behavior by ComplexExpand
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sat, 24 Sep 2005 02:55:23 -0400 (EDT)
- References: <200509210720.DAA08138@smc.vnet.net> <200509220608.CAA01807@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 22 Sep 2005, at 15:08, Andrzej Kozlowski wrote:
> This expression is completely correct. ComplexExpand is allowed to
> return imaginary numbers in its output, even if the input is real.
It has occured to me that this may not be so obvious so perhaps it
might be a good idea to illustrate it. In Raul's case the expression
to which ComplexExpand was applied was not actually "real": it was
only real when the parameter a was assumed to be positive. But
ComplexExpand may produce a seemingly complex expression even when
applied to something that is unambiguously real, in fact even a
numeric real. Here is an example:
ComplexExpand[1 - ArcTan[Sqrt[5]], TargetFunctions ->
{Abs}]
1 - (1/2)*I*Log[1 - I*Sqrt[5]] +
(1/2)*I*Log[1 + I*Sqrt[5]]
even though
ComplexExpand[Im[1 - ArcTan[Sqrt[5]]]]
0
I don't think this can happen with the default setting of
TargetFunctions ->{Re,Im} but still this illustrates can return
seemingly non-real forms even for purely real input (not just real
parameters). (Of course I think this is just as it should be).
Andrzej Kozlowski
- References:
- More strange behavior by ComplexExpand
- From: Raul Martinez <raulm231@comcast.net>
- Re: More strange behavior by ComplexExpand
- From: Andrzej Kozlowski <andrzej@yhc.att.ne.jp>
- More strange behavior by ComplexExpand