Orbit of a planet around the Sun
In this example you can plot the orbit of a planet around the Sun. The settings you can choose are the initial distance from the sun, and the initial radial and angular velocities. You can also vary the power law for the attractive force between the planet and the Sun.
The equation of motion for a planet around a fixed sun (a reasonable approximation if the sun is much bigger than the planets) is
where n is the power law for the radial force. In classical gravity this is given as n=2, the initial setting for the programme. Here we can investigate other possibilities.

Work through the following. Where you are expected to do some calculations do them, showing the working! try and confirm Kepler's laws in the way indicated, giving your estimates for the periods of at least 4 orbits. Bonus marks for an elliptical orbit (you will have to work out the semimajor axis).
 
Investigate the following:
 Do the orbits look like ellipses always. If the energy of the system is given by
check to see if you get closed orbits when E is less than 0. If you try E greater than or equal to 0, remember that once the planet has disappeared off the screen it will not come back!
 What values of the angular velocity give you circular orbits? What is the general formula for different radii and power laws? (Answer here)
 Try finding a circular orbit for n=3 for an initial radius of 0.75. What happens, and why? (Answer here)
 For n=2 try and confirm Keppler's law for circular orbits that the square of the orbital period is proportional to the cube of the radius. You can also try and verify the full version of this law with the radius replaced by the semimajor axis (Calculate this for your initial conditions using the formula from lectures). Note: the programme does not run in "real time", but the real time elapsed should be roughly proportional to the model time, so you can use a watch for timing.
 The effect of general relativity can be modelled by letting the power law vary slightly from n=2. Try setting n=2.02 or n=1.98 and see what happens. What happens when the eccentricity of the orbit increases and decreases? (Answer here)
Note: If nothing seems to happen try reloading the page.
Don't forget that it is not wise to allow your planet to hit the sun!
Return to X2 Applied Maths Page