f'(x)=0=(sin(x)-1)(2cos(x)+1) when sin(x)=1 or cos(x)=-½.
sin(x)=1 when x=π/2+2πn where n is an integer.
cos(x)=-½ when x=⅔π+2πn or 4π/3+2πn. For given range, n=0.
f'(x)=sin(2x)+sin(x)-2cos(x)-1,
f"(x)=2cos(2x)+cos(x)+2sin(x)=0 at extrema of f'(x) (note: not the extrema of f(x)).
f"(x)=2(1-2sin2(x))+cos(x)+2sin(x)=0,
f"(x)=2-4sin2(x)+cos(x)+2sin(x)=0.
cos(x)=4sin2(x)-2sin(x)-2=2(2sin2(x)-sin(x)-1)=2(2sin(x)+1)(sin(x)-1).
The solution of this trig equation is possible but not easy, and this gives me reason to believe that it's the extrema and behaviour of f(x) which are required, not those of its derivative. We already have the values of x for the extrema of f(x). These are x=½π, ⅔π and 4π/3 in the range 0-2π.
It makes sense now to look at the behaviour of f(x) (rather than that of f'(x)) near the extrema of f(x).
When x<½π, sin(x)<1, so sin(x)-1<0, and cos(x)>0, so 2cos(x)+1>0, therefore (sin(x)-1)(2cos(x)+1)<0.
This means the gradient is negative (decreasing) when x<½π. sin(x) never exceeds 1 so sin(x)-1 is always negative. The next critical point is x=⅔π, when cos(x)=-½ and 2cos(x)+1=0. As x increases from further towards x=π, cos(x) goes from -½ to -1.
Take a point between x=½π and ⅔π, sin(x)+1<0, but 2cos(x)+1>0 so the gradient is negative, suggesting that at x=½π we had a point of inflection. At ⅔π, the gradient is zero again. After x=⅔π, 2cos(x)+1<0, therefore (sin(x)-1)(2cos(x)+1) is the product of two negative quantities, the gradient is positive and f(x) is increasing. At x=⅔π there is a minimum.
At x=π, sin(x)=0 and cos(x)=-1 so (sin(x)-1)(2cos(x)+1)=(-1)(-1)=1, still increasing.
The last critical point in the range is x=4π/3 when sin(x)-1<0 and 2cos(x)+1=0 at another extremum. When x<4π/3 (for example, x=π) 2cos(x)+1<0, so f(x) is increasing towards the extremum, suggesting a maximum.
Beyond 4π/3 (for example, x=3π/2), 2cos(x)+1>0 and f'(x) is decreasing since (sin(x)-1)(2cos(x)+1)<0, making x=4π/3 a maximum.
SUMMARY
We are considering the behaviour of the primary f(x), not its derivative f'(x) with the given equation.
There are 3 critical points in the given interval: A: x=½π, B: ⅔π and C: 4π/3.
A is a point of inflection since f(x) is decreasing to that point and continues to decrease after it to the minimum at B, increasing to the maximum at C then decreasing.