MathGroup Archive 1999

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

Search the Archive

Re: Forcing Re[]'s to be Real

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18256] Re: Forcing Re[]'s to be Real
  • From: "Neal E. Tornberg" <neal.e.tornberg at boeing.com>
  • Date: Thu, 24 Jun 1999 14:24:39 -0400
  • Organization: Boeing
  • References: <7kpbj1$4b8@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

try
Re[Sqrt[1.+I]]
i.e. use a real constant to force Mathematica to do the numerics
Try defining k[w_Real]:=....

Anthony Foglia wrote:
> 
>         I seem to have found an interesting problem involving computing the
> real part of complex numbers.  (Interesting, in that it wasn't there a few
> weeks ago when I ran the (as-far-as-i-can-remember) exact same code.)
> 
> I have a complex function:
> 
> k[w] := Sqrt[w^2 (1 + (2 / (1 + I w)))]
> 
> I want to graph the real and imaginary parts, but Mathematica doesn't want
> to express the Re[k[w]] as a real number.  What do I mean?  Well, if I
> type:
> 
> Re[Sqrt[1+I]]
> 
> I get out
> 
> Re[Sqrt[1+I]]
> 
> Same if I do Re[ComplexExpand[Sqrt[1+I]]], or Re[(1+I)^(1/2)].  But if I
> enter:
> 
> Re[ComplexExpand[(1+I)^(1/2)]
> 
> Mathematica is kind enough to respond with:
> 
> 2^(1/4) Cos[Pi/8]
> 
> I'm certain that this is the root of my problem, but I'll be damned if I
> know why Mathematica doesn't like it now, but did a few weeks ago.  Any
> help?
> 
> --Anthony

-- 
Neal E. Tornberg
neal.e.tornberg at boeing.com

Nobody here thinks I speak for Boeing.
You shouldn't either.



  • Prev by Date: Re: Latex
  • Next by Date: Re: Forcing Re[]'s to be Real
  • Previous by thread: Re: Forcing Re[]'s to be Real
  • Next by thread: Re: Forcing Re[]'s to be Real