# How can I get the time steps chosen by NDSolve when the Method -> “ExplicitRungeKutta” option is given?

I am trying to solve an ODE with NDSolve using the "ExplicitRungeKutta" method. I need to know exactly which time steps NDSolve chooses, i.e., which points in the interval $[tmin, tmax]$ it chooses when it implements the Runge-Kutta method before the interpolation is made). What should I do?

-
See NDSolveStateData, in particular the section NDSolveStateData Properties; also see [NDSolveExplicitRungeKutta](http://reference.wolfram.com/mathematica/tutorial/‌​NDSolveExplicitRungeKutta.html); other methods can be found in [NDSolveOverview](reference.wolfram.com/mathematica/tutorial/NDSolveOverview.html). –  Michael E2 May 29 '14 at 12:12
NDSolveUtilities can be used for analyzing the solution after the solution has been constructed. –  Michael E2 May 29 '14 at 13:13
quick and dirty way: ClearAll[g]; g[x_?NumericQ] := (Sow[x]; Cos[x]); ListPlot@Last@ Last@Reap[NDSolve[{y'[x] == y[x] g[x], y[0] == 1}, y, {x, 0, 30}, Method -> "ExplicitRungeKutta"]]` –  acl May 29 '14 at 23:09