向量m·n=2(cosx)^2+2√3sinxcosx
=1+cos2x+√3sin2x
=2(cos2x*1/2+sin2x*√3/2)+1
=2sin(2x+π/6)+1,
f(x)=2asin(2x+π/6)+a+b-a
=2asin(2x+π/6)+b
a=1,b=2时,
f(x)=2sin(2x+π/6)+2,
最小值为:-2+2=0,
当x∈[0,π/2]时,
(-1/2)2a+b=-a+b,
1*2a+b=2a+b,
f(x) 对应在-a+b和2a+b之间,
-a+b=2,
2a+b=8,
a=2,b=4.