换元法.
令t=sinx
∵ x∈[-π/4,π/4]
∴ t∈[-√2/2,√2/2]
y=cos²x+sinx
=1-sin²x+sinx
=-t²+t+1
=-(t-1/2)²+5/4
是二次函数,图像开口向下,对称轴是t=1/2
∴ t=1/2时,y有最大值5/4
t=-√2/2时,y有最小值-1/2-√2/2+1=1/2-√2/2
换元法.
令t=sinx
∵ x∈[-π/4,π/4]
∴ t∈[-√2/2,√2/2]
y=cos²x+sinx
=1-sin²x+sinx
=-t²+t+1
=-(t-1/2)²+5/4
是二次函数,图像开口向下,对称轴是t=1/2
∴ t=1/2时,y有最大值5/4
t=-√2/2时,y有最小值-1/2-√2/2+1=1/2-√2/2