If I can solve this integral below in analytical form, then I will be able to provide the time dependant orbit for a two-body problem,
$$\int_0^x \frac{d\theta}{(1+\epsilon\cos{\theta})^2}$$
for $\epsilon>0$.
If I can solve this integral below in analytical form, then I will be able to provide the time dependant orbit for a two-body problem,
$$\int_0^x \frac{d\theta}{(1+\epsilon\cos{\theta})^2}$$
for $\epsilon>0$.
On
Applying the tangent half-angle substitution, $$\theta = 2 \arctan t, \qquad d\theta = \frac{2 \,dt}{1 + t^2},$$ straight away rationalizes the integral: $$2 \int \frac{1 + t^2}{(1 - \epsilon) t^2 + (1 + \epsilon)} \,dt .$$ For $\epsilon < 1$, this form suggests the substitution $$u = a t, \qquad \textrm{where} \qquad \epsilon = \frac{1 - a^2}{1 + a^2},$$ which in turn transforms the integral to \begin{align} \frac{(1 + a^2)^2}{2 a^3} &\int \frac{a^2 + u^2}{(1 + u^2)^2} \,du \\ &= \frac{(1 + a^2)^2}{2 a^3} \left[ \int \frac{du}{1 + u^2} - (1 - a^2) \int \frac{1}{(1 + u^2)^2} \,du \right] \\ &= \frac{(1 + a^2)^3}{4 a^3} \left(\arctan u - \frac{(1 - a^2) u}{1 + u^2}\right) + C \\ &= \frac{(1 + a^2)^3}{4 a^3} \left(\arctan a t - \frac{1 - a^2}{1 + a^2 t^2}\right) + C \\ &= \frac{(1 + a^2)^3}{4 a^3} \left[\frac{1}{2} (1 + a^2) \arctan \left(a \tan \frac{\theta}{2}\right) \right. \\ &\qquad \qquad \qquad \qquad \left.- \frac{a (1 - a^2)}{1 + a^2} \frac{\sin \theta}{a^2 (1 - \cos \theta) + (1 + \cos \theta)} \right] + C. \end{align}
If $\epsilon > 1$, instead using the substitution $v = \frac{t}{a}$ transforms the integral to $$\frac{(1 - a^2)^2}{2 a^3} \int \frac{1 + a^2 v^2}{(1 - v^2)^2} ,$$ which can be handled similarly, but results in an $\operatorname{artanh}$ term instead of an $\arctan$ one.
Observe that,
$$\left(\frac{\sin\theta}{1+\epsilon\cos{\theta}} \right)'=\frac1\epsilon\left[\frac{1}{1+\epsilon\cos{\theta}}+\frac{\epsilon^2-1}{(1+\epsilon\cos{\theta})^2} \right]$$
and decompose the integral
\begin{align} I=&\int_0^x \frac{d\theta}{(1+\epsilon\cos{\theta})^2}\\ =&\ \frac{1}{\epsilon^2-1}\left[\int_0^x d\left(\frac{\epsilon\sin\theta}{1+\epsilon\cos{\theta}}\right)-\int_0^x \frac{d\theta}{1+\epsilon\cos{\theta}}\right]\\ =&\ \frac{\epsilon}{\epsilon^2-1}\frac{\sin x}{1+\epsilon\cos{x}}-\frac{1}{\epsilon^2-1}\int_0^x \frac{d\theta}{1+\epsilon\cos{\theta}} \end{align}
The remaining integral can be evaluated with half-angle substitution
$$\int_0^x \frac{1}{1+\epsilon\cos{\theta}} d\theta = \frac{2}{\sqrt{1-\epsilon^2}} \tan^{-1} \left(\sqrt{\frac{1-\epsilon}{1+\epsilon}} \tan\frac x2 \right) $$
Thus
$$I=-\frac{\epsilon}{1-\epsilon^2}\frac{\sin x}{1+\epsilon\cos{x}}+\frac{2}{{(1-\epsilon^2})^{3/2}} \tan^{-1} \left(\sqrt{\frac{1-\epsilon}{1+\epsilon}} \tan\frac x2 \right) $$