MathGroup Archive 2010

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

Search the Archive

Re: Absolute value

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110608] Re: Absolute value
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 28 Jun 2010 02:28:13 -0400 (EDT)

Presumably, you meant the square of your expression

expr = Abs[Exp[I*phi1] + Exp[I*phi2]]^2;

ComplexExpand[expr,
  TargetFunctions -> {Re, Im}] //
 FullSimplify

2 (cos(phi1-phi2)+1)


Bob Hanlon

---- Marco Masi <marco.masi at ymail.com> wrote: 

=============
I would like to calculate the absolute value of complex quantities. For example Abs[Exp[I phi1]+Exp[I*phi2]], which sould give 2 (1+cos(phi1-phi2)). However it does not work. I tried to use real numbers as assumtion, but it always answers "Abs[Exp[I phi1]+Exp[I*phi2]]". What am I doing wrong?

Regards, Mark.




  • Prev by Date: Re: Absolute value
  • Next by Date: Re: Sum of terms --> list
  • Previous by thread: Re: Absolute value
  • Next by thread: Re: Absolute value