Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Finding the real part of a symbolic complex expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126589] Re: Finding the real part of a symbolic complex expression
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 21 May 2012 05:58:58 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201205200635.CAA04268@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

As you discovered, the way to handle this is with ComplexExpand:

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

a c - b d

Clearly the function Re does not recognize such an Assuming expression. 
What one might expect is that the following would work:

   Simplify[Re[(a + I b) (c + I d)], Element[{a, b, c, d}, Reals]]

Alas, it simply doesn't. However, the following does:

   Simplify[Re[Expand[(a + I b) (c + I d)]],
       Element[{a, b, c, d}, Reals]]


On 5/20/12 2:35 AM, Jacare Omoplata wrote:
> I wanted to find the real part of (a + I b)(c + I d) , assuming a,b,c and d are real, "I" being Sqrt[-1].
>
> So I tried,
>
> Re[(a + I b) (c + I d)] /. Assuming ->  Element[{a, b, c, d}, Reals]
>
> Nothing happens. What I get for output is,
>
> Re[(a+I b) (c+I d)]
>
> I found out that I can use the function "ComplexExpand" to expand the expression assuming a,b,c and d to be real. But I'm curious to know if there a way to make Mathematica use "Re" to find the real part?
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: help with layman terms algorithm development?
  • Next by Date: Re: clearing a variable with a dummy subscript
  • Previous by thread: Re: Finding the real part of a symbolic complex expression
  • Next by thread: Re: Finding the real part of a symbolic complex expression