# Lagrangian mechanics

1. Mar 4, 2006

### stunner5000pt

The Lagrangian of a aprticle of charge q and mass m is given by
$$L = \frac{1}{2} m \dot{r}^2 - q \phi(r,t) + \frac{q}{c} r \bullet A(r,t)$$

a) determine the Hamiltonain function H(r,p) (in terms of r and its conjugate momentum p) and explain waht conditions the electric and mangetic field intensities
$$E = - \frac{\partial \phi}{\partial r} - \frac{1}{c} \frac{\partial A}{\partial t}$$
$$B = \frac{\partial}{\partial r} \times A$$
must satisfy if the Hamiltonain is to be a constant of motion

I am not sure if the Hamiltonian is
$$H = \dot{r} \frac{\partial L}{\partial \dot{r}} -L$$
OR $$H = r \frac{\partial L}{\partial r} -L$$
$$\dot{r} \frac{\partial L}{\partial \dot{r}} = m \dot{r}^2 + \frac{q}{c} \dot{r} \bullet A(r,t)$$

$$H = \dot{r} \frac{\partial L}{\partial \dot{r}} -L = m \dot{r}^2 + \frac{q}{c} \dot{r} \bullet A(r,t) - \frac{1}{2} m \dot{r}^2 - q \phi(r,t) + \frac{q}{c} r \bullet A(r,t)$$
$$H = \frac{1}{2} m\dot{r}^2 + q \phi(r,t)$$
$$H(r,p) = \frac{1}{2} p \dot{r} + q \phi(r,t)$$

for H to be a constant of motion, then dh/dt = 0 ,yes?

$$\frac{dH}{dt} = \frac{1}{2} \dot{p} \dot{r} + \frac{1}{2} p \ddot{r} + q \frac{\partial \phi}{\partial t}$$ (not sure about the last term)
$$\frac{dH}{dt} = F \frac{\dot{r}}{2} + p \frac{\ddot{r}}{2} + q \frac{\partial \phi}{\partial t}$$

im not sure how the E and B field come into play because none of their terms appear in the equation for dH/dt

b) Work out Hamilton's equations of motion for this system (i.e. the first order equations of r(t),p(t)), and show taht htey are equivalent to the second order Euler Lagrange equation for this system.

I am currently on this...

Last edited: Mar 4, 2006
2. Mar 4, 2006

### StatusX

It is a general result in Hamiltonian mechanics that the total derivative with respect to time of the Hamiltonian is just the negative of the partial derivative with respect to time of the Lagrangian. This can be shown by taking the derivative of H, and then plugging in the definitions of p and the Lagrangian equations of motion.

3. Mar 4, 2006

### Physics Monkey

Hi stunner,

1) The Hamiltonian is always given by $$H = \dot{q} \frac{\partial L}{\partial \dot{q}} - L = p \dot{q} - L$$ for a single coordinate $$q$$. If you have more than one coordinate then you generalize to $$H = \sum_i \dot{q}_i p_i - L$$ where as always the definition of the canonical momentum is $$p_i = \frac{\partial L}{\partial \dot{q}_i}$$.

2) The Hamiltonian is constant provided the Lagrangian contains no explicit time dependence. This fact is probably proved in your book somewhere, but it is easy to get if you just use the equations of motion. What does this requirement translate into when you include electric and magnetic fields?

3) Hamilton's equations of motion are first order differential equations while Lagrange's equations are second order. Schematically you have $$\dot{q} = \frac{\partial H}{\partial p}$$ and $$\dot{p} = - \frac{\partial H}{\partial q}$$. Hint: differentiate the first equation with respect to time.

4. Mar 5, 2006

### stunner5000pt

i dont think im interpreting this right

text says that the hamilton (for this problem) is usually not time dependant since dL/dt is not zero. (unless phi, A are not explicitly time dependant)

so then if we look at hte Elefctric field... since A is not explicitly time dependant, then E should be
$$E = - \frac{\partial \phi}{\partial r}$$

also i m taking from from StatusX said taht $$- \frac{dH}{dt} = - m \dot{r} \ddot{r} - q \frac{\partial \phi}{\partial r}\frac{\partial r}{\partial t} - q \frac{\partial \phi}{\partial t}$$

and this shouldbe equal to
$$\frac{dL}{dt} = m \dot{r} \ddot{r} - q \frac{\partial \phi}{\partial r}\frac{\partial r}{\partial t} - q \frac{\partial \phi}{\partial t}+ \frac{q}{c} \frac{\partial r}{\partial t} + \frac{q}{c} \frac{\partial A}{\partial r} \frac{\partial r}{\partial t} + \frac{q}{c} \frac{\partial A}{\partial t}$$

so then these terms should e zero
$$m \dot{r} \ddot{r} - q \frac{\partial \phi}{\partial r}\frac{\partial r}{\partial t} - q \frac{\partial \phi}{\partial t}$$

so r shouldnt be time dependant?? And A shouldnt be time dependant?

Last edited: Mar 5, 2006
5. Mar 5, 2006

### Physics Monkey

I think you may be confused so let me repeat the correct fomulation. If the Lagrangian contains no explicit time dependence $$\partial L/ \partial t = 0$$ (not $$d L/ dt = 0$$ !) then the Hamiltonian is time independent $$dH/dt = 0$$.

6. Mar 6, 2006

### dextercioby

Actually the particle's generalized coordinates are x,y,z and of course everything needs to be adapted.

Daniel.

7. Mar 6, 2006

### stunner5000pt

ok ok
so the Hamilton is
$$H(r,p) = \frac{p^2}{2m} + q \phi(r,t)$$
$$\frac{\partial H}{\partial t} = \frac{p}{m} \dot{p} + q \frac{\partial \phi}{\partial t}$$

for the Lagrangian
$$\frac{\partial L}{\partial t} = \frac{p}{m} \dot{p} - q \frac{\partial \phi}{\partial t} + \frac{q}{c} \dot{r} A + \frac{q}{c} r \frac{\partial A}{\partial t}$$

ok so then in order for dl/dt = - dh/dt then r and A need to be constant wrt time.
so that $$E = -\frac{\parital \phi}{\partial r}$$
and $$B = \frac{\partial}{\partial r} \times A$$

for the B part
$$\dot{r} = \frac{\partial H}{\partial p} = \frac{p}{m}$$
so then $$p = m \dot{r}$$
$$r(t) = \frac{p}{m} t + r_{0}$$

$$\dot{p} = -\frac{\partial H}{\partial r} = - q \frac{\partial \phi}{\partial r}$$
not sure how to do this part ...

Last edited: Mar 6, 2006
8. Mar 7, 2006

### dextercioby

If $H\left(q^{i},p_{i},t\right)$ is given by

$$H=\frac{1}{2m}\left(p_{x}^{2}+p_{y}^{2}+p_{z}^{2}\right) +q\varphi \left(x,y,z,t\right) -\frac{q}{c}\left(x A_{x}(x,y,z,t)+y A_{y}(x,y,z,t)+z A_{z}(x,y,z,t)\right)$$

what is

$$\frac{dH}{dt}$$

equal to?

HINT: Use Hamilton's equations of motion.

Daniel.

9. Mar 7, 2006

### stunner5000pt

illl do it for the x and t only
but isnt what u wroteh texpression for hte Lagrangian and not hte Hamiltonian?
isnt hte hamilton $$H = \frac{p^2}{2m}+ q \phi(r,t)$$

$$\frac{dH_{x}}{dt} = \frac{p_{x}\dot{p_{x}}}{m} + q \frac{\partial \phi}{\partial x} \frac{\partial x}{\parital t} + q \frac{\partial \phi}{\partial t} - \frac{q}{c} \dot{x}A - \frac{q}{c} x \frac{\partial A}{\partial x} \frac{\partial x}{\partial t} - \frac{\partial A}{\partial t}$$

but i dont hink i need the totla derivative... in my text it says if the partial of H wrt time is equal to the negative of the partial of L wrt time are equal then H is constnat

its quite clear that A sohuld be indepednant on time and that the variables of motion x,y,z should be independnt of time as well

Last edited: Mar 7, 2006
10. Mar 7, 2006

### stunner5000pt

is this fine?

how do i solve for the hamiltonian equations of motion, however?

11. Mar 8, 2006

### dextercioby

Hamilton's equations are

$$\dot{q}^{i}\left(t\right)=\frac{\partial H}{\partial p_{i}}$$

$$\dot{p}_{i}\left(t\right)=-\frac{\partial H}{\partial q^{i}}$$

U can compute them quite easily using the Hamiltonian's expression written above.

As for

$$\frac{dH}{dt}=\frac{\partial H}{\partial t} + \frac{\partial H}{\partial q^{i}} \dot {q}^{i} +\frac{\partial H}{\partial p_{i}} \dot{p}_{i} =0$$

i'm sure you know how to compute each term of the equation above...

Daniel.