已知函数f(x)=-2asin(2x+π6)+a+b的定义域为[0,π2],值域为[-5,4].求常数a,b的值.

问题描述:

已知函数f(x)=-2asin(2x+

π
6
)+a+b的定义域为[0,
π
2
],值域为[-5,4].求常数a,b的值.

∵0≤x≤

π
2
,∴
π
6
≤2x+
π
6
6

∴-
1
2
≤sin(2x+
π
6
)≤1.
①当a>0时,-2asin(2x+
π
6
)∈[-2a,a],得-2asin(2x+
π
6
)+a+b∈[b-a,2a+b]
b−a=−5
2a+b=4
,解之得a=3,b=-2;
②当a<0时,-2asin(2x+
π
6
)∈[a,-2a],得-2asin(2x+
π
6
)+a+b∈[2a+b,b-a]
2a+b=−5
b−a=4
,解之得a=-3,b=1
综上所述,可得a=3,b=-2或a=-3,b=1.