Find the maximum and minimum of function f (x) = √ 3cos & sup2; X + sinxcosx

Find the maximum and minimum of function f (x) = √ 3cos & sup2; X + sinxcosx

f(x)=√3cos²x+sinxcosx
=√3/2*(cos2x+1)+1/2(sin2x)
=1/2sin2x+√3/2cos2x+√3/2
=sin(2x+π/3)+√3/2
When 2x + π / 3 = 2K π + π / 2, K ∈ Z, the maximum value is 1 + √ 3 / 2;
When 2x + π / 3 = 2K π - π / 2, K ∈ Z, take the maximum value √ 3 / 2-1