What is the maximum value of the function f (x) = cosx ^ 3 + SiNx ^ 2-cosx on [0, π]

What is the maximum value of the function f (x) = cosx ^ 3 + SiNx ^ 2-cosx on [0, π]

f(x)=cosx(cos^2 x-1)+sin^2 x=sin^2 x-cosx*sin^2 x=sin^2 x(1-cosx)
When x = π / 2, the former is the maximum and the latter is also the maximum, so the maximum is f (π / 2) = 1