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

MathGroup Archive 2008

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

Search the Archive

Re: notation using # with exponents and &

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92940] Re: notation using # with exponents and &
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Mon, 20 Oct 2008 07:35:26 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <gdevcc$3mp$1@smc.vnet.net>

Molly Lipscomb wrote:

> When I ask Mathematica to solve one of my equations, at first it says that the response is long, and asks whether I want the full output, or the output with a size limit.  When I say that I want the full output it comes up with seven roots, each of which has a polynomial which is pages long.  At the end of each root, it has a notation which I haven't seen before and can't find in any documentation--it has a box that looks something like a # sign, 1 with an exponent, and then an & sign, a comma, and then a number.  Is this an abbreviation for something?  Does it mean that I don't have the full solution listed?  
> 
> Also, I have been trying to get Mathematica to factor or simplify the solution, but when I enter Factor[%], it just repeats the same solution.  Does this mean that the solution just can't be simplified, or is there an alternative way to do this?

What you see is a root object (or more likely a list of replacement 
rules that contain root objects, see the example below) [1]. A root 
object is an exact symbolic representation of a specific root and 
usually occurs when Mathematica does not know any simpler *exact* 
representations.

A root object is of the form Root[some_pure_function, root_index], where 
  root_index is an ordinal number used to access a specific root, and 
some_pure_function (or anonymous function) represents a polynomial.

A pure function (or anonymous function in some other programming 
languages) is an expression with head *Function* [3, 4], a shortcut is 
to end the expression by a & sign and using *Slot* [2] in place of dummy 
variable names. For instance, Function[{x}, x^2] or #^2& are equivalent 
pure functions.

It is very unlikely that you can simplify the root object itself. 
However, you can easily get an *approximation* of the numeric value by 
using the function *N* [5].

     In[1]:= Solve[x^5 + 2 x + 1 == 0, x]

     Out[1]= {{x -> Root[1 + 2 #1 + #1^5 &, 1]},
              {x -> Root[1 + 2 #1 + #1^5 &, 2]},
              {x -> Root[1 + 2 #1 + #1^5 &, 3]},
              {x -> Root[1 + 2 #1 + #1^5 &, 4]},
              {x -> Root[1 + 2 #1 + #1^5 &, 5]}}


     In[2]:= %//N

     Out[2]= {{x -> -0.486389},
              {x -> -0.701874 - 0.879697 I},
              {x -> -0.701874 + 0.879697 I},
              {x -> 0.945068 - 0.854518 I},
              {x -> 0.945068 + 0.854518 I}}

Hope this helps,
- Jean-Marc

[1] "Root"
http://reference.wolfram.com/mathematica/ref/Root.html

[2] "Slot (#)"
http://reference.wolfram.com/mathematica/ref/Slot.html

[3] "Function (&)"
http://reference.wolfram.com/mathematica/ref/Function.html

[4] "Pure Functions"
http://reference.wolfram.com/mathematica/tutorial/PureFunctions.html


  • Prev by Date: RE: Re: Dynamic problem (possibly simple)
  • Next by Date: Re: Re: Import["http://.."] wackiness.... ?
  • Previous by thread: Re: notation using # with exponents and &
  • Next by thread: Re: notation using # with exponents and &