Re: Absolute value
- To: mathgroup at smc.vnet.net
- Subject: [mg110614] Re: Absolute value
- From: Peter Pein <petsie at dordos.net>
- Date: Mon, 28 Jun 2010 02:29:31 -0400 (EDT)
- References: <i073n4$kk1$1@smc.vnet.net>
Am Sun, 27 Jun 2010 08:56:04 +0000 (UTC) schrieb Marco Masi <marco.masi at ymail.com>: > 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. > Hi Mark, 1.) you forgot the Sqrt around 2(1+cos(phi1-phi2)) in your posting. 2.) you did not use ComplexExpand: ComplexExpand[Abs[Exp[I phi1] + Exp[I phi2]]] // TrigFactor will return Sqrt[2] Sqrt[1 + Cos[phi1 - phi2]] Peter