Limiting range of variables when defining funxtions of several variables
- To: mathgroup at smc.vnet.net
- Subject: [mg74676] Limiting range of variables when defining funxtions of several variables
- From: Michelasso <qzerty at gmail.com>
- Date: Sat, 31 Mar 2007 01:27:45 -0500 (EST)
Hello everybody,
my problem is that I would like to plot a 3d graphic of a function of
two variables, restricted to domain D={(x,y): x>= 0, y>=0, y <= 1-x}.
I thought to define the function in this way:
test[x_,y_/; y <= 1-x]:= x+y
but this seems not to work, while it works for functions of one
variable, i.e.:
test2[x_/; x<= 1]:= 3x
So, am I doing some syntax error, or is there some other kind of
problems with my definition?