Question: (In Python, preferably with comments so I can understand what you're doing.) Exercise 2.6: Planetary orbits The orbit in space of one body around another,

(In Python, preferably with comments so I can understand what you're doing.) Exercise 2.6: Planetary orbits The orbit in space of one body around another, such as a planet around the Sun, need not be circular. In general it takes the form of an ellipse, with the body sometimes closer in and sometimes further out. If you are given the distance 1 of closest approach that a planet makes to the Sun, also called its perihelion, and its linear velocity 1 at perihelion, then any other property of the orbit can be calculated from these two as follows. a) Keplers second law tells us that the distance 2 and velocity 2 of the planet at its most distant point, oraphelion, satisfy 22=11 . At the same time the total energy, kinetic plus gravitational, of a planet with velocity and distance from the Sun is given by =122 where is the planets mass, =1.98911030 is the mass of the Sun, and =6.67381011312 is Newtons gravitational constant. Given that energy must be conserved, show that 2 is the smaller root of the quadratic equation 222112[2121]=0. Once we have 2 we can calculate 2 using the relation 2=11/2 . b) Given the values of 1 , 1 , and 2 , other parameters of the orbit are given by simple formulas that can be derived from Keplers laws and the fact that the orbit is an ellipse: Semi-major axis: =12(1+2) , Semi-minor axis: =12 , Orbital period: =211 , Orbital eccentricity: =212+1 . Write a program that asks the user to enter the distance to the Sun and velocity at perihe-lion, then calculates and prints the quantities 2 , 2 , , and . c) Test your program by having it calculate the properties of the orbits of the Earth (for which 1=1.47101011 and 1=3.02871041 ) and Halleys comet ( 1=8.78301010 and 1=5.45291041 ). Among other things, you should find that the orbital period of the Earth is one year and that of Halleys comet is about 76 years.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!