y=sin²x+2cosx+5a/8-3/2
=1-cos²x+2cosx+5a/8-3/2
=-cos²x+2cosx+5a/8-1/2
=-(cos²x-2cosx)+5a/8-1/2
=-(cos²x-2cosx+1)+5a/8-1/2+1
=-(cosx-1)²+5a/8+1/2
当cosx=1时,y的值最大
5a/8+1/2=1
5a/8=-1/2
5a/4=-1
a=-4/5
y=sin²x+2cosx+5a/8-3/2
=1-cos²x+2cosx+5a/8-3/2
=-cos²x+2cosx+5a/8-1/2
=-(cos²x-2cosx)+5a/8-1/2
=-(cos²x-2cosx+1)+5a/8-1/2+1
=-(cosx-1)²+5a/8+1/2
当cosx=1时,y的值最大
5a/8+1/2=1
5a/8=-1/2
5a/4=-1
a=-4/5