# Tag Info

The go-to reference on this topic is the extensive book by Hairer, Lubich, & Wanner (HLW). The kind of property you are dealing with is known as a quadratic invariant, since $\|x(t)\|^2$ is constant. These are covered in Section IV.2 of the book. Any quadratic invariant will be preserved by a Runge-Kutta method if the method coefficients satisfy  ...
You want a numerical solution, but this might help you check your computed results. If $a$ satisfies the ODE, you know $e^{a(t)}a'(t) = f(t)$. Integrating you get \begin{align} \int_0^t\, f(\tau)\, d\tau &= \int_0^t e^{a(\tau)}a'(\tau)\, d\tau \\ &= \int_{a(0)}^{a(t)} e^a da \\ &= e^{a(t)} - e^{a(0)}. \end{align}