#the eleventh homework
###Abstract ######Use principally the Newton's gravitation law to study the solar system. We focus on the three problems,first,simulating the two body locomotion problem; second, investigating the inverse-square force law precisely and see the variation change with the ellipticity; third, using the general relativity adjust the force law and then study the mercury precession, see the variation of eccentricity versus precession angular speed. ###the fundamental principle
######
######in order to study the two body problem, we simply let the previous fixed object be free. The key ideas there is to set the correct initial conditions.we let the initial speed perpendicular to the line cross two objects and let the mass ratio of two objects be different.
######we can say the precession of the ellipse orbit. we will say that the change of the ellipticity can be achieved by adjust the initial speed, different speed correspond to be differernt.and say under the different ellipticity ,the rotation speed of the whole ellipse orbit is different.
Under the adjustment of the general relativity, the force law becomes:
Thus by the Kepler second law and conservation of energy, we can build a relation between the eccentricity and the initial speed( we choose the initial location at the perihelion).
, Then we can change the initial speed to change the eccentricity.
###the numerical result
######the two body problem:
######
######the final situation represent the speed exceed the escape velocity. the first and third situations equals to the mass center with novanishing speed.
######the stability of the orbit with slight change in the force law.
######
######
(the initial speed is 0.9 previous situation)
######
(the initial speed is 0.8 previous situation)
######the precession versus time
######
######
######
######
######the precession speed versus the eccentricity. there is some problem occur in the range of 0.8 of eccentricity,the trajectory becomes a line and when i do simulation in the e=0.7988, i find sometimes the results is normally some rotated elliptical trajectory and sometimes it is the straight line.
######the x-axis is the eccentricity,Y-axis is the precession
######
######
######we can see when the eccentricity bigger than 0.65. the unstability occurs. we then do some more precise simulation.
######
######it even have more detailed structure:
######
######
######then we study the trajectory to say whether these instability is true.
######
######
######
######we can say at e=0.7979731,the precession speed vanishes.
###the code
######problem1
######problem2(1)
######problem2(2)
######problem2(3)
######problem3
##Reference
######《Python基础教程》(第二版)[挪]Magnus Lie Hetland著