Duffing equation for spring model y"+y+ay^3=0 and can we find x(t),t=10^10? by using RK4 for 1 period (dont forget it is spring model) and in all period spring moves samely and can we find for t=10^10 by using modular aritmetic?
I don’t know about the general case, but this example works fine:
eq = y''[t] + y[t] + 2 y[t]^3 == 0;
sol = DSolveValue[{eq, y[0] == 0, y'[0] == 1},
y, t]
sol[10^10]
N[%, 20]
The period can be computed symbolically and then numerically to arbitrary precision, at least in this example:
eq = y''[t] + y[t] + 2 y[t]^3 == 0;
sol = DSolveValue[{eq, y[0] == 0, y'[0] == 1}, y, t]
Plot[sol[t], {t, 0, 5}]
period = SolveValues[sol[t] == 0 && 4 < t < 5, t]
N[period[[1]], 30]
N[10^10/period[[1]]]