Check the quality of a solution to Duffing's equation by using a sequence of solution precisions:
Make a sequence of solutions at successively higher working precision:
A plot shows that some of the solutions deviate toward the end:
Plot the solution
x[100] as a function of working precision:
Convergence to the solution at the highest precision indicates about 6 digits can be trusted: