How to define a Function in Maxima



On Tue, 2010-05-04 at 00:27 +0530, Swaprava Nath wrote:
> Hi all,
> 
> I'm very new to Maxima, and hence quite lost in so many function
> declarations. I want to define a function as the following and want to
> plot it:
> 
> f(x,y) = x*y/(x^2+y), if (y != -x^2) and 0 otherwise
> 
> How to put it in Maxima? Thanks in advance ...

f(x,y) := if (y # -x^2) then x*y/(x^2+y) else 0;
plot3d(f(x,y), [x,-3,3], [y,-5,0], [z,-50,50], [grid,50,50]);

Adjust the parameters until you get something that you like.
I hope your version of Maxima is not too old, because that plot3d
will only look nice in the last two versions 5.20 or 5.21.
Regards,
Jaime Villate