222 - Topic 10 - Work for standard extrema

3204 days ago by Professor222

var('x,y') # f(x,y) = x^3+y^3-6*x^2+9*y^2+12*x+27*y+19 # f(x,y) = (x-1)^2*(y+4)^2 f(x,y) = x^3*y+x+y^2 fx = diff(f,x) fy = diff(f,y) fxx = diff(fx,x) fxy = diff(fx,y) fyy = diff(fy,y) 
       
solns = solve([fx,fy],(x,y),solution_dict=true) for soln in solns: show(soln) 
       

                                
                            

                                
for soln in solns: (soln[x],soln[y]) 
       

                                
                            

                                
x0 = solns[4][x] y0 = solns[4][y] G = plot3d(f,(x,x0-1,x0+1),(y,y0-1,y0+1)) G += point3d((x0,y0,f(x=x0,y=y0)),color='red',size=30) show(G)