MathGroup Archive 2008

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

Search the Archive

Re: Simple Q: How to give computed results from NSolve to a new

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87266] Re: Simple Q: How to give computed results from NSolve to a new
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 6 Apr 2008 06:41:42 -0400 (EDT)

On 4/5/08 at 4:22 AM, loveinla at gmail.com wrote:

>I am new to Mathematica. And I just have a simple question for you:

>I have solved a system of equations by NSolve. And for instance, it
>returns the results as Root={{x->1,y->2}}.

You will find that it is good practice not to use upper case
characters as the first character in your variable names. This
ensures there will not be conflicts with built in symbols since
Mathematica always uses an upper case character for the first
character of symbol names.

>And now I want to use the computed results, say x & y to define a
>new variable Z=x^2+sqrt(xy).

Did you mean x^2+Sqrt[x y] here?

>How should I use computed x and y to define the new variable Z?

z = x^2+Sqrt[x y]/.root

will do what you want.


  • Prev by Date: Interpretation with If
  • Next by Date: Re: Re: solving a system of polynomial equations
  • Previous by thread: Simple Q: How to give computed results from NSolve to a new
  • Next by thread: Re: Simple Q: How to give computed results from NSolve to a new