# Solving Kepler's 1st law as a function of time

• B
jebez
TL;DR Summary
p , ε , c constants :

θ'(t)(p/(1+ε cos(θ(t))))^2=c

θ(t)=?
Hi

I posted this differential equation to WolframAlpha https://www.wolframalpha.com/input?i2d=true&i=Power[\(40)Divide[a,1+b*cos\(40)y\(40)x\(41)\(41)]\(41),2]*y'\(40)x\(41)=c but no solution , " Standard computation time exceeded... Try again with Pro computation time "
Should I ( buy and ) post to Wolfram|Alpha Pro ? I don't want to buy Pro if it doesn't solve it ... Maybe someone who has Pro can post it ? Lend his/her account ?

In fact we have r(θ) = p/(1+ε cos(θ)) ( 1st Kepler's law ) , r²θ'(t)=c ( 2nd Kepler's law ) and I want r(t) so need to solve the differential equation .
https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion

Thanks .

Last edited:

Homework Helper
Gold Member
2021 Award
In fact we have r(θ) = p/{1 + ε cos(θ)) ( 1st Kepler law ) , r² θ'(t) = c ( 2nd Kepler law ) and I want r(t) so need to solve the differential equation .
https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion

Thanks .
Surprisingly, perhaps, there is no closed-form solution other than for circular orbits.

topsquark
Mentor
2021 Award
TL;DR Summary: p , ε , c constants :

θ'(t) (p/(1 + ε cos(θ(t))))^2) = c

θ(t) = ?

Hi

I posted this differential equation to WolframAlpha https://www.wolframalpha.com/input?i2d=true&i=Power[\(40)Divide[a,1+b*cos\(40)y\(40)x\(41)\(41)]\(41),2]*y'\(40)x\(41)=c but no solution , " Standard computation time exceeded... Try again with Pro computation time "
Should I ( buy and ) post to Wolfram|Alpha Pro ? I don't want to buy Pro if it doesn't solve it ... Maybe someone who has Pro can post it ? Lend his/her account ?

In fact we have r(θ) = p/(1 + ε cos(θ)) ( 1st Kepler law ) , r² θ'(t) = c ( 2nd Kepler law ) and I want r(t) so need to solve the differential equation .
https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion

Thanks .
Have a look at
https://www.wolframalpha.com/input?i=arccos(y(t))'=(a+b*+y(t))^2

topsquark
Homework Helper
The equation is separable in $\theta$, so $$\int_{\theta(0)}^{\theta(t)} \frac{1}{(1 + \epsilon\cos\phi)^2}\,d\phi = \frac{ct}{p^2}.$$ But that's as far as you can go: there is no known antiderivative for the integrand when $\epsilon \neq 0$.

topsquark and PeroK
Mentor
2021 Award
The equation is separable in $\theta$, so $$\int_{\theta(0)}^{\theta(t)} \frac{1}{(1 + \epsilon\cos\phi)^2}\,d\phi = \frac{ct}{p^2}.$$ But that's as far as you can go: there is no known antiderivative for the integrand when $\epsilon \neq 0$.
What's wrong with my substitution ##y(t)=\cos\theta(t)##? Nasty, but it looks like it has an implicit solution.

jebez
Well sorry I thought equations will be rendered automatically like WolframAlpha , it seems to need LaTeX but I never used this and it seems tiresome ...

In fact I want to verify if r(t) is solution to this differential equation to prove the Kepler's 1st law :

c , G , M constants :

c²/r(t)^3-G M/r(t)²-r''(t)=0

r(t)=?
r(θ)=?

Having again r²θ'(t)=c ( 2nd Kepler's law ) , centrifugal force=m r θ'(t)² and gravity force=G M m/r² so
force=m r''(t)=centrifugal force - gravity force
m r''(t)=m c²/r(t)^3-G M m/r²
then above .

And same problem with WolframAlpha .

Last edited:
Homework Helper
The usual approach is to set $u = 1/r$ and $$\begin{split} \frac{dr}{dt} &= \frac{dr}{d\theta}\frac{d\theta}{dt} = \frac{L}{r^2}\frac{dr}{d\theta} = -L\frac{du}{d\theta} \\ \frac{d^2r}{dt^2} &= \frac{L}{r^2} \frac{d}{d\theta}\frac{dr}{dt} = -L^2u^2\frac{d^2 u}{d\theta^2} \end{split}$$ whence $$\frac{d^2u}{d\theta^2} + u = \frac{GM}{L^2}$$ which we can solve for $u(\theta)$.

Homework Helper
What's wrong with my substitution ##y(t)=\cos\theta(t)##? Nasty, but it looks like it has an implicit solution.

In fact WolframAlpha does give an antiderivative $$\int \frac{1}{(1 + \epsilon\cos\theta)^2}\,d\theta = \frac{\epsilon \sin \theta}{(\epsilon^2 - 1)(\epsilon \cos \theta + 1)} - \frac{2\operatorname{artanh}\left( \frac{(\epsilon-1)\tan(\frac12\theta)}{\sqrt{\epsilon^2-1}} \right)}{(\epsilon^2 - 1)^{3/2}} + C$$ but we then have the problem of solving that for $\theta$.

PeroK
jebez
I found r=p/(1+ε cos(θ(t)) is solution to c²/r(t)^3-G M/r(t)²-r''(t)=0 :

r²θ'(t)=c
θ'(t)=c/r²
(dr/dθ)(dθ/dt)=dr/dt=v=r'(θ)c/r²=c ε sin(θ)/p

v'(θ)=c ε cos(θ)/p
(dv/)(dθ/dt)=dv/dt=r''(t)=ε cos(θ)(c(/1+ε cos(θ)))²/p^3

c²/r(t)^3-G M/r(t)²-r''(t)=0
c²(1+ε cos(θ)/p)^3-G M(1+ε cos(θ)/p)²-ε cos(θ)(c(/1+ε cos(θ)))²/p^3=0

c²-p G M=0 as bonus .

Feel free to edit my posts to render equations , yes I can do it myself but it would be nice automatically ...

Mentor
Feel free to edit my posts to render equations , yes I can do it myself but it would be nice automatically ...
Seriously?

Which word in the "LaTeX Guide" link below the Edit window did you have trouble understanding?

PhDeezNutz
Mentor
I can't edit my previous messages to render equations , I'm just lazy to do that sorry and it isn't copyable ...
Please be sure to use LaTeX from now on here. Thank you.

Homework Helper
- Copy your
Well sorry I thought equations will be rendered automatically like WolframAlpha , it seems to need LaTeX but I never used this and it seems tiresome ...

In fact I want to verify if r(t) is solution to this differential equation to prove the Kepler's 1st law :

c , G , M constants :

c²/r(t)^3-G M/r(t)²-r''(t)=0

As I suggested above, you should substitute $u = 1/r$ and eliminate $t$ as the independent variable in favour of $\theta$. This gives you $$u'' + u = \frac{GM}{L^2}$$ where $L = r^2 \dot \theta$ is constant. This is a linear ODE with constant coefficients which can be easily solved: $$r(\theta) =\frac{1}{u(\theta)} = \frac{L^2/GM}{1 + \epsilon\cos(\theta - \theta_0)}.$$

PeroK
jebez
I can't edit my messages #6 and #9 but r=c²/(G M(1+ε cos(θ))) , c²/r(t)³-G M/r(t)²-r''(t)=0 can be simplified :
c²/r(t)-r(t)²r''(t)=G M
c²G M(1+ε cos(θ))/c²-c⁴/(G M(1+ε cos(θ)))²ε cos(θ)(G M)³(1+ε cos(θ))²/c⁴=G M .

Sorry pasmith but I don't understand from -L du/dθ in #7 ...

Well I found how to inverse t(θ) to θ(t) with WolframAlpha and Mathematica :

InverseFunction[(a^2 Integrate[(1/(1 + b Cos[x]))^2, x])/c]

but both didn't solve it , see https://community.wolfram.com/groups/-/m/t/2697668?p_p_auth=2VkMYTxA .

And ( maybe ) simplification :

t(θ)=(a^2 ((b sin(x))/((b^2-1) (b cos(x)+1))-(2 (b-1) tan(x/2) coth(x))/(b^2-1)^2+d))/c .

Last edited:
jebez
t(θ)=$$\frac{a^2 \left(\frac{b (x \sin )}{\left(b^2-1\right) (b (x \cos )+1)}-\frac{2 (b-1) (x \tan ) (x \coth )}{2 \left(b^2-1\right)^2}+d\right)}{c}$$
( a=p , b=ε , c=c , d=t0 )
given by Mathematica ( I've 15 days trial ) , not WolframAlpha .

There's also the differential equation θ'(t)=c((1+ε cos(θ(t)))/p)² aka y'(x)=c((1+b cos(y(x)))/a)² in Mathematica gives :

{{y(x)->InverseFunction[1/2 ((b sin(#1))/((b^2-1) (b cos(#1)+1))-(2 tanh^-1(((b-1) tan(#1/2))/Sqrt[b^2-1]))/(b^2-1)^(3/2))&][(c x)/(2 a^2)+Subscript[c, 1]]}}

$$\left\{\left\{y(x)\to \text{InverseFunction}\left[\frac{1}{2} \left(\frac{b (\text{\#1} \sin )}{\left(b^2-1\right) (b (\text{\#1} \cos )+1)}-\frac{2 ((b-1) (\text{\#1} \tan ))}{\left(b^2-1\right)^{3/2} \left(\left(2 \sqrt{b^2-1}\right) \tanh \right)}\right)\&\right]\left[\frac{c x}{2 a^2}+c_1\right]\right\}\right\}$$
What is # and & here ?

With Mathematica I can copy as LaTeX .

PeroK