Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: ComplexExpand confusion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60148] Re: ComplexExpand confusion
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sun, 4 Sep 2005 03:02:15 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, U.K.
  • References: <dfbejf$im2$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

mike_in_england2000 at yahoo.co.uk wrote:
> Hi
> 
> The Mathematica help system says that
> 
> "ComplexExpand[expr] expands expr assuming that all variables are
> real."
> 
> which is fine and explains why expressions such as
> ComplexExpand[Conjugate[x +I y]] work.All seems obvious so far.
> 
> What is confusing me though is why does
> 
> ComplexExpand[(-1)^(1/4)]
> 
> give the result
> 
> (1 + I)/Sqrt[2]
> 
> I know this the correct result but in the expression (-1)^(1/4) there
> are no variables.  The numbers involved are real so what on earth is
> ComplexExpand doing? Is this a stupid question? Should I have drank
> more coffee before posting this.
> 
> Thanks
> Mike
> 
???
Hi Mike,

I guess that the problem is about what the term ?variables? means. In 
Mathematica, the notion of variable is broader than in mathematics and 
in computer sciences: a variable can hold a value (x = 12 for example, 
CS meaning), can be a variable within a function (f(x):=12, a constant 
function), but it can be any expression that return a value (similar 
concept in LISP/Scheme family of languages)  (f(g(x)) for instance, g(x) 
is a ?variable?, as well as x and f). So here you can think of 
(-1)^(1/4) as a ?constant? variable/function that returns its own value.

Best regards,
/J.M.


  • Prev by Date: Re: Please explain this weird Integrate result
  • Next by Date: Re: Timing loop For !!
  • Previous by thread: Re: Re: ComplexExpand confusion
  • Next by thread: scaling of ndsolve to large systems