Consider the function $f(x)=x-\sin(x)$. I want to find the critical points of $f(x)$ on $[0,2\pi]$. Since $f'(x)=1-\cos(x)$ then the equations $f'(x)=0$ for $x\in [0,2\pi]$ gives two solutions $x_1=0$ and $x_2=2\pi$. My question is about considering $x_1=0$ and $x_2=2\pi$ as critical points.
The definition from Paul Dawkins's Calculus 1 is not specific about considering endpoints as critical points even if the derivative is zero at the endpoint:
We say that $x=c$ is a critical point of the function $f(x)$ if $f (c)$ exists and if either of the following are true : $f'(c)=0$ or $f'(c)$ doesn't exist.
So as you see the author does not specify if $c$ must be an interior point or if it can be an endpoint of a closed interval like the example we have here.
I'm confused because he added later:
There is no reason to expect end points of intervals to be critical points of any kind. Therefore, we do not allow relative extrema to exist at the endpoints of intervals.