# Rotation Curve of The Solar System



We learned in Module1/BonusChallenge1 about Kepler's laws of planetary motion, and how you can use the known periods and distances of satellites to calculate the mass of the body they are orbiting using Kepler's third law:

\begin{equation}
P^2 = \frac{4 \pi^2}{G \, M} a^3
\end{equation}

Where $M$ is the mass of the central object. Another way to write that equation is in terms of the $speed$ a satellite is traveling around the object they are orbiting:

\begin{equation}
v = \sqrt{\frac{G \, M}{R}}
\end{equation}

Where $G$ is the gravitational constant, $M$ is the mass of the central object, and $R$ is the distance to the satellite. (__Bonus:__ Can you demonstrate this?)

Because velocities are relatively easy to calculate using the $Doppler$ $shift$ of light, it is often convenient to use the latter equation. Let's make a "rotation curve" for the Solar System.

First, let's calculate the expected rotation curve for our Solar System using the equations above. Let's start be defining a function that calculates the expected velocity of a planet in the Solar System at a given radius:


```python
#FILL IN CODE
def velocity(#FILL IN):
    #FILL IN CODE
```

Now create an array of radii that you want to calculate the velocity at. Then, calculate the expected velocities at all of those radii:


```python
# FILL IN CODE
R = # FILL IN CODE

# USE THIS ARRAY AND YOUR VELOCITY FUNCTION TO CALCULATE VELOCITY:

```

Next, let's make a plot of $v$ vs. $R$ for the Solar System. Make sure the axes are labelled properly! Also be sure to check your units throughout.


```python

```

Now that we've done that, let's see how the expected values for the velocities of the planets in our Solar System compare with the actual values. Collect both $v$ and $R$ into lists or arrays below:


```python
#FILL IN CODE
v_planets = # FILL IN CODE
R_planets = # FILL IN CODE
```

Add those values to the plot you created above:


```python

```

How do the actual values compare with the measured values? Hopefully they match well! What do you notice about how the velocity changes with radius?


```python

```

60d76e31ec23bc067c8af304654d548c383b75d9
ipynb
Jupyter Notebook
BonusProblems/Module2/BonusChallenge1.ipynb
psheehan/CIERA-HS-Program
76f7f0ff994e74e646fa34bbb41c314bf7526e9b
Naumen Condor-1.1 MS-PL
2019-06-25T02:36:49.000Z
2020-06-09T21:44:41.000Z
BonusProblems/Module2/BonusChallenge1.ipynb
psheehan/CIERA-HS-Program
76f7f0ff994e74e646fa34bbb41c314bf7526e9b
Naumen Condor-1.1 MS-PL
BonusProblems/Module2/BonusChallenge1.ipynb
psheehan/CIERA-HS-Program
76f7f0ff994e74e646fa34bbb41c314bf7526e9b
Naumen Condor-1.1 MS-PL
2019-06-25T15:33:10.000Z
2021-05-12T18:04:36.000Z
Qwen/Qwen-72B
1. YES
2. YES

