x+2y=4x=4-2y 代入方程得f(4-2y,y)=(4-2y)^2+y^2+y(4-2y) =16-16y+4y^2+y^2+4y-2y^2 =3y^2-12y+16 =3(y^2-4y)+16 =3(y^2-4y+4)+16-12 =3(y-2)^2+4 当y=2 x=4-2y=0时有极值 f(x,y)=4