Plot[6 Abs[Cos[x]] - x, {x, -2, 7}]