Re: Finding real part (newbie question)
- To: mathgroup at smc.vnet.net
- Subject: [mg15767] Re: Finding real part (newbie question)
- From: Count Dracula <lk3a at sparc20-3.unixlab.virginia.edu>
- Date: Sun, 7 Feb 1999 02:03:49 -0500 (EST)
- Organization: University of Virginia
- Sender: owner-wri-mathgroup at wolfram.com
Gnalle <GNALLE at MMF.ruc.dk> writes: > 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)) Try using ComplexExpand or use the standard package Algebra`ReIm.m. With the definition RealPart[expr_] := (Cases[expr, z_Symbol :> (z /: Im[z] = 0) , Infinity]; Simplify[Re[expr]]) and expr = 1/(a + I b + 1/(c + I d)), RealPart[expr] gives 2 2 c + a c + a d ----------------------------------------------- 2 2 2 2 2 2 1 + 2 a c - 2 b d + a (c + d ) + b (c + d ) -- _________________________________________________________________________ Levent Kitis lk3a at esmeralda.mech.virginia.edu University of Virginia Department of Mechanical and Aerospace Engineering _________________________________________________________________________