Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2001

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

Search the Archive

Re: Output of "Solve" as a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28615] Re: Output of "Solve" as a list
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 2 May 2001 03:37:07 -0400 (EDT)
  • References: <9cldjh$18e@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Doron,

soln=Solve[x^2 == 4,x]

        {{x->-2},{x->2}}

The rule-form of the solution is to enable replacements to be made. For
example:

data= x/.soln

        {-2,2}

data^3

        {-8,8}

Or

data = x^3/.soln

        {-8,8}

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Doron" <dkl2 at zahav.net.il> wrote in message news:9cldjh$18e at smc.vnet.net...
>    Asking for "Solve" command won't give a list , for example:
>
> In[23]:=
> data = Solve[x\^2 == 4, x]
> Out[23]=
> {{x -> -2}, {x -> 2}}
>
> But if I want to use the output , for example :
>
> In[24]:=
> data^3
> Out[24]=
> (  ( x -> (-2) }^3, ( (x -> {2) }^3  } .
>
> the software dosen't consider x-> ... , as a number ,
> but literally as "x->..." , so when asking data^3 it gives
> (x->...)^3 .
>
> Can anyone help me ? , thank you .
>




  • Prev by Date: Re: Executing a list of functions
  • Next by Date: RE: ToString on object
  • Previous by thread: Re: Output of "Solve" as a list
  • Next by thread: Re: Output of "Solve" as a list