MathGroup Archive 2002

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

Search the Archive

RE: RE: Absolute Value of Complex Numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35221] RE: [mg35207] RE: [mg35196] Absolute Value of Complex Numbers
  • From: "DrBob" <majort at cox-internet.com>
  • Date: Wed, 3 Jul 2002 05:13:18 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

The point is that ComplexExpand DOES assume k is a real number, while
Abs, Simplify, and FullSimplify do not.

You can cause Simplify to assume it, however:

Simplify[Abs[2 Exp[k*I]], {Element[k, Reals]}]

2

However, you shouldn't use any of these tricks unless "k is Real" is a
good assumption in your application.  If not, Mathematica's original
answer is correct.  (In fact, it's correct regardless.)

Bobby

-----Original Message-----
From: David Park [mailto:djmp at earthlink.net] 
To: mathgroup at smc.vnet.net
Subject: [mg35221] [mg35207] RE: [mg35196] Absolute Value of Complex Numbers

Kyle,

You are assuming that k is a real number, but Mathematica doesn't assume
that. Use ComplexExpand to Simplify. (Perhaps they should have called it
ComplexSimplify.)

Abs[2 Exp[k*I]] // ComplexExpand
2

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> From: Kyle Davis [mailto:kyledavis at nowhere.com]
To: mathgroup at smc.vnet.net
>
> Abs[2 Exp[3 * i]]
> answer = 2
>
> Abs[2 Exp[k * i]]
> answer = 2 Exp[-Im[k]]
>
> Isn't the second answer supposed to be the same with the first one,
> regardless with the value of k? How do I make the second
> calculation give me
> the right answer?
>
>






  • Prev by Date: RE: Question about yet another bug in Sum
  • Next by Date: Re: Question about yet another bug in Sum
  • Previous by thread: Re: Absolute Value of Complex Numbers
  • Next by thread: Integrate