# 0-1 test or Lyapunov exponent, to prove my below system is chaotic?

The following question is a part of my research here,I want to calulate the Lyaponov exponents of the following dynamics to show whether i have a chaotic dynamics or not. $$\ddot{x}-ax+bx^{3}+cx^{5}+A \,\cos \left(( \omega t)\right)+\gamma\, \dot{x}=g,\dot x(0) =0,x(0)=0$$ with $$g: n \mapsto \left\{ \begin{array}{ll} \left \lfloor{n/\sqrt{2}} \right \rfloor & \text{ if } n \text{ even,} \\ \left \lfloor{n\sqrt{2}} \right \rfloor & \text{ if } n \text{ odd.} \end{array} \right.$$ I just took the case of n is odd . Here is my Code :

Clear[A];
solution[A_, tmax_] :=
NDSolve[{v'[t] ==
x[t] - x[t]^3 - 0.05*v[t] + A*Cos[1.1*t] -
FractionalPart[2024/Sqrt], x'[t] == v[t], x == 0,
v == 0}, {x, v}, {t, 0, tmax}, MaxSteps -> 100*tmax]
sol3 = solution[0.2, 800]
graph[tmin_, tmax_] :=
ParametricPlot[Evaluate[{x[t], v[t]} /. sol3], {t, tmin, tmax},
AxesLabel -> {"x", "v"}]
graph[0, 200]
sol3 = {x -> 0.5, v -> -1.34};
LyapunovExponents[sol3, ShowPlot -> True]


But I didn't get any values of Lyaponov exponents however i was able to show the parametric plot of my dynamics

Thanks for any help or any comments

I'll assume you're using the LyapunovExponents function I wrote here. The first step is to make sure you're starting on the attractor. In your case, it seems that after some complicated transient dynamics, the system ends on a simple (non-chaotic) limit cycle.

A = 0.2;
tmax = 800;

sol = NDSolve[{
v'[t] == x[t] - x[t]^3 - 0.05*v[t] + A*Cos[1.1*t] - FractionalPart[2024/Sqrt],
x'[t] == v[t], x == 0, v == 0}, {x, v}, {t, 0, tmax}, MaxSteps -> 100*tmax][];

Plot[{x[t], v[t]} /. sol, {t, 0, tmax}]
ParametricPlot[{x[t], v[t]} /. sol, {t, tmax - 100, tmax}]
{x[tmax], v[tmax]} /. sol
(* {-0.927737, -0.0327212} *)  We can verify with LyapunovExponents like this:

LyapunovExponents[{
v'[t] == x[t] - x[t]^3 - 0.05*v[t] + A*Cos[1.1*t] - FractionalPart[2024/Sqrt],
x'[t] == v[t]}, {x -> -0.9277372619912159, v -> -0.032721216898167094}, ShowPlot -> True] {-0.0249872, -0.0250129}


Both exponents are negative, indicating non-chaotic dynamics.

I noticed that your code is missing the - x[t]^5 term in the equations you wrote. Maybe including that would help find chaos (but based on my quick exploration, be sure to increase tmax because there maybe be loooonnnng transients).