Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    $\begingroup$ Take a look at ParametricNDSolveValue. I used pf = With[{tmax = 100}, ParametricNDSolveValue[{x'[t] == y[t], y'[t] == -9 Sin[x[t]] - 0.20 y[t], x[0] == a, y[0] == b}, {x[tmax], y[tmax]}, {t, 0, tmax}, {a, b}]] to simplify the first part of your code. $\endgroup$ Commented Apr 27, 2013 at 18:32
  • $\begingroup$ @Szabolcs The ParametricNDSolve stuff is neat, alas I only have v8 :) Was there any significant improvment in speed? $\endgroup$ Commented Apr 27, 2013 at 19:49
  • $\begingroup$ I cannot make it work for StreamPlot[{y, -0.5 y - Sin[x]}, {x, -3 \[Pi], 3 \[Pi]}, {y, -2, 2}, ....] (changed in sol as well), with tmax=500 and PlotPoints -> 200, MaxRecursion -> 5, after waiting for a long time I got just a hexagonal-like box. Any ideas how to make it more flexible? $\endgroup$ Commented Apr 11, 2021 at 11:37