Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. H[x2_, y2_, x3_, y3_] :=
  2. 0.626 x2^2 + 0.591 x3^2 + 0.626 y2^2 + 0.591 y3^2 - 0.066 x2^3 +
  3. 0.451 x2 y2^2 + 0.225 x2 y3^2
  4.  
  5. abc = {Derivative[1][x][t] == 3/4 Cos[y[t]] + Sin[z[t]],
  6. Derivative[1][y][t] == Cos[z[t]] + Sin[x[t]],
  7. Derivative[1][z][t] == Cos[x[t]] + 3/4 Sin[y[t]]};
  8.  
  9. psect[{x0_, y0_, z0_}] :=
  10. Reap[NDSolve[{abc, x[0] == x0, y[0] == y0, z[0] == z0,
  11. WhenEvent[y[t] == 0, Sow[{x[t], z[t]}]]}, {}, {t, 0, 1000},
  12. MaxSteps -> [Infinity]]][[-1, 1]]
  13.  
  14. abc = {Derivative[1][x2][t] == 1.252 y2[t] + 0.902 x2[t] y2[t],
  15. Derivative[1][y2][t] == -1.252 x2[t] + 0.198 x2[t]^2 -
  16. 0.451 y2[t]^2 + 0.225 y3[t]^2,
  17. Derivative[1][x3][t] == 1.182 y3[t] + 0.450 x2[t] y3[t],
  18. Derivative[1][y3][t] == -1.182 x3[t]};
  19.  
  20. psect[{x02_, y02_, x03_, y03_}] :=
  21. Reap[NDSolve[{abc, x2[0] == x02, y2[0] == y02, x3[0] == x03,
  22. y3[0] == y03,
  23. WhenEvent[y3[t] == 0, Sow[{x2[t], y2[t], x3[t]}]]}, {}, {t, 0,
  24. 1000}, MaxSteps -> [Infinity]]][[-1, 1]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement