SharedSecond derivative test.ipynbOpen in CoCalc
Author: Samuel Watson
Views : 35
In [1]:
%display latex # make math display nice
In [2]:
var("x y") # make x and y symbols f = (2*x^2 + 3*y^2)*exp(-x^2-y^2) # define f D = 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 factor D2
32x6128x4y2168x2y472y6+128x4+328x2y2+228y4136x2156y2+24-32 \, x^{6} - 128 \, x^{4} y^{2} - 168 \, x^{2} y^{4} - 72 \, y^{6} + 128 \, x^{4} + 328 \, x^{2} y^{2} + 228 \, y^{4} - 136 \, x^{2} - 156 \, y^{2} + 24
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))]
[24,16,16,24,24]\left[24, -16, -16, 24, 24\right]
In [ ]: