Re: Getting Symbolic Real and Imag Parts? (Once Again)
- To: mathgroup at smc.vnet.net
- Subject: [mg33462] Re: Getting Symbolic Real and Imag Parts? (Once Again)
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 22 Mar 2002 04:06:39 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <a7cs6t$hv8$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi as you do it wit paper and pencil SymbolicRe[z_] := (z + (z /. Complex[a_, b_] :> Complex[a, -b]))/2 SymbolicIm[z_] := (z - (z /. Complex[a_, b_] :> Complex[a, -b]))/(2 I) Regards Jens aes wrote: > > OK, so you can use ComplexExpand expand to find the symbolic real and imag > parts of an expression -- e.g. the input > > zComplex = ComplexExpand[ Sin[a+I b], TargetFunctions->{Re,Im}] > > gives as output > > Cosh[b] Sin[a] + I Cos[a] Sinh[b] > > as desired. But now, how do I get Mathematica to peel out the symbolically real and > imaginary parts of this? -- that is, what inputs > > zR = ??? > > zI = ??? > > will give as outputs > > Cosh[b] Sin[a] > > and > > Cos[a] Sinh[b] > > (Maybe an example in the ComplexExpand Help file would be helpful?)