Take the arccos of your equation.
... arccos(cos(2x)) = arccos(1/√2)
... 2x = {π/4+2kπ, -π/4+2kπ} . . . . list all solutions
... x = {π/8+kπ, -π/8+kπ}
... x = {π/8, 7π/8, 9π/8, 15π/8}
_____
In general, when x has a multiplier, you need to consider angles in the range of 0 to that multiple of 2π where you might normally only look in the range [0, 2π).