# Homework Help: The Hamiltonian vs. the energy function

1. Nov 26, 2009

### Loxias

1. The problem statement, all variables and given/known data

The mechanics of a system are described by the Lagrangian:
$$L = \frac{1}{2}\dot{x}^2 + \dot{x}t$$

2. Relevant equations

(a) Write the Energy (Jacobi function) for the system.
(b) Show that $$\frac{dh}{dt} \neq \frac{\partial h}{\partial t}$$
(c) Write an expression for the Hamiltonian of the system.
(d) Recall that $$\frac{dH}{dt} = \frac{\partial H}{\partial t}$$ allways.
explain why$$\frac{dH}{dt} = \frac{\partial H}{\partial t}, \frac{dh}{dt} \neq \frac{\partial h}{\partial t}$$ , even though H and h are equal in value.

3. The attempt at a solution

a. $$\frac{\partial L}{\partial \dot{x}} = \dot{x} + t$$
and we get
$$h = \frac{\partial L}{\partial \dot{x}}\dot{x} - L = \frac{1}{2}\dot{x}^2$$

b. $$\frac{\partial h}{\partial t} = 0, \frac{dh}{dt} \dot{x}\ddot{x}$$

c. This is what I don't understand..
They both have the same expression... what is the difference between the two sections..

2. Nov 26, 2009

### jdwood983

Ah, but they don't have the same expression. The Hamiltonian ($H$) is written in terms of the $q$'s and $p$'s, while the pre-Hamiltonian ($h$) is written in terms of $q$'s and $\dot{q}$'s. Because of that little change, there is a difference.

In this case,

$$h(x,\dot{x},t)=\frac{1}{2}\dot{x}^2$$

while

$$H(x,p_x,t)=\frac{1}{2}\left(p_x-t\right)^2$$

where we used the Legendre transform (part a) to get the momentum (recall $p_q=\partial L/\partial\dot{q}$).

3. Nov 27, 2009

### Loxias

Thank you for clarifying this.
Could you elaborate more about what you meant with the legendere transform?

4. Nov 27, 2009

### jdwood983

Sure. The Legendre transform is a mathematical operation that transforms one set of coordinates into another set. In the case of Hamiltonian mechanics, you are turning velocity coordinates ($\dot{q}$) into momentum coordinates ($p$):

[tex]
p_q=\frac{\partial L}{\partial\dot{q}}
[/itex]

5. Nov 30, 2009

Thanks