일반수학및실습2-12.6절

2163 days 전, jhlee2chn 작성

예.

var('x, y') a=vector([4, 3]);u=a/a.norm() f(x, y)=4*x^2-x*y+3*y^2 gradf=f.gradient() u.inner_product(gradf(2, -1)) 
       
44/5
44/5

예제 5.

var('x, y') f(x, y)=x^2/4+y^2 p1=contour_plot(f, (x, -3, 3), (y, -3, 3), fill=False, cmap='hsv') p2=plot_vector_field(f.gradient(), (x, -3, 3), (y, -3, 3), color='black') show(p1+p2)