RE: Real coefficients in complex numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg15777] RE: [mg15734] Real coefficients in complex numbers
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Sun, 7 Feb 1999 02:03:54 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Niels Langager Ellegaard wrote: _________________________ If you are calculations with complex numbers: a + I b How do you state that a and b are real? For example I might want to calculate the real part of a + 1/(b + 1/(1/I c + d)) ; Where a,b,c,d are real Can this be done in a nice way. (Yes, I do know how to do the calculation by hand) ________________________ Use ComplexExpand. In[1]:= ?ComplexExpand "ComplexExpand[expr] expands expr assuming that all variables are real. ComplexExpand[expr, {x1, x2, ... }] expands expr assuming that variables matching any of the xi are complex." In[2]:= Re[a + 1/(b + 1/(1/I c + d))]//ComplexExpand (* Output not shown *) Regards, Ted Ersek