由f'(x)=1-2cosx=0,得极值点:x=π/3,5π/3
f(π/3)=π/3-√3
f(5π/3)=5π/3+√3
端点值f(0)=0
f(2π)=2π
比较得最大值为f(5π/3)=5π/5+√3,
最小值为f(π/3)=π/3-√3