Particle and Rigid Body Dynamics
The course notes give detailed code implementation and mathematical derivation. Newton Method $$ \begin{gather*} f(x)\approx f(x_n)+f'(x_n)\Delta x+\frac{1}{2}f''(x_n)\Delta x^2 \\ 0=\frac{d}{d\Delta x}\left(f(x_n)+f'(x_n)\Delta x+\frac{1}{2}f''(x_n)\Delta x^2\right)=f'(x_{n})+f''(x_{n})\Delta x \end{gather*} $$ so $$ x_{n+1}=x_n-H^{-1}\nabla f(x_n) $$ where $H=\nabla^2f$ is the Hessian matrix Euler Method $$ \mathbf{x}(t_0 + h) = \mathbf{x}_0+h \dot{\mathbf{x}}(t_0) $$ Euler Method is the simplest numerical method and achieve $O(h^2)$ accuracy. But it has many disadvantages. It will produce outward drift when evaluating an orbiting movement so it is not accurate....