Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function integrate _ earth ( tmax, d t = 1 e - 3 that returns the trajectory of the Earth, assuming that the
Write a function integrateearth tmax, that returns the trajectory of the Earth, assuming that the Earth only feels the attraction from the Sun.
Produce a trajectory for time tmax in steps of
is an optional argument with default value
Return a numpy array for the coordinates of the earth.
Note: numpy arrays are containers, so if you are changing a numpy array in place with in your code then you need to copy them when appending to your results list, eg
rvalues.appendrcopy
Otherwise you'll find that your list contains times the same three numbers. If you don't use inplace operations then that's not a problem for you, but the copy is still safe.
TEST: year Trajectory
Compute and visualize the trajectory for :
Run integrateearth
Plot the and coordinates.
Label the axes and y AU
Write the figure to the file "orbitearthonly.png
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started