I am trying to solve the following problem:
A test particle at coordinate $\vec{r_0}=(1,0)$ is thrown with initial velocity $\vec{v_0}=(0,v)$ and is influenced by a gravitational field $\vec{F}=\frac{-\vec{r}}{r^3}$ (an $M=1$ mass at $(0,0)$) where $v$ can have the values: 1 (circ motion) , 0.1 or 0.01 (for eliptical motion). I need to solve this problem using RK-4 method for $T_{sol}=2\pi$ and use a timestep to reach a desired accuracy $\frac{dE}{E}$ (relative error of the energy at the end of the calculation and the starting,analytical energy), for all 3 values.
I already prepared the equations and the code, and I get the desired accuracy for v=1 with 60 points for the solution. However, so far I couldn't reach the same accuracy for v=0.1 or 0.01, and I have tried as many as 25,000 points. I see that in every solution, the motion begins as a fall towards the mass until it reaches some minimum radius, and then the trajectory gets ruined due to some numeric error, and the relative error in the end is not close at all to the desired number. Is there any way to estimate how many points I will need for the solution to prevent that from happening?