f(x)=cos^2x-sin^x+2sinxcosx
= cos2x+sin2x
= √2(sinπ/4cos2x+cosπ/4sin2x)
= √2sin(2x+π/4)
函数最小正周期 = 2π/2 = π
x∈【0,π/2】
2x∈【0,π】
2x+π/4∈【π/4,5π/4】
2x+π/4∈【π/4,π/2】时单调增
2x+π/4∈【π/2,5π/4】时单调减
2x+π/4=π/2时最大值f(x)max = √2
2x+π/4=5π/4时最小值f(x)min = √2*-√2/2 = -1