MathGroup Archive 1995

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

Search the Archive

Re: Re: Imaginary ...

  • To: mathgroup at
  • Subject: [mg2529] Re: [mg2490] Re: [mg2430] Imaginary ...
  • From: Allan Hayes <hay at>
  • Date: Thu, 16 Nov 1995 01:46:17 -0500

Jesus ROJO <jesroj at>
in [mg2490] Re: [mg2430] Imaginary ...
warns about

   f:=a+I b
      Sqrt[(a+I b) Conjugate[a+I b]]

I have recently been dealing with this laziness of ComplexExpand on  
some quite large expressions.
The following might be of interest

   ComplexExpand[Sqrt[f*Conjugate[f]],TargetFunctions ->{Re,Im}]

      Sqrt[(a - I b) (a + I b)]


   ComplexExpand[%,TargetFunctions ->{Re,Im}]
            2    2
       Sqrt[a  + b ]

So I used FixedPoint to automate the process

      ComplexExpand[#, TargetFunctions ->{Re,Im}]&,
      Sqrt[f Conjugate[f]]

            2    2
      Sqrt[a  + b ]

Allan Hayes
hay at

  • Prev by Date: Re: Recombining CoefficientList
  • Next by Date: Re: Logic Problems
  • Previous by thread: Re: Re: Imaginary ...
  • Next by thread: changing defaults under Mma 2.2.2 for Windows????