1,
f(x)=acosx(cosx+sinx)+b
=acos²x+asinxcosx+b
=a(1+cos2x)/2+asin2x /2+b
=a/2+b+1/√2 *acos(2x-π/4)
a>0,则f(x)的单调递增区间
-π+2kπ≤2x-π/4≤2kπ
-3π/8+kπ≤x≤kπ+π/8 ;
2,x∈[ 0,π/2 ] ,2x-π/4∈[-π/4,3π/4]
所以cos(2x-π/4)=1时,f(x)取到最大值 a/2+b+√2a /2=4,
cos(2x-π/4)=-√2 /2时,f(x)取到最小值 a/2+b-a/2=3,
所以 b=3,a=2√2 -2.