Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5 . 2 . 3 Gravitational systems The motion of n planets ( P 0 , P 1 , dots, P n - 1 )
Gravitational systems
The motion of planets dots, is governed by the set of first order ODEs
and
where and are the mass, position vector and velocity of the planet respectively. The scalar is the distance between the two planets and The gravitational constant, can be taken equal to without loss of generality.
The twobody problem
Two point particles or two planetary bodies interacting only with each other under Newton's laws of gravitational attraction are well understood and the equation of motion can be integrated analytically. However, here, the trajectories of the two planets will be computed numerically.
Write down, in vector form, the four ODEs governing the motion of the two planets interacting gravitationally. If written in component form, these four equations would give equations.
Write a Python function twobodyx which returns the vector as defined in for the twobody problem. The NumPy array must be of size and its shape must be For the entry corresponds to the first or second planet; corresponds to the position vector or the velocity of the planet considered; and corresponds to the or component of the vector position or velocity You can assume that the masses of the planets, and are defined outside the function twobody.
Consider two planets, and of mass and respectively. At time is at with velocity and is at with velocity The trajectories of the two planets are periodic and remain in the plane. Solve the equations of motion numerically, using your function rk then plot the complete orbits of the two planets.
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