MathGroup Archive 2007

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

Search the Archive

Re: how to plot a 2-parametric output from Solve with Plot3D

Hi Ted,

Try this approach:

eqns = {b x == 2 y^2 + x , y == 2 x /a};
sol = {x, y} /. Solve[eqns, {x, y}];

now you have solution in list "sol" as functions.
You can plot for example second solution for x as:

(Plot3D[#, {a, -1, 1}, {b, -1, 1}] &)@sol[[2, 1]];

If you want to define output of Solve as new function of variables a,b  you
can use this:

solfce[c_, d_] := (sol /. {a -> c, b -> d})

solfce[1, 2]
{{0, 0}, {1/8, 1/4}}

I hope, that it would help you.

Best regard,

Josef Otta

2007/1/4, T.Sariyski <tsariysk at>:
> Hi,
> I have an output from a Solve that returns a solution as a list of
> rules. Each branch of the solution is a two-parametric function e.g.
> {{ x -> Something(a,b),  y->Something(a,b)},...
> I want to plot a specific branch of the solution with Plot3D as a
> function of {a,b}. I tried to assign a solution branch to a function
> sol11[a,b]
> sol11[a_,b_]=%[[1,1]]
> and to plot sol11 but it doesn't work. How can I access a parametric
> solution as returned from Solve as  a function of it's parameters?
> Thanks, Ted

  • Prev by Date: Re: Orderless attribute for named functions and function arguments
  • Next by Date: Re: [TS 270]--Re:Re: [TS 48]--Re:why isn't Rational[1,2] (apparently) atomic until it is evaluated?
  • Previous by thread: how to plot a 2-parametric output from Solve with Plot3D
  • Next by thread: Re: Multiple streams in Write