var('x,y') f(x,y) = x^4+y^4-4*x*y+1 C= contour_plot(f, (x,-3,3), (y,-3, 3),cmap='hot',contours = 20,linestyles='solid', fill=False, colorbar=True) show(C)
df = f.gradient() df(x,y)
f.hessian()(x,y)
P1 = (1,1) B1 = (3,0) B2=(3,3^(1/3)) B3 = (3,2) B4=(2^(1/3),2) B5 = (0,2) B6 = (0,0) ListePoints = [P1,B1,B2,B3,B4,B5,B6] ListePoints [f(P[0],P[1]) for P in ListePoints] # Les valeurs exactes [f(P[0],P[1]).n(digits = 4) for P in ListePoints] # Une aprox décimale
C1= contour_plot(f, (x,0,3), (y,0, 2),cmap='hot',contours = 20,linestyles='solid', fill=True, colorbar=True) C1.show()
cmsel = [colormaps['hot'](i) for i in sxrange(0,1,0.05)] S = plot3d(f(x,y),(x,0,3),(y,0,2), adaptive = True, color = cmsel) S.show(frame_aspect_ratio = [40,40,1])