对于函数f(x)=acosx+b,当cosx=1时,f(x)取最大值,即a+b=1 当cosx=-1时,f(x)取最小值,即-a+b=-3解方程a=2,b=-1所以g(x)=-sin(2x+π/3),当2x+π/3=3π/2+2kπ时,g(x)取得最大值1