(I)
f(x)=(cosx)^2-√3sinxcosx+2(sinx)^2-1/2
= (sinx)^2 -(√3/2)sin(2x) +1/2
= (1-cos2x)/2 - (√3/2)sin(2x) +1/2
= -[ sin(2x)cos(π/6)+ cos(2x)sin(π/6)] + 3/2
= -sin(2x+π/6) + 3/2
最小正周期= π
x∈[0,π/2]
max f(x) = f(π/2)
= sin(π/6)+3/2
= 2
min f(x) = -1+3/2=1/2
range = [1/2,2]