Re: Finding real part (newbie question)
- To: mathgroup at smc.vnet.net
- Subject: [mg15770] Re: [mg15722] Finding real part (newbie question)
- From: Carl Woll <carlw at fermi.phys.washington.edu>
- Date: Sun, 7 Feb 1999 02:03:51 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Gnalle,
The mathematica function you are looking for is ComplexExpand. For
example,
ComplexExpand[ Re[1/(a + I b + 1/(c + I d))], TargetFunctions->{Re,Im}]
The option TargetFunctions->{Re,Im}
is not necessary, but it usually helps produce the output you are
looking for. Without this option, Mathematica will think that Abs[a+b
I] does not need to be simplified/expanded.
You might also want to throw in a Simplify[] command on your output.
Carl Woll
Dept of Physics
U of Washington
On Fri, 5 Feb 1999, Gnalle wrote:
> If a,b,c,d are real numbers. How do I use mathematica to find the real
> part of
>
> 1/(a + I b + 1/(c + I d))
>
> Yes I can calculate it by hand, but I would like to know how to use
> Mathematica.
> --
>
> Niels Langager Ellegaard
> 'http://mmf.ruc.dk/~gnalle/'
>