# Find Hamiltonian given Force

## Homework Statement

A particle with mass, m, is subject to an attractive force.

\vec{F}(r,t) = \hat{e}_r \frac{k}{r^2}e^{-\beta t}

Find the Hamitonian of the particle

## Homework Equations

H = T + U
Where T is the kinetic energy and U is the potential

H = p_i \dot{q}_i - L

## The Attempt at a Solution

\begin{split}
F - \nabla (U) \\
F_r = \frac{\partial U}{\partial r} \\
U (r) = \int F(r) dr \\
U(r) = ke^{-\beta t} \int \frac{1}{r^2} dr \\
U(r) = - \frac{ke^{-\beta t}}{r}
\end{split}

L = \frac{d}{dt}(\frac{\partial L)}{\partial \dot{r}} - \frac{\partial L}{\partial r} = m \ddot{r} - 2r\dot{\phi}^2 + \frac{\partial U}{\partial r}

T = \frac{1}{2}m(\dot{r}^2 + r^2\dot{\phi}^2)

Given the following:

\begin{split}
p_r = \frac{\partial T}{\partial \dot{r}} = m\dot{r} \\
p_\phi = \frac{\partial T}{\partial \dot{\phi}} = mr^2\dot{\phi}
\end{split}

Thus,

\begin{split}
H = T + U \\
H = \frac{1}{2m} (p_r^2+\frac{p_\phi}{r^2}) + U(r) \\
\end{split}

Therefore having

H = \frac{1}{2m} [(m\dot{r})^2 + m^2r^2\dot{\phi}^2] + (- \frac{ke^{-\beta t}}{r})