Before reading this long message, please know that this is question is posted to know whether there is a method to find the relation between between the orbital velocity of a planet on an elliptical orbit and time.

I am trying to model the orbital velocity of Mercury orbiting the Sun on an elliptical orbit,that is the path of the orbit cannot be assumed to be circular as one might do at a high school level.

I have visited several sources online, I have tried to derive the equation myself and no matter what I do, I cannot seem to come up with an equation for this. I did come across the formula for orbital velocity in terms of the radius of orbit at any given instant; however, I could not use this to figure out a relationship between velocity and time either. The equation is as follows: $$v=\sqrt {\frac{2GM}{r}-\frac{GM}{a}}$$ Where, $v$ is the orbital velocity, $G$ is Newton's gravitational constant, $M$ is the mass of Sun, $r$ is the orbital radius of a planet around the sun at any given instant (not constant on an elliptical path), and $a$ is the semimajor axis of the elliptical orbit.

On the other hand, when I tried deriving the equation, I got this differential equation: Differential equation

Now, I tried solving this differential equation and I believe this is not solvable since the integral for the velocity terms is unsolvable (if I am correct). So, for this, I reached out to my Math teacher and asked her if I there was some other method to solve the differential equation and she suggested I use the slope fields method. I tried it out but for some reason, this specific differential equation is not plotting out on any of the technology I used for plotting slope fields. Next I tried to plot these slope fields manually by the use of a graphing calculator and realized that the differential equation that for a particular range of $v$, $\frac{dv}{dt}$ is coming out to be complex.

So from here, I tried to find the range for which the value of $\frac{dv}{dt}$ is real; however, so far I have been unsuccessful. If someone can provide me with a pre-existing equation which describes this relation or knows a method derive the equation, or knows how to solve the differential equation mentioned above, it would be of great help to me.

  • 2
    $\begingroup$ BTW, it's not a good idea to plug all those raw numbers into your equations. It's much better to use symbolic constants, and only plug in actual numbers after you've done all the algebra & calculus. $\endgroup$
    – PM 2Ring
    Dec 22, 2021 at 10:13

2 Answers 2


The algorithm for the calculation is as follows:

  1. We call $t_0$ the time of passage through the perihelion and $T$ the orbital period. We first calculate the mean anomaly $M$ at the instant $t$ we want to know the velocity

$$M=\frac{2\pi}T \ (t-t_0)$$

  1. From the mean anomaly we calculate the eccentric anomaly $E$ using Kepler's Equation. Because it is a transcendental equation, the calculation must be done by numerical methods, but it is a very simple calculation. Look, for example, Kepler's Equation Fixed-point iteration

$$E=M+e \sin E$$

  1. Once the eccentric anomaly is known, we calculate the **true anomaly $\theta$ :

$$\tan \frac{\theta}2=\sqrt{\frac{1+e}{1-e}} \ \tan \frac E 2$$

  1. From the true anomaly we calculate the distance $r$ to the Sun by means of:

$$r=\frac{a \ (1-e^2)}{1+e\cos \theta}$$

  1. Finally, knowing the mass of the sun $M_s$, we calculate the velocity by means of:

$$v=\sqrt{2 G M_s \left (\frac 1 r - \frac 1{2a} \right )} $$

Best regards.

** If desired, it is possible "to skip" the calculation of the true anomaly by using directly the expression of the radius vector as a function of the eccentric anomaly:

$$r=a \ (1-e \cos E)$$


If you can use numeric values for position and velocity as a function of time, you might go for a computer generated simulation of the orbit. There are various techniques for improving accuracy. You might aim for an orbit that ends where it started.

  • $\begingroup$ Hello! Thank you for the response; however, I had already tried what you have suggested. I picked up data from the NASA Horizons System and plotted the graph as well. The problem with this method is that even though the final function (v-t function) is periodic, it cannot be modelled by the usual periodic functions (trigonometric functions). I am not able to figure out what model suits those graphs best and therefore I am trying to derive the models on my own. Look at this question I asked on Math stack exchange: math.stackexchange.com/q/4337550/950470. $\endgroup$ Dec 27, 2021 at 18:48
  • $\begingroup$ I like to do simulations on a spreadsheet. It's easy to plot x and y coordinates using an orbit equation. Then use conservation of energy to get the speed at each point. With the speed, you can estimate the time to reach the next point. $\endgroup$
    – R.W. Bird
    Dec 28, 2021 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.