Simplify cos(x)