# PHY321: Classical Mechanics 1

**Solution Homework 9, due Monday  April 5**

Date: **Apr 11, 2021**

### Introduction to homework 9

This week's exercises focus on solving
two-body  problems with central forces. It is based on what you did in hw7 and hw8, see also their respective solutions.

### Exercise 1: Attractive Potential (10pt)

Consider a particle in an attractive potential

$$
U(r)=-\alpha/r.
$$

The quantity $r$ is the absolute value of the relative position. We
will use the reduced mass $\mu$ and the angular momentum $L$, as
discussed during the lectures. With the transformation of a two-body
problem to the center-of-mass frame, the actual equations look like an
*effective* one-body problem. The energy of the system is $E$ and the
minimum of the effective potential is $r_{\rm min}$.

The analytical solution to the radial equation of motion is

$$
r(\phi) = \frac{1}{\frac{\mu\alpha}{L^2}+A\cos{(\phi)}}.
$$

Find the value of $A$. Hint: Use the fact that at $r_{\rm min}$
there is no radial kinetic energy and $E=-\alpha/r_{\rm min}+L^2/2mr_{\rm min}^2$.

At  $r_{\mathrm{min}}$  and $r_{\mathrm{max}}$ , all the kinetic energy is stored in the velocity in the direction perpendicular to $r$  since the radial velocity is set to zero . We can calculate using angular momentum and from there, find  𝐴  in terms of the energy  $E$  which is constant. But first, we need to find $r_{\mathrm{min}}$  from the conservation of energy (noting that the radial velocity $\ddot{r}$ at the mininum is zero):

$$
E = U(r) + \frac{1}{2} \mu(\ddot{r}^2 + (r\ddot{\phi})^2)
\\
E = \frac{-\alpha}{r_{\min}} + \frac{1}{2} \mu\left( \frac{L}{\mu r_{\min}}\right) ^2
\\
E r_{\min}^2 - \frac{1}{2}\mu\left( \frac{L}{\mu}\right) ^2 + \alpha r_{\min} = 0
\\
r_{\min}^2 + \frac{\alpha}{E} r_{\min} - \frac{L^2}{2E\mu} = 0
\\
r_{\min} = - \frac{\alpha}{2E} \pm \frac{1}{2} \sqrt{\frac{\alpha^2}{E^2} + 2\frac{L^2}{E\mu}}
$$

Since we're looking for the minimum, the  ±  sign must be negative (then  𝑟min  will not be negative since  𝐸<0 ). Therefore, we have

$$
\frac{1}{\frac{\mu\alpha}{L^2}+A} = -\frac{\alpha}{2E} - \frac{1}{2} \sqrt{\frac{\alpha^2}{E^2} + 2\frac{L^2}{E\mu}}
\\
A = - \frac{\mu\alpha}{L^2} - \frac{2E}{\alpha + \sqrt{\alpha^2 + 2\frac{L^2E}{\mu}}}
$$

### Exercise 2 (20pt) Inverse-square force

Consider again the same effective potential as in exercise 1. This leads to an attractive inverse-square-law force, $F=-\alpha/r^2$. Consider a particle of mass $m$ with angular momentum $L$. Taylor sections 8.4-8.7 are relevant background material.  See also the harmonic oscillator potential from hw8. The equation of motion for the radial degrees of freedom is (see also hw8) in the center-of-mass frame in two dimensions with $x=r\cos{(\phi)}$ and $y=r\sin{(\phi)}$ and
$r\in [0,\infty)$, $\phi\in [0,2\pi]$ and $r=\sqrt{x^2+y^2}$ are given by

$$
\ddot{r}=-\frac{1}{m}\frac{dV(r)}{dr}+r\dot{\phi}^2,
$$

and

$$
\dot{\phi}=\frac{L}{m r^2}.
$$

Here $V(r)$ is any central force which depends only on the relative coordinate.

* 2a (5pt)  Find the radius of a circular orbit by solving for the position of the minimum of the effective potential.

$$
\begin{equation}
\frac{1}{m}\frac{dV(r)}{dr}  = r\dot{\phi}^2
\label{_auto1} \tag{1}
\end{equation}
$$

$$
\begin{equation}  \frac{1}{m}\left( -\frac{-\alpha}{r^2}\right)   = r \frac{L^2}{m^2r^4}
\label{_auto2} \tag{2}
\end{equation}
$$

$$
\begin{equation}  \frac{\alpha}{mr^2}  = \frac{L^2}{m^2r^3}
\label{_auto3} \tag{3}
\end{equation}
$$

$$
\begin{equation}  r  = \frac{L^2}{m\alpha}
\label{_auto4} \tag{4}
\end{equation}
$$

* 2b (5pt) At the minimum, the radial velocity is zero and it is only the [centripetal velocity](https://en.wikipedia.org/wiki/Centripetal_force) which is nonzero. This implies that $\ddot{r}=0$.  What is the angular frequency, $\dot{\theta}$, of the orbit? Solve this by setting $\ddot{r}=0=F/m+\dot{\theta}^2r$.

$$
\begin{equation}
\dot{\theta}^2 r  = - \frac{F}{m}
\label{_auto5} \tag{5}
\end{equation}
$$

$$
\begin{equation}  \dot{\theta}^2 r  = - \frac{-\frac{\alpha}{r^2}}{m}
\label{_auto6} \tag{6}
\end{equation}
$$

$$
\begin{equation}  \dot{\theta}^2  = \frac{\alpha}{mr^3}
\label{_auto7} \tag{7}
\end{equation}
$$

$$
\begin{equation}  \dot{\theta}  = \pm \sqrt{\frac{\alpha}{mr^3}}
\label{_auto8} \tag{8}
\end{equation}
$$

$$
\begin{equation}  \dot{\theta}  = \pm \sqrt{\frac{\alpha}{m\frac{L^6}{m^3\alpha^3}}}
\label{_auto9} \tag{9}
\end{equation}
$$

$$
\begin{equation}  \dot{\theta}  = \pm \sqrt{\frac{\alpha^4m^2}{L^6}}
\label{_auto10} \tag{10}
\end{equation}
$$

$$
\begin{equation}  \dot{\theta}  = \pm \frac{\alpha^2m}{L^3}
\label{_auto11} \tag{11}
\end{equation}
$$

* 2c (5pt) Find the effective spring constant for the particle at the minimum.

We have shown in class that from the taylor expansion, we have

$$
k = \frac{d^2V_{\text{eff}}}{dr^2}
$$

Therefore, all we have to do is find the second derivative of $V_{\text{eff}}$ around the minimum point of $V_{\text{eff}}$ where $\dot{r} = \ddot{r} = 0$.

$$
\begin{equation}
k  = \frac{d^2V_{\text{eff}}}{dr^2}
\label{_auto12} \tag{12}
\end{equation}
$$

$$
\begin{equation}   = \frac{d^2\left( -\frac{\alpha}{r} + \frac{1}{2} \frac{L^2}{mr^2}\right) }{dr^2}
\label{_auto13} \tag{13}
\end{equation}
$$

$$
\begin{equation}   = -\frac{2\alpha}{r^3} + \frac{3L^2}{mr^4}
\label{_auto14} \tag{14}
\end{equation}
$$

$$
\begin{equation}   = -\frac{2\alpha}{\frac{L^6}{m^3\alpha^3}} + \frac{3L^2}{m\frac{L^8}{m^4\alpha^4}}
\label{_auto15} \tag{15}
\end{equation}
$$

$$
\begin{equation}   = -\frac{2m^3\alpha^4}{L^6} + \frac{3m^3\alpha^4}{L^6}
\label{_auto16} \tag{16}
\end{equation}
$$

$$
\begin{equation}   = \frac{m^3\alpha^4}{L^6}
\label{_auto17} \tag{17}
\end{equation}
$$

* 2d (5pt) What is the angular frequency for small vibrations about the minimum? How does this compare with the answer to (3b)?

For small deviations $\delta r$ of $r$,

$$
m\frac{d^2\left(  \delta r \right) }{dt^2} = -k \delta r
$$

The solution of this differential equation is of the form

$$
\delta r = A \cos(\omega t + \phi)
$$

where

$$
\begin{equation}
\omega =  \sqrt{\frac{k}{m}}
\label{_auto18} \tag{18}
\end{equation}
$$

$$
\begin{equation}   = \sqrt{\frac{m^2\alpha^4}{L^6}}
\label{_auto19} \tag{19}
\end{equation}
$$

$$
\begin{equation}   = \frac{m\alpha^2}{L^3}
\label{_auto20} \tag{20}
\end{equation}
$$

This is in fact equal to the expression for $\dot{\theta}$. This means that small perturbations oscillate in sync with the orbit and this traces out an ellipse with a very small eccentricity, a very nice physical result.

### Exercise 3, Inverse-square force again (10pt)

Consider again a  particle of mass $m$ in the same attractive potential, $U(r)=-\alpha/r$, with angular momentum $L$ with just the right energy so that

$$
A=m\alpha/L^2
$$

where $A$ comes from the expression

$$
r=\frac{1}{(m\alpha/L^2)+A\cos{(\phi)}}.
$$

The trajectory can then be rewritten as

$$
r=\frac{2r_0}{1+\cos\theta},~~~r_0=\frac{L^2}{2m\alpha}.
$$

* 3a (5pt) Show that for this case the total energy $E$ approaches zero.

$$
\begin{equation}
E  = - \frac{\alpha}{r} + \frac{1}{2} m \left(  (\dot{\theta}r)^2+\dot{r}^2\right)
\label{_auto21} \tag{21}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{r} + \frac{1}{2} m \left[  \left( \frac{L}{mr^2}r\right) ^2+\left( \frac{dr}{d\theta}\dot{\theta}\right) ^2\right]
\label{_auto22} \tag{22}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) + \frac{1}{2} m \left[  \left( \frac{L(1+\cos\theta)}{2mr_0}\right) ^2+\left( 2r_0\frac{-1}{(1+\cos\theta)^2}(-\sin\theta)\frac{L}{mr^2}\right) ^2\right]
\label{_auto23} \tag{23}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) + \frac{1}{2} m \left[  \left( \frac{L(1+\cos\theta)}{2mr_0}\right) ^2+\left( 2r_0\frac{-1}{(1+\cos\theta)^2}(-\sin\theta)\frac{L(1+\cos\theta)^2}{4mr_0^2}\right) ^2\right]
\label{_auto24} \tag{24}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) +
\frac{1}{2} m \left[  \left( \frac{L(1+\cos\theta)}{2mr_0}\right) ^2+\left( \sin\theta\frac{L}{2mr_0}\right) ^2\right]
\label{_auto25} \tag{25}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) +
\frac{1}{2} m \left[  \left( \frac{L(1+\cos\theta)}{2mr_0}\right) ^2+\left( \sin\theta\frac{L}{2mr_0}\right) ^2\right]
\label{_auto26} \tag{26}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) +
\frac{1}{2} m \frac{L^2}{4m^2r_0^2} \left[  \left( 1+\cos\theta\right) ^2+\left( \sin\theta\right) ^2\right]
\label{_auto27} \tag{27}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) +
\frac{1}{2} \frac{L^2}{4mr_0^2} \left(  1 + \cos^2\theta + 2\cos \theta + \sin^2\theta\right)
\label{_auto28} \tag{28}
\end{equation}
$$

$$
\begin{equation}   = - \frac{\alpha}{2r_0}(1+\cos\theta) +
\frac{1}{2} \frac{L^2}{4mr_0^2} \left(  2 + 2\cos \theta \right)
\label{_auto29} \tag{29}
\end{equation}
$$

$$
\begin{equation}   = (1+\cos\theta) \left( - \frac{\alpha}{2r_0} + \frac{L^2}{4mr_0^2}\right)
\label{_auto30} \tag{30}
\end{equation}
$$

$$
\begin{equation}   = (1+\cos\theta) \left( - \frac{\alpha}{2\frac{L^2}{2m\alpha}} + \frac{L^2}{4m\frac{L^4}{4m^2\alpha^2}}\right)
\label{_auto31} \tag{31}
\end{equation}
$$

$$
\begin{equation}   = (1+\cos\theta) \left( - \frac{m\alpha^2}{L^2} + \frac{m\alpha^2}{L^2}\right)
\label{_auto32} \tag{32}
\end{equation}
$$

$$
\begin{equation}   = 0
\label{_auto33} \tag{33}
\end{equation}
$$

* 3b (5pt) With zero energy $E=0$, write this trajectory in a more recognizable parabolic form, that is express $x_0$ and $R$ in terms of $r_0$ using

$$
x=x_0-\frac{y^2}{R}.
$$

We have that

$$
\begin{equation}
x  = r \cos\theta
\label{_auto34} \tag{34}
\end{equation}
$$

$$
\begin{equation}
y  = r \sin \theta.
\label{_auto35} \tag{35}
\end{equation}
$$

Using the general solution with eccintricity $\epsilon=1$, we have

$$
r(\theta)=\frac{c}{1+\cos\theta},
$$

and multiplying both sides with $1+\cos\theta$ and using that $x=r\cos\theta$,

$$
r = c -x,
$$

and using that $r^2=x^2+y^2$, we square both sides

$$
r^2 = x^2+y^2=c^2 +x^2-2cx,
$$

leading to

$$
y^2=c^2-2cx,
$$

and using that we defined

$$
c=2r_0=\frac{L^2}{m\alpha},
$$

we divide by $2c$
and we get the final answer

$$
x = r_0 - \frac{y^2}{4r_0}
$$

### Exercise 4, parabolic and hyperbolic orbits (10pt)

The solution to the radial function for an inverse-square-law force, see for example Taylor equation (8.59) or the equation above, is

$$
r(\phi) = \frac{c}{1+\epsilon\cos{(\phi)}}.
$$

For $\epsilon=1$ (or the energy $E=0$) the orbit reduces to a parabola as we saw in the previous exercise,
while for $\epsilon > 1$ (or energy positive) the orbit becomes a hyperbola. The equation for a hyperbola in Cartesian coordinates is

$$
\frac{(x-\delta)^2}{\alpha^2}-\frac{y^2}{\beta^2}=1.
$$

For a hyperbola, identify the constants $\alpha$, $\beta$ and $\delta$ in terms of the constants $c$ and $\epsilon$ for $r(\phi)$.

$$
\begin{equation}
x  = r\cos\phi
\label{_auto36} \tag{36}
\end{equation}
$$

$$
\begin{equation}   = \frac{c\cos\phi}{1+\epsilon\cos\phi}
\label{_auto37} \tag{37}
\end{equation}
$$

$$
\begin{equation}
y  = r\sin\phi
\label{_auto38} \tag{38}
\end{equation}
$$

$$
\begin{equation}   = \frac{c\sin\phi}{1+\epsilon\cos\phi}
\label{_auto39} \tag{39}
\end{equation}
$$

Here $\epsilon>1$.  We use our equation for $r$, multiply with the denominator $1+\epsilon\cos\phi$ on both sides and have

$$
r(1+\epsilon\cos\phi)=c,
$$

use $x=r\cos\phi$ and square and use that $r^2=x^2+y^2$ and we have

$$
r^2=x^2+y^2=c^2+\epsilon^2x^2-2cx\epsilon,
$$

and reorder

$$
x^2(\epsilon^2-1)-y^2-2cx\epsilon= -c^2.
$$

We complete the square in $x$ by adding and subtracting on both sides $\epsilon^2c^2/(\epsilon^2-1)$
and we obtain

$$
(\epsilon^2-1)(x-\delta)^2-y^2= -c^2+\frac{\epsilon^2c^2}{\epsilon^2-1}.
$$

Here we have defined

$$
\delta = \frac{c\epsilon}{\epsilon^2-1},
$$

and introducing the constants

$$
\alpha = \frac{c}{\epsilon^2-1},
$$

and

$$
\beta = \frac{c}{\sqrt{\epsilon^2-1}},
$$

we can rewrite the above equation as

$$
\frac{(x-\delta)^2}{\alpha^2}-\frac{y^2}{\beta^2}=1,
$$

which is nothing but the equation for a hyperbola.

### Exercise 5, Testing orbit types (50 pt)

In this exercise we can use the program for $r(\phi)$ we developed in hw8. We will use an inverse-square-law force as in exercises 1, 2, 3 and 4. The aim is to see that the orbits we get for $E<0$ become ellipses (or circles), parabola for $E=0$ and hyperbola for $E>0$.  An example code is shown here.

Here we have defined the constants $L=m=\alpha=1$. Feel free to set new values. **You need also to set the initial conditions** in order to study the different types of orbits. It may be useful to plot the potential here and find the values for the initial conditions that fit $E<0$, $E=0$ and $E>0$.

```python
%matplotlib inline

# Common imports
import numpy as np
import pandas as pd
from math import *
import matplotlib.pyplot as plt
# Simple Gravitational Force   -alpha/r

DeltaT = 0.01
#set up arrays
tfinal = 100.0
n = ceil(tfinal/DeltaT)
# set up arrays for t, v and r
t = np.zeros(n)
v = np.zeros(n)
r = np.zeros(n)
# Constants of the model, setting all variables to one for simplicity
alpha = 1.0
AngMom = 1.0  #  The angular momentum
m = 1.0  # scale mass to one
c1 = AngMom*AngMom/(m*m)
c2 = AngMom*AngMom/m
# You need to specify the initial conditions
# Here we have chosen the conditions which lead to circular orbit and thereby a constant r
r0 = (AngMom*AngMom/m/alpha)
v0 = 0.0
r[0] = r0
v[0] = v0
# Start integrating using the Velocity-Verlet  method
for i in range(n-1):
    # Set up acceleration
    a = -alpha/(r[i]**2)+c1/(r[i]**3)
    # update velocity, time and position using the Velocity-Verlet method
    r[i+1] = r[i] + DeltaT*v[i]+0.5*(DeltaT**2)*a
    anew = -alpha/(r[i+1]**2)+c1/(r[i+1]**3)
    v[i+1] = v[i] + 0.5*DeltaT*(a+anew)
    t[i+1] = t[i] + DeltaT
    # Plot position as function of time
fig, ax = plt.subplots(2,1)
ax[0].set_xlabel('time')
ax[0].set_ylabel('radius')
ax[0].plot(t,r)
ax[1].set_xlabel('time')
ax[1].set_ylabel('Velocity')
ax[1].plot(t,v)

plt.show()
```

Run your code and study and discuss the situations where you have
elliptical, parabolic and hyperbolic orbits. Discuss the physics of
these cases. The results from exercises 1, 2, 3 and 4 may be useful
here.  In the code here we have chosen initial conditions which correspond to circular motion.
This corresponds to

$$
r_{\mathrm{min}} = \frac{L^2}{m\alpha}.
$$

Note well that the velocity is now the radial velocity. If we want to study the angular velocity we would need to add the equations for this quantity. The solution to exercises 1-4 give you the minimum $r$ values needed to find the elliptical, parabolic and hyperbolic orbits. For elliptical orbits you should have  $\frac{L^2}{2m\alpha} < r_{\mathrm{min}} <\frac{L^2}{m\alpha}$. For parabolic orbits $r_{\mathrm{min}} =\frac{L^2}{m\alpha}$ and for hyperbolic orbits we have $0<r_{\mathrm{min}} <\frac{L^2}{m\alpha}$. Try out these different initial conditions in order to test these different types of motion.

### Additional Bonus Exercise (10pt)

You don't need to do this exercise, but it gives you a bonus score of 10 points.

This time the additional bonus exercise is a simple survey. We are now moving
into our last month  and we would very much have your feedback on how
things are functioning so that we can improve and correct.

* Is the weekly load with paper and pencil exercises and the numerical exercises reasonable?

* Is there enough material (lectures and lecture material) to get you started with the exercises?  We are thinking of both the paper and pencil and the numerical exercises?

* Is the pace during the lectures reasonable? And do the lectures link well with the exercises?

* In the beginning there will always be some elements of repetition of material many of you have seen before. Do you find the choice of material the first 4 weeks adequate? Too easy? Too difficult?

* For those of you who have taken CMSE 201 Introduction to Computational Modeling, do you feel the material taught there links well with the exercises you have done in this course? Is there is something we are missing?

* Any other topic you would like to comment on?

### Classical Mechanics Extra Credit Assignment: Scientific Writing and attending Talks

The following gives you an opportunity to earn **five extra credit
points** on each of the remaining homeworks and **ten extra credit points**
on the midterms and finals.  This assignment also covers an aspect of
the scientific process that is not taught in most undergraduate
programs: scientific writing.  Writing scientific reports is how
scientist communicate their results to the rest of the field.  Knowing
how to assemble a well written scientific report will greatly benefit
you in you upper level classes, in graduate school, and in the work
place.

The full information on extra credits is found at <https://github.com/mhjensen/Physics321/blob/master/doc/Homeworks/ExtraCredits/>. There you will also find examples on how to write a scientific article.
Below you can also find a description on how to gain extra credits by attending scientific talks.

This assignment allows you to gain extra credit points by practicing
your scientific writing.  For each of the remaining homeworks you can
submit the specified section of a scientific report (written about the
numerical aspect of the homework) for five extra credit points on the
assignment.  For the two midterms and the final, submitting a full
scientific report covering the numerical analysis problem will be
worth ten extra points.  For credit the grader must be able to tell
that you put effort into the assignment (i.e. well written, well
formatted, etc.).  If you are unfamiliar with writing scientific
reports, [see the information here](https://github.com/mhjensen/Physics321/blob/master/doc/Homeworks/ExtraCredits/IntroductionScientificWriting.md)

The following table explains what aspect of a scientific report is due
with which homework.  You can submit the assignment in any format you
like, in the same document as your homework, or in a different one.
Remember to cite any external references you use and include a
reference list.  There are no length requirements, but make sure what
you turn in is complete and through.  If you have any questions,
please contact Julie Butler at butler@frib.msu.edu.

  HW/Project 	 Due Date	 Extra Credit Assignment

   HW 3             	    2-8         	    Abstract

   HW 4             	    2-15        	    Introduction

   HW 5             	    2-22        	    Methods

   HW 6             	    3-1         	    Results and Discussion

   **Midterm 1**    	    **3-12**    	    *Full Written Report*

   HW 7             	    3-22        	    Abstract

   HW 8             	    3-29        	    Introduction

   HW 9             	    4-5         	    Results and Discussion

   **Midterm 2**    	    **4-16**    	    *Full Written Report*

   HW 10            	    4-26        	    Abstract

   **Final**        	    **4-30**    	    *Full Written Report*

You can also gain extra credits if you attend scientific talks.
This is described here.

### Integrating Classwork With Research

This opportunity will allow you to earn up to 5 extra credit points on a Homework per week. These points can push you above 100% or help make up for missed exercises.
In order to earn all points you must:

1. Attend an MSU research talk (recommended research oriented Clubs is  provided below)

2. Summarize the talk using at least 150 words

3. Turn in the summary along with your Homework.

Approved talks:
Talks given by researchers through the following clubs:
* Research and Idea Sharing Enterprise (RAISE): Meets Wednesday Nights Society for Physics Students (SPS): Meets Monday Nights

* Astronomy Club: Meets Monday Nights

* Facility For Rare Isotope Beam (FRIB) Seminars: Occur multiple times a week

If you have any questions please consult Jeremy Rebenstock, rebensto@msu.edu.

All the material on extra credits is at <https://github.com/mhjensen/Physics321/blob/master/doc/Homeworks/ExtraCredits/>.