Solve $$y = \left| {\cos x} \right|,\,y = 0,\,x =  - \pi $$ and $$x = \pi $$

Solution