[Date Index]
[Thread Index]
[Author Index]
Re: Absolute value
*To*: mathgroup at smc.vnet.net
*Subject*: [mg110610] Re: Absolute value
*From*: "J. Batista" <jbatista800 at gmail.com>
*Date*: Mon, 28 Jun 2010 02:28:37 -0400 (EDT)
On Sun, Jun 27, 2010 at 4:55 AM, 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.
>
>
Mark, the modulus or absolute value (Abs[Z]) of a complex number Z = a + j*b
is the distance from the origin. Hence, if Z = a + j*b, then Abs[Z] =
Sqrt[a^2 + b^2]. Therefore, I believe that your answer is missing the
squared root (it should be Sqrt[2 (1 + Cos(phi1 - phi2))]. According to
Mathematica, Abs [Z] is left unevaluated if Z is not a numeric quantity.
Therefore, it doesn't look like you are doing anything particularly wrong in
your hand calculations. However, the function you are calling (Abs) does
not seem to support your intended approach, i.e. use with algebraic
expressions. This is indicated by the Mathematica documentation (see Abs in
the documentation center, pay close attention to the 'more information'
section).
Regards,
J. Batista
Prev by Date:
**Export[] hi-res JPEG not affecting Axes|Plot Label->**
Next by Date:
**Re: Sum of terms --> list**
Previous by thread:
** Re: Absolute value**
Next by thread:
**Re: Absolute value**
| |