Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10176
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Finding the real part of a symbolic complex expression |
| Date | 2012-05-21 10:00 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jpd3n8$eda$1@smc.vnet.net> (permalink) |
| References | <201205200635.CAA04268@smc.vnet.net> |
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@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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Finding the real part of a symbolic complex expression Murray Eisenberg <murray@math.umass.edu> - 2012-05-21 10:00 +0000
csiph-web