Question: How to get the numbers of steps for rk4?

I use rk4 to solve this equation with the paramater w = 500, I want to get the numbers of steps.

And when I change the parameter w = 1000, I want to obtain the numbers ofsteps?

Here is the procedure:

Digits:= 32;
w :=  500;
ode := diff(y(t), `$`(t, 1)) = 2*I*y(t) + sin(w*t)*y(t)*y(t):
ics := y(0) = 1:

p2 := dsolve({ics, ode}, numeric, method = classical[rk4]):


Thanks for your help.

Please Wait...