f(1-cosx)=sin^2x
=1-cos^2x
=(1-cosx)(1+cosx)
=-(1-cosx)(1-cosx-2)
=-(1-cosx)^2+2(1-cosx)
故f(x)的解析式为
f(x)=-x^2+2x