1
$\begingroup$

Dear friends. Can anybody suggest me, if there exists a method of ODE solving by the funtion NDSolve similar to Maple's method in dsolve with use of 'output'=array option? The latter allows one to obtain approximate solution in specified points (say, {0.0, 0.3, 0.5, 0.75, 1.0} for the domain [0,1]) + corresponding derivatives in these points by Richardson extrapolation scheme?

$\endgroup$
  • $\begingroup$ NDSolve[] actually does you one better; it produces a function defined over your domain of interest that can then be evaluated for any arbitrary argument within the domain. This function can also be differentiated if need be. $\endgroup$ – J. M. is in limbo Oct 2 '16 at 9:39
  • $\begingroup$ @J.M. Though I suppose you can create an array from NDSolve[] with Table[], and then Interpolation[] it again. :/ $\endgroup$ – Feyre Oct 2 '16 at 10:18
  • $\begingroup$ Certainly, I'm familiar with features of NDSolve, but for my purposes I need something like Maple dsolve with array. $\endgroup$ – Konstantin Oct 2 '16 at 10:23
  • $\begingroup$ So like... s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 1, 30}];, Table[y[i] /. s, {i, 1, 30}] $\endgroup$ – Feyre Oct 2 '16 at 10:24
  • 2
    $\begingroup$ In fact, since the resulting function is listable: s = NDSolveValue[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 1, 30}]; s[Range[1, 30]]. $\endgroup$ – J. M. is in limbo Oct 2 '16 at 10:28