0

In order to find out the Lyapunov Exponent of Mackey Glass Equation I have used the following program.

g[x_, t_, τ_] := (1/4) x[t - τ]/(1 + x[t - τ]^10) - x[t]/10;
lyapunov[f_, x0_, τ_, t_, n_, tr_: 0] := 
  Module[{df, xi}, df = Derivative[1, 0][f]; xi = NestList[f[#, τ] &, x0, n - 1];
    (1/n) Total[Log[Abs[df[#, τ]]] & /@ Drop[xi, tr]]];
gtable = Table[{τ, 
    lyapunov[g, 0.5, τ, 10000, 5000]}, {τ, 14, 40, 0.01}, {t, 17, 4000, 17}];
ListPlot[#, Frame -> True, FrameLabel -> τ", "λ"}, Joined -> True] & /@ {gtable}

This program I got from Lyapunov exponent plot. I have only modified it for Mackey Glass equation which is x'[t] == (1/4) x[t - τ]/ (1 + x[t - τ]^10) - x[t]/10; Unfortunately it is taking a long time and I am not getting any result. Please help me to find out the mistake.

Udichi
  • 559
  • 3
  • 13
  • Your g is a function of 3 arguments. You pass it as a first argument in lyapunov, where it's called f_; then you have NestList[f[#, \[Tau]] &, where f is a function of 2 arguments. So basically you wrote a program for 2-argument functions and want it to work on 3-argument ones. – corey979 Sep 26 '16 at 08:39
  • So how I can write f as a function of 3 arguments? – Udichi Sep 26 '16 at 09:27
  • lyapunov in the original post calculates Lyapunov exponent of function, while you're trying to calculate "Lyapunov Exponent of delayed differential equation". What's "Lyapunov Exponent of delayed differential equation"? If you want to find Lyapunov Exponent of x[t] in the equation, then you need to solve the equation first, but it's another story. – xzczd Jan 03 '17 at 09:09

0 Answers0