(1)f(x)=cos2x-4acosx-4a+1
=2cos^2x-1-4acosx-4a+1
=2(cosx-a)^2-2a^2-4a
因为-1≤cosx≤1,
所以,当a1时,cosx=1时,g(a)=2-8a.
(2)当a