方法1:
y=-x-1;
(x-1)^2+(-x-2)^2
=x^2-2x+1+x^2+4x+4
=2x^2+2x+5
=2(x+1/2)^2+9/2;
最小值为9/2,x=-1/2
方法2:
令(x-1)^2+(y-1)^2=r^2;
为圆,
取最小值时,即与直线x+y+1=0相切;
原点(1,1)
到直线x+y+1=0的距离为r
=|1+1+1|/根号2
=3/根号2
r^2=9/2
最小值为9/2,x=-1/2
方法一:
x+y+1=0
==>y=-1-x
(x-1)^2+(y-1)^2
=(x-1)^2+(-1-x-1)^2
=(x-1)^2+(x+2)^2
=2x^2+2x+5
=2(x+1/2)^2+9/4
>=9/2 (当x=-1/2时取等号)
所以根号下(x-1)^2+(y-1)^2>=根号下9/4
根号下(x-1)^2+(y-1)^2>=3/2
方法二:
根据a^2+b^2>=2ab
所以(x-1)^2+(y-1)^2>=2(x-1)(y-1) (当x-1=y-1时即x=y时取等号)
又x+y+1=0故x=y=-1/2,此时2(x-1)(y-1)=2*(-1/2-1)(-1/2-1)=3/2