f(x)=2cosx*sin(x+π/3)-√3sin²x+sinxcosx
=[sin(2x+π/3)+sin(π/3)]-[(√3/2)*(2sin²x-1)+√3/2]+(1/2)*sin2x
=sin(2x+π/3)+[sin(π/3)-√3/2]-(√3/2)*(-cos2x)+(1/2)*sin2x
=sin(2x+π/3)+(√3/2)*cos2x+(1/2)*sin2x
=2sin(2x+π/3)
当2x+π/3=kπ+π/2(k∈z),即x=kπ/2+π/12时(k∈z),f(x)有最大值,最大值为2
当2x+π/3=kπ-π/2(k∈z),即x=kπ/2-5π/12时(k∈z),f(x)有最小值,最小值为-2