Re: Problem with replacement rules

*To*: mathgroup at smc.vnet.net*Subject*: [mg91876] Re: Problem with replacement rules*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>*Date*: Thu, 11 Sep 2008 06:15:36 -0400 (EDT)*Organization*: Uni Leipzig*References*: <ga82r6$re7$1@smc.vnet.net>*Reply-to*: kuska at informatik.uni-leipzig.de

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 >