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?
Edit: here is the code:
k = NDSolve[{x'[t]^2 + 1/Cos[x[t]]^2 == 2, x[0] == 0},
x[t], {t, 0, 4}]
x[t]
to be real your ode evaluates negativex'[t]^2
for x[t]>= Pi/4 !!! That's whyNDSolve
stops forx[t]==Pi/4
. $\endgroup$1/Cos[x[t]]^2
will get larger than 2 and the other term is squared. $\endgroup$