Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Abs and variables
Replies: 3   Last Post: Jun 28, 1996 9:54 AM

 Messages: [ Previous | Next ]
 Espen Haslund Posts: 4 Registered: 12/7/04
Re: Abs and variables
Posted: Jun 28, 1996 9:54 AM

>
> How can I have the Abs function treat real variables properly?
>I seem to recall a way of declaring a variable real, but I don't
>remember how. If there is such a way, would this work with Abs; i.e.
>fix the variable a so that "Abs[a]" will give a result of "a"?
>
>Thanks.
>
>/
>:@-) Scott
>\

Hi, Scott
I think you can obtain what want by using ComplexExpand with
the Option TargetFunctions->{Re, Im}. The optional
second argument of ComplexExpand specifies parameters to be
Complex (the rest is assumed to be real).

Below are two examples that I hope may be of some help.
(I think the manual is too brief on ComplexExpand)

-Espen

IN: z = 1 / (1/r1 + I w c) + r2

1
OUT: r2 + ----------
1
-- + I c w
r1

IN: ComplexExpand[Abs[z],
TargetFunctions->{Re, Im} ] //Simplify

2 2 2 2 2 2
r1 + 2 r1 r2 + r2 + c r1 r2 w
OUT: Sqrt[-----------------------------------]
2 2 2
1 + c r1 w

IN: z = 1 / (1/r1 + I w c) + z2

1
OUT: ---------- + z2
1
-- + I c w
r1

IN: ComplexExpand[Abs[z], {z2},
TargetFunctions->{Re, Im} ] //Simplify

c w 2
OUT: Sqrt[(-(------------) + Im[z2]) +
-2 2 2
r1 + c w

1 2
(------------- + Re[z2]) ]
1 2 2
-- + c r1 w
r1

Date Subject Author
6/18/96 Perrin
6/26/96 Victoria Steblina
6/26/96 Mark Evans
6/28/96 Espen Haslund