Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: declaring variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4767] Re: declaring variables
  • From: Dr Stephen P Luttrell <luttrell at signal.dra.hmg.gb>
  • Date: Fri, 13 Sep 1996 13:54:51 -0400
  • Organization: Defence Research Agency
  • Sender: owner-wri-mathgroup at wolfram.com

Burkhardt Goedde wrote:
> 
> Dear math users,
> just a simple problem, but I got no answer from thew book.
> 
> Re[x + I y] gives
> 
> Re[x + I y]
> 
> whereas
> 
> Re[2 + 3 I]
> 
> gives 2
> 
> How could I tell Mathematica that x and y are real numbers?
> 

Try this:

ClearAll[x,y];
r = Re[x + I y]
ComplexExpand[r]

which produces the output:

Re[x + I y]
x

-- 
Dr Stephen P Luttrell                  luttrell at signal.dra.hmg.gb
Adaptive Systems Theory                01684-894046 (phone)
Room EX21, Defence Research Agency     01684-894384 (fax)           
Malvern, Worcs, WR14 3PS, U.K.         http://www.dra.hmg.gb/cis5pip/Welcome.html

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: int'l mathematica symp. '97
  • Next by Date: Re: declaring variables
  • Previous by thread: declaring variables
  • Next by thread: Re: declaring variables