Question 289780
To find extrema, take the derivative and set it equal to zero.
{{{f(x)=x-2*cos(x)}}}
{{{df/dx=1-2*(-sin(x))=1+2*sin(x)=0}}}
{{{1+2*sin(x)=0}}}
{{{2*sin(x)=-1}}}
{{{sin(x)=-1/2}}}
{{{ graph( 300, 200, -7, 1, -10, 2, x-2*cos(x)) }}} 
.
.
.
{{{sin(x)=-1/2}}}
{{{x=-pi/6}}} and {{{x=-5pi/6}}} 
From the graph, the maximum occurs at {{{x=-5pi/6}}},
{{{f(x)=-5pi/6-2*cos(-5pi/6)}}}
{{{f(x)=-5pi/6-2*(-sqrt(3)/2)}}}
{{{f(x)=-5pi/6+sqrt(3))}}} or approximately
{{{fmin=-0.886}}}
.
.
.
As you can see from the graph, solving for x only gives you the relative minimum and not the absolute minimum.
The absolute minimum occur at the endpoints.
{{{fmin=f(-2*pi)=-2*pi-2*cos(2*pi)=-2*pi-2=-8.28}}}