y=x²+1/2ax+1/2y=(x+1/4a)²+1/2-1/16a²(1)a<0∴-1/4a>0∵开口向上∴f(x)max=f(-1)=3/2-1/2a(2)a>0∴-1/4a<0∵开口向上∴f(x)max=f(1)=3/2+1/2a(3)a=0∴f(x)max=f(1)=f(-1)=3/2