(1)
OA.OB=2cos²x+√3sin2x+a
=(1+cos2x)+√3sin2x+a
=√3sin2x+cos2x+a+1
=2sin(2x+π/6)+a+1
即 f(x)=2sin(2x+π/6)+a+1
(2)
f(x)的最大值是2+a+1=2
∴ a=-1
(1)
OA.OB=2cos²x+√3sin2x+a
=(1+cos2x)+√3sin2x+a
=√3sin2x+cos2x+a+1
=2sin(2x+π/6)+a+1
即 f(x)=2sin(2x+π/6)+a+1
(2)
f(x)的最大值是2+a+1=2
∴ a=-1