Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Real coefficients in complex numbers

  • To: mathgroup at
  • Subject: [mg15777] RE: [mg15734] Real coefficients in complex numbers
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Sun, 7 Feb 1999 02:03:54 -0500 (EST)
  • Sender: owner-wri-mathgroup at

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.

"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."

Re[a + 1/(b + 1/(1/I c + d))]//ComplexExpand

(* Output not shown *)

Ted Ersek

  • Prev by Date: Re: Q: how to list vertices of the Geodesate[] of a polyhedron?
  • Next by Date: NDSolve problem
  • Previous by thread: Real coefficients in complex numbers
  • Next by thread: Re: Real coefficients in complex numbers