Re: Finding real part (newbie question)
- To: mathgroup at smc.vnet.net
- Subject: [mg15825] Re: Finding real part (newbie question)
- From: phbrf at t-online.de (Peter Breitfeld)
- Date: Fri, 12 Feb 1999 18:39:46 -0500 (EST)
- Organization: das ist ein breites Feld ...
- References: <79e8lo$9du@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Gnalle <GNALLE at MMF.ruc.dk> schrieb: > 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. Try this: z=1/(a + I b + 1/(c + I d) this gives the real-part: In[1]= z1=ComplexExpand[z,TargetFunctions->{Re,Im}]//.Complex[0,_]->0 //Simplify Out[1]= c + a c^2 + a d^2 -------------------------------------------------- 1 + 2 a c - 2 b d + a^2(c^2 + d^2) + b^2(c^2 + d^2) The imaginary part is then z-z1. es gruesst Peter -- =--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--= Peter Breitfeld, Saulgau, Germany (PGP public key: 08548045)