var("x y")# make x and y symbolsf=(2*x^2+3*y^2)*exp(-x^2-y^2)# define fD=diff(f,x,2)*diff(f,y,2)-diff(f,x,y)^2# define D for the second derivative test
In [3]:
D2=expand(D*e^(2*x^2+2*y^2))# simplify D and clear out the exponential factorD2
In [37]:
# inspect values at critical points[D2(x=a,y=b)for(a,b)in((0,0),(1,0),(-1,0),(0,1),(0,-1))]