a^2-2ab+2b^2+4a+8=0
(1/2a^2+4a+8)+(1/2a^2-2ab+2b^2)=0
1/2(a^2+8a+16)+1/2(a^2-4ab+4b^2)=0
1/2(a+4)^2+1/2(a-2b)^2=0
则a+4=0,a-2b=0
a=-4,b=-2
a^2-2ab+2b^2+4a+8=0
(1/2a^2+4a+8)+(1/2a^2-2ab+2b^2)=0
1/2(a^2+8a+16)+1/2(a^2-4ab+4b^2)=0
1/2(a+4)^2+1/2(a-2b)^2=0
则a+4=0,a-2b=0
a=-4,b=-2