Re: more than 1 function with Plot3D
- To: mathgroup at smc.vnet.net
- Subject: [mg50630] Re: more than 1 function with Plot3D
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 15 Sep 2004 01:49:23 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <ci3edp$e2f$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
constr = {20 == 2x1 + x2,
60 == 2x2 + x2,
800 == (x1 + 20)*x2};
sol = Solve[#, x2][[1]] & /@ constr;
obj = (x1 + 20)x2;
grobj = Plot3D[Evaluate[obj], {x1, 0, 30}, {x2, 0, 30},
AxesLabel -> {"x1", "x2", "Nutzen"},DisplayFunction -> Identity]
grlst = ParametricPlot3D[{x1, x2, (x1 + 20)x2 + 1} /. #, {x1, 0, 30},
DisplayFunction -> Identity] & /@ sol;
Show[grobj, Sequence @@ grlst, DisplayFunction -> $DisplayFunction]
??
Regards
Jens
Ron wrote:
>
> Hi,
> I would like to plot the functions
>
> u(x1,x2) = (x1+20)*x2 (main function) ->Nutzenfunktion
>
> 20 = 2x1 + x2 ->Budgetgeraden
> 60 = 2x2 + x2 ->Budgetgeraden
>
> 800 = (x1+20)*x2 -> Indifferenzkurve
>
> (Volkswirtschaftslehre VWL)
>
> Is it somehow possible, I'd like to have all functions in one graph.
>
> So far:
> Plot3D[(a + 20)b, {a, 0, 30}, {b, 0, 30}, AxesLabel -> {"x1", "x2",
> "Nutzen"}]
>
> THX