(1)用a表示f(a)的表达式;
(2)求能使f(a)=的a值,并求当a取此值时f(x)的最大值.
解:(1)f(x)=1-2a-2acosx-2sin2x
=1-2a-2acosx-2+2cos2x
=2(cosx-
①当
②当-1≤
③当
综上得
f(a)=
(2)若f(a)=
∴-