## Lyapunov in duffing and van der pol

Find help with Math software, Engineering software, Graph software, Scientific software, Maple, Mathematica, Matlab, Pari/GP, calculators: Casio Classpad / TI Voyage / HP ...

### Lyapunov in duffing and van der pol

I have to make a program to calculate the largest lyapunov exponent for lorenz, rossler, duffing and van der pol. I did for the first two but i can't do it for the rest of them

The code i use for lorenz is this one:
Code: Select all
F[{x_, y_, z_}] := {σ (y - x), x (r - z) - y, x y - b z};
JacobianMatrix[funs_List, vars_List] := Outer[D, funs, vars]; J =
JacobianMatrix[
F[{Subscript[y, 1][t], Subscript[y, 2][t],
Subscript[y, 3][t]}], {Subscript[y, 1][t], Subscript[y, 2][t],
Subscript[y, 3][t]}]; Y =
Table[{Subscript[y, i][t], Subscript[y, i + 3][t],
Subscript[y, i + 6][t]}, {i, 4, 6}]; E1 =
Flatten[Transpose[J.Y]]; EQ3 =
Table[D[Subscript[y, i][t], {t, 1}] ==
F[{Subscript[y, 1][t], Subscript[y, 2][t], Subscript[y, 3][t]}][[
i]], {i, 1, 3}]; EQ9 =
Table[D[Subscript[y, i][t], {t, 1}] == E1[[i - 3]], {i, 4,
12}]; YI9 =
Table[{Subscript[y, i][0] == If[Mod[i, 4] == 0, 1, 0],
Subscript[y, i + 3][0] == If[Mod[i + 3, 4] == 0, 1, 0],
Subscript[y, i + 6][0] == If[Mod[i + 6, 4] == 0, 1, 0]}, {i, 4, 6}];
YI3 = {Subscript[y, 1][0] == 19, Subscript[y, 2][0] == 20,
Subscript[y, 3][0] == 50}; sol1 =
NDSolve[Join[EQ9, EQ3, YI3, YI9],
Table[Subscript[y, i][t], {i, 1, 12}], {t, 0, 30},
MaxSteps -> Infinity];
u = Table[Random[], {3}];
T = 30;
PhiT = Transpose[
Table[{Subscript[y, i][t], Subscript[y, i + 3][t],
Subscript[y, i + 6][t]}, {i, 4, 6}] /. sol1 /. t -> 30];
mle = Log[Norm[PhiT.u]]/T;

Lorenz and rossler have 3 equation so i don't have problem. Duffing and van der pol have only one equation and i don't know what to do. I try a lot of things with this code but anyone has results
dantekavala
Newcomer

Posts: 6
Joined: Sun Jun 26, 2011 2:39 pm

Return to Math Software

### Who is online

Users browsing this forum: No registered users and 2 guests