# From Hamiltonian to Lagrangian 1

1. Sep 6, 2008

### malawi_glenn

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

$$H = p_1p_2 + q_1q_2$$

Find the corresponding Lagrangian, $q_i$ are generelized coordinates and
$p_i$ are canonical momenta.

2. Relevant equations

$$H = \dot{q}_ip_i - L$$

$$p_i = \frac{\partial L}{\partial \dot{q}_i}$$

$$\dot{q}_i = \frac{\partial H}{\partial p_i}$$

3. The attempt at a solution

Using these relations, I found:

$$L = \dot{q}_ip_i - H$$

$$L = p_1p_2 + p_2p_1 - p_1p_2 + q_1q_2 = p_1p_2 - q_1q_2 =$$

$$\frac{\partial L}{\partial \dot{q}_1}\frac{\partial L}{\partial \dot{q}_2}-q_1q_2$$

Am I supposed to solve this nasty PDE? Or have I forgot something really fundamental?

Last edited: Sep 6, 2008
2. Sep 6, 2008

### malawi_glenn

I had missed something fundamental, its solved now

3. Sep 6, 2008

### Herbststurm

Hi,

it is only a bagatelle, but if you write the Hamilton function in generel, not for a concret case, then you schould write it like that:

$$\mathcal{H}(q_{1} \ldots q_{s}, p_{1} \ldots p_{s}, t) = \sum\limits_{i=1}^{s} p_{i} \dot{q}_{i} - \mathcal{L}(q_{1} \ldots q_{s}, \dot{q}_{1} \ldots \dot{q}_{s},t)$$

$$& s = 3N-m \text{ with N dimensions and m constraints}$$

all the best

4. Sep 6, 2008

### malawi_glenn

I know, I already listed that eq. under "relevant eq's".

Aslo I have solved the problem, no need to post.

Also, it seems I can't marked this thread as solved in the "old way", why is that?