(a-2)²+(b+1)²=0
a-2=0,b+1=0
a=2, b=-1
3a²b+ab²-3a²b+5ab+ab²-4ab+½a²b
=(3-3+½)a²b+(1+1)ab²+(5-4)ab
=½a²b+2ab²+ab
=ab(½a+2b+1)
=2×(-1)×﹙½×2-2+1)
=0
(a-2)²+(b+1)²=0
所以a-2=b+1=0
a=2,b=-1
所以原式=2ab²+ab+½a²b
=4-2-2
=0
根据题意a-2=0 a=2 b+1=0 b=-1
3a²b+ab²-3a²b+5ab+ab²-4ab+½a²b=1/2a²b+2ab²+ab
=ab(1/2a+2b+1)=-2×(1-2+1)=0