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

MathGroup Archive 2008

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87261] Re: [mg87240] Simple Q: How to give computed results from NSolve to
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 6 Apr 2008 06:40:46 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Select (highlight) the -> and hit F1 key

soln = {{x -> 1, y -> 2}};

z = x^2 + Sqrt[x*y] /. soln[[1]]

1 + Sqrt[2]


Bob Hanlon

---- "loveinla at gmail.com" <loveinla at gmail.com> wrote: 
> Hi, guys,
> 
> 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}}.
> 
> And now I want to use the computed results, say x & y to define a new variable 
> Z=x^2+sqrt(xy).
> 
> How should I use computed x and y to define the new variable Z?
> 
> Thanks in advance.
> 



  • Prev by Date: A problem with solving some nonlinear system
  • Next by Date: Re: Inconsistent behavior?
  • Previous by thread: Re: A problem with solving some nonlinear system
  • Next by thread: Interpretation with If