       Re: Getting Symbolic Real and Imag Parts? (Once Again)

• To: mathgroup at smc.vnet.net
• Subject: [mg33504] Re: Getting Symbolic Real and Imag Parts? (Once Again)
• Date: Sun, 24 Mar 2002 01:43:58 -0500 (EST)
• References: <a7cs6t\$hv8\$1@smc.vnet.net> <a7eu4h\$mss\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Try the following:

In:=
zComplex = ComplexExpand[Sin[a + I*b], TargetFunctions -> {Re, Im}]
realz = ComplexExpand[Re[zComplex]]
imz = ComplexExpand[Im[zComplex]]

Out=
Cosh[b]*Sin[a] + I*Cos[a]*Sinh[b]

Out=
Cosh[b]*Sin[a]

Out=
Cos[a]*Sinh[b]

In fact you can skip the first step:

In:=
myz = Sin[a + I*b]
realmyz = ComplexExpand[Re[myz]]
imagmyz = ComplexExpand[Im[myz]]

Out=
Sin[a + I*b]

Out=
Cosh[b]*Sin[a]

Out=
Cos[a]*Sinh[b]

Rodney Sparapani <rsparapa at mcw.edu> wrote in message news:<a7eu4h\$mss\$1 at smc.vnet.net>...
> aes
>
> Try Im[zComplex] which gives Im[Cosh[b] Sin[a]]+Re[Cos[a] Sinh[b]]
>
> That looks a little strange until you realize that the Im[] portion
>
> is 0 if a and b are real, i.e. Mathematica doesn't assume anything.

```

• Prev by Date: Re: Sinh[y]/y as y->0?
• Next by Date: re: finding functions based on input and output tables
• Previous by thread: Re: Getting Symbolic Real and Imag Parts? (Once Again)
• Next by thread: Re: Getting Symbolic Real and Imag Parts? (Once Again)