y=cos^2x+sinx-1
=1-sin²x+sinx-1
=-(sin²x-sinx+1/4)+1/4
=-(sinx-1/2)²+1/4
∵-1≤sinx≤1
∴当sinx=1/2时,ymax=1/4
当sinx=-1时,ymin=-2
∴函数的值域为[-2,1/4]
y=cos^2x+sinx-1
=1-sin²x+sinx-1
=-(sin²x-sinx+1/4)+1/4
=-(sinx-1/2)²+1/4
∵-1≤sinx≤1
∴当sinx=1/2时,ymax=1/4
当sinx=-1时,ymin=-2
∴函数的值域为[-2,1/4]