Why does NDSolve run into problems here?

I am looking at a particle moving in a funny potential, described by the following differential equation. The solution should be just some kind of periodic trajectory, why is there a problem here?

enter image description here

Edit: here is the code:

k = NDSolve[{x'[t]^2 + 1/Cos[x[t]]^2 == 2, x[0] == 0},    x[t], {t, 0, 4}]