=
2cos? x- 1-2sinxcosx+2
=cos2x-sin2x+2
=√2cos(2x+π/4)+2
Therefore, the maximum value of f(x) is √2+2, and the minimum positive period is T=2π/2=π.
I hope I can help you. Please adopt it in time if you are satisfied.