Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- u = 2;
- c = 3000;
- it = 3;
- Array[h, {u, c}];
- Do[Do[h[i, k] = 0, {i, u}], {k, c}];
- F[x_] := Sin[x];
- AA[x_] := 1/(x^2 + 1);
- w[x_] := F[x] + AA[x];
- v[x_] := Sum[w[x + i*2 Pi], {i, -it, it}];
- Do[n = 1;
- If[j == 1,
- While[n <= c,
- h[j, n] =
- NDSolveValue[{y''[x] == Cos[y[x]], y'[0] == 0, y[0] == n},
- y, {x, 0, 1},
- "Method" -> {"EquationSimplification" -> {Automatic,
- "TimeConstraint" -> Infinity}}, AccuracyGoal -> 3]; n++];,
- While[n <= c, h[j, n] = NDSolveValue[{y''[x] == Cos[y[x]]
- + Sum[v[h[j - 1, n][x] - h[j - 1, i][x]], {i, 1, c}],
- y'[0] == 0, y[0] == n}, y, {x, 0, 1},
- "Method" -> {"EquationSimplification" -> {Automatic,
- "TimeConstraint" -> Infinity}}, AccuracyGoal -> 3.];
- n++];];, {j, u}];
Add Comment
Please, Sign In to add comment