Solution to two-body problem in orbital mechanics for $r(t)$ and $\theta(t)$, rather than $r(\theta)$?

I have written a simple numerical integration code to calculate the orbits of two planetary bodies orbiting a star, in order to calculate the transit-timing variation for one body due to the gravitational perturbations of the other. I am stuck on two issues:

(1) I want to be able to check my numerical code for the one-body case by deriving an analytical expression for $$x(t)$$ and $$y(t)$$, or equivalently $$\theta(t)$$ and $$r(t)$$, as an initial value problem using initial positions and velocities. I can find plenty of derivations online for $$r(\theta)$$, but none that explicitly solve for position as a function of time. My understanding is that this should be possible, but I can't find any references that work it out. I am ok assuming the unperturbed orbit is elliptical and stable, but hopefully not necessarily circular. How would I go about doing this? Note: I have seen the answers to this question, which state that there are analytic solutions but they are elliptic functions. However, none of the answers show how to derive this, or whether there might be nicer solutions under certain simplifications/assumptions.

(2) I would also like to be able to check that the values I calculate for the transit-timing variations are reasonable. It seems like this is a very involved calculation (ie. as discussed in this paper). Is there any simplified calculation that could be made (perhaps making some restrictive assumptions on the orbital configuration) that would allow me to check my numerical results analytically?

• Wikipedia has Kepler’s method with which you can compute position vs. time to arbitrary precision without integrating. Nov 18, 2022 at 20:28
• Also related: physics.stackexchange.com/q/99094/25301 Nov 18, 2022 at 20:28
• simple numerical integration code Does your code produce a closed orbit? Does it conserve energy? Simple codes often do neither. Nov 18, 2022 at 20:32
• Clarifications belong in the question, not in a comment. Questions are editable. Nov 18, 2022 at 20:40
• The solution involves an elliptic integral, of which a simplification can be for special cases, like near-circular orbits. Nov 18, 2022 at 21:50