So I modified my ode45 error tolerances, both RelTol and AbsTol, to be at 1e-10. 1e-14 or so seems to be the most stringent value. Can I further "add more accuracy", by choosing finer tspan time-steps, say, tspan = linspace(0,10, 20,000)? Or does adding finer time-steps just bring back more solutions, but with the same accuracy, and with the same error tolerances satisfied? For example, if I play with the simple differential equation xdot = cos(t), with initial condition x(0) = sin(0) = 0, I want to see how close the solution y = sin(t) can get to 0, near pi = 3.14...
However, adjusting the RelTol and AbsTol values to be more stringent doesn't seem to help; the time-steps still aren't fine enough, and t gets to about 3.143143143143143, and so y(t) = sin(t) is not actually very close to 0, for my needs. It is only when I add finer integration time-steps, in the tspan setting, does t get much closer to approximating pi, and thus y = sin(t) gets much closer to the value of 0.
Should I simply use a combination of both, i.e. choose stringent error tolerances as well as finer tspan timesteps, in order to get the most accurate solutions? My motivation for studying RelTol, AbsTol, and tspan time-steps is to eventually return to root-finding practice using Matlab's fsolve, so this is an important digression from multivariable root-finding.