MathGroup Archive 2003

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

Search the Archive

Re: Getting rid of the symbol -> after finding the root

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39347] Re: Getting rid of the symbol -> after finding the root
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 12 Feb 2003 03:52:12 -0500 (EST)
  • References: <b2ahfv$pjr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Naser,
It is not a matter of  "getting rid" of the symbol -> but rather of using
it.

For example.

soln=Solve[{x^2+y^2==4, x+y==0},{x,y}]

        {{x -> -Sqrt[2], y -> Sqrt[2]}, {x -> Sqrt[2], y -> -Sqrt[2]}}

This gives the two solutions for the pair x and y --- that's why we need a
list of lists.
The replacement rule form lets us put the solutions into expressions

x+y^2/.soln

        {2 - Sqrt[2], 2 + Sqrt[2]}

The first number comes from  the first solution, the second one from the
second solution.

If we want to use only the first solution we can get its list of rules out:

firstsoln = soln[[1]]

        {x -> -Sqrt[2], y -> Sqrt[2]}

and use it

x+y^2/.firstsoln

        2 - Sqrt[2]


--
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




"Mostaghel, Naser " <NMostag at UTNet.UToledo.Edu> wrote in message
news:b2ahfv$pjr$1 at smc.vnet.net...
>
> Dear Friends,
> I need to use the root of a simple equation in subsequent operations.
> After extracting the root, it comes in the form ->root.  I have not been
> able to get rid of the symbol -> .
>
> Can someone help?
>
> Thanks,
>
>
> Naser Mostaghel
> Professor, Civil Engineering
> T: (419) 530-8131
> F: (419) 530-8116
> E: nmostag at utnet.utoledo.edu
>
>
>




  • Prev by Date: Re: Limits: Is there something I'm missing Here?
  • Next by Date: RE: Limits: Is there something I'm missing Here?
  • Previous by thread: Re: Getting rid of the symbol -> after finding the root
  • Next by thread: RE: Re: Getting rid of the symbol -> after finding the root