Message Boards Message Boards

0
|
9310 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

using function Abs on complex number

Posted 10 years ago

I am having some difficulty when dealing with complex number using mathematica function Abs. I am trying to use Abs[1+ I w] to get Abs[1+ I w]=Sqrt[1+ w^2]. But, it seems that I can't do it in a straight forward way. That is

  $Assumptions = \[Omega] \[Element] Reals
    Abs[1 + I \[Omega]]

Using the above lines, I don't get the right answer. After reading some previous post related with complex numbers, I tried to use ComplexExpand function.

 ComplexExpand[Abs[1 + I \[Omega]], TargetFunctions -> {Re, Im}]

Using the above function, I get the right answer.

My question is why I failed in the first attempt, or what is the logic that Abs[1 + I [Omega]] will not give me what I want. Is there a way to get the expected answer by using Abs.

Many thanks

POSTED BY: jason gao

If you see documentation:

Abs[z] is left unevaluated if z is not a numeric quantity.

So it has always to be forced with ComplexExpand, which also works without any option by the way.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract