MathGroup Archive 2008

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

Search the Archive

Re: Problem with replacement rules


Hi,

makeFunction[expr_, x_] := Module[{var},
   var = Complement[Variables[expr], {x}];
   Function @@ {var, x /. Solve[expr == 0, x][[1]]}
   ]

and

f = makeFunction[2 + x - y^2, x];

Plot[f[z], {z, -2, 2}]

??

Regards
   Jens

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?
> Thank you very much for your help. Best regards, Laurent
> 


  • Prev by Date: Re: How can I get list form like this
  • Next by Date: Text-based interface: Editing line input
  • Previous by thread: Re: Problem with replacement rules
  • Next by thread: Re: Problem with replacement rules