Does anyone know (simple) Mathematica code for computing the Lyuponov exponent for the Duffing system?
x''[t] + 0.15 x'[t] - x[t] + x[t]^3== 7*Cos[t]
{x[0] == 0, x'[0] == 0}
Does anyone know (simple) Mathematica code for computing the Lyuponov exponent for the Duffing system?
x''[t] + 0.15 x'[t] - x[t] + x[t]^3== 7*Cos[t]
{x[0] == 0, x'[0] == 0}
My previous code for LyapunovExponents
from this answer did not handle non-autonomous systems like this properly. Thanks for pointing that out! I've updated it to fix this mistake and it seems to work now.
Putting your system in first-order form:
eqns = {x'[t] == y[t], y'[t] == -0.15 y[t] + x[t] - x[t]^3 + 7 Cos[t]};
Then calculating Lyapunov exponents:
LyapunovExponents[eqns, {x -> 0, y -> 0}, ShowPlot -> True]
(* {0.10542, -0.25542} *)
t=0
) you want.
$\endgroup$