Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

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

Search the Archive

Re: Re: Imaginary ...

  • Subject: [mg2529] Re: [mg2490] Re: [mg2430] Imaginary ...
  • From: hay at haystack.demon.co.uk (Allan Hayes)
  • Date: Thu, 16 Nov 1995 06:46:17 GMT
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at wri.com ( )

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

   f:=a+I b
   Sqrt[f*Conjugate[f]]//ComplexExpand
	
      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)]

Repeat:

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

So I used FixedPoint to automate the process

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

            2    2
      Sqrt[a  + b ]

Allan Hayes
hay at haystack.demon.co.uk


  • Prev by Date: Re: Writing big files with Mathematica
  • Next by Date: Re: Positive[a] = True ???
  • Previous by thread: Re: Imaginary ...
  • Next by thread: Re: Re: Imaginary ...