Uploaded by Dorothy Fu

Homework 6

advertisement
Homework 6
1. The goal of this question is to find the change in velocity required to change
the orbit of an object in Earth’s orbit around the Sun to an eliptical orbit
that will reach the orbit of Mars.
a Calculate the speed of Earth’s orbit around the Sun in m/s. Assume
the Earth’s orbit is circular and that the mass of the Sun is 2×1030 kg
and that the Earth is 1.5 × 1011 m (1 AU) away from the Sun.
b Assume that Mars’s orbit is circular and that Mars is 1.5 AU from
the Sun. Also assume that the Earth and Mars are on opposite sides
of the Sun and that the Earth, Sun and Mars are on a straight line.
Thus the perhelion of the desired orbit will be 1 AU, and the aphelion
will be 1.5 AU. Calculate the period of this elliptical orbit.
c Calculate the speed of the object (on its elliptical orbit) at its perihelion distance of 1 AU. Note that for an elliptical orbit
v 2 = GM
2
r
−
1
a
For the next two questions a Jupyter notebook has been posted
along with the homework. The first program in the notebook
contains the solution to question 2, but it contains one error
that you should find. The second and third programs in the
notebook contain two slightly different solutions to question 3.
The second and third programs also each contain one error that
you should correct.
2. Here is a python programming exercise to help you get started. Write a
program that will will print the sum of the current and previous number
for a range of numbers from 0 to n.
For example if the name of your function is numsum, then numsum(5)
would print
0
1
3
5
7
Here is an explanation for the numbers above (sum = number + previous
number):
0=0+0
1=1+0
1
3=2+1
5=3+2
7=4+3
3. This is an exercise to help practice making plots using python. The standard python package for making plots is ”matplotlib”. To use matplotlib
you will need to import using a line like the following:
import matplotlib.pyplot as plt
Explore matplotlib and make the plot below, which is just a plot of the
function y = x2 calculated for the points x = [0, 1, 2, 3, 4, 5].
25
20
Y
15
10
5
0
0
1
2
X
3
4
Figure 1: Plot of y = x2 .
2
5
Download