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

MathGroup Archive 2008

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

Search the Archive

Re: Problem with replacement rules

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91882] Re: Problem with replacement rules
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 11 Sep 2008 06:17:36 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ga82r6$re7$1@smc.vnet.net>

Simula wrote:

> Hello, I have a very simple question but I didn't find an answer in mathematica help.
> I use Solve[expression(x,y),x]. Then, x is obtained as a one-to-one function of y. I want to define the function x(y) using the output of Solve. How should I do?

In[1]:= (* Solve the expression for x and save the result in sol *)
         sol = Solve[a * x + y == 7, x]

         (* Define x as a function of y *)
         x[y_] = x /. sol[[1]]

         (* Use the function *)
         x[10]

Out[1]= {{x -> (7 - y)/a}}

Out[2]= (7 - y)/a

Out[3]= -(3/a)

Regards,
-- Jean-Marc


  • Prev by Date: Text-based interface: Editing line input
  • Next by Date: Re: How to simplify ArcCos[x/Sqrt[x^2+y^2]] to Pi/2-ArcTan[x/Abs[y]]?
  • Previous by thread: Re: Problem with replacement rules
  • Next by thread: Re: Problem with replacement rules