# Lagrangian is a function of

1. Apr 14, 2014

### astro2cosmos

Lagrangian is a function of ......

Since Lagrangian is a function of q, q dot & time, then why in describing the Hamiltonian (H), L does not involve time explicitly????
as H = (p*q dot) - L (q, q dot).

2. Apr 14, 2014

### Einj

It should. The crucial point is that, if the Lagrangian doesn't depend explicitly on time then the Hamiltonian coincides with the energy of the system. However, H is defined also when L explicitly depends on t.

3. Apr 14, 2014

### fisicist

astro2cosmos, where did you get that equation from? Formally, the Hamiltonian is generated from the Lagrangian by doing a Legendre transform (If you replacy only some of the generalized coordinates by their conjugate momentums, you get a Routh's function, by the way), see Arnol'd or, for a simpler treatment, Landau/Lifshitz; So what should prevent you from treating additional variables? What is true anyway, is

$\frac{\partial \mathcal H}{\partial t} = \frac{\mathrm d \mathcal H}{\mathrm d t}$.

Besides that, in a closed inertial system, time is homogenous.

4. Apr 14, 2014

### fisicist

Forgotten: For any parameter, including time, the following relation is true:

$\left( \frac{\partial \mathcal H}{\partial \lambda} \right)_{p, q} = - \left( \frac{\partial \mathcal L}{\partial \lambda} \right)_{p, q}$

5. Apr 14, 2014

### vanhees71

The Lagrangian and the Hamiltonian both can also be explicitly time dependent. The Lagrangian is a function of $q$, $\dot{q}$, and (sometimes) of time. The Hamiltonian is the Legendre transformation of the Lagrangian wrt. $\dot{q}$ vs. the canonical momentum
$$p=\frac{\partial L}{\partial \dot{q}},$$
i.e.,
$$H=p \cdot \dot{q}-L.$$
The total differential is
$$\mathrm{d} H=\mathrm{d}p \cdot \dot{q} + p \cdot \mathrm{d} \dot{q}-\mathrm{d} q \cdot \frac{\partial L}{\partial q}-\mathrm{d} \dot{q} \cdot \frac{\partial L}{\partial \dot{q}}-\mathrm{d} t \frac{\partial L}{\partial t}=p \cdot \mathrm{d} \dot{q}-\mathrm{d} q \cdot \frac{\partial L}{\partial q}-\mathrm{d} t \frac{\partial L}{\partial t}.$$
From this you read off that the "natural variables" for $H$ are indeed $q$, $p$, and $t$, and that the following relations hold
$$\left (\frac{\partial H}{\partial p} \right)_{q,t}=\dot{q}, \quad \left (\frac{\partial H}{\partial q} \right)_{p,t}=-\left (\frac{\partial L}{\partial q} \right )_{\dot{q},t}, \quad \left (\frac{\partial H}{\partial t} \right )_{q,p}=-\left (\frac{\partial L}{\partial t} \right)_{q,\dot{q}}.$$
It is important to keep in mind that in the latter relations different variables are kept fixed when the partial derivative wrt. to the pertinent variable is taken on both sides of this equation! That's why I put the variables to be hold fixed in the different cases as subscipts of the parantheses around the partial derivative explicitly!

6. Apr 16, 2014

### astro2cosmos

for what condition L is independent of time?????

7. Apr 16, 2014

### UltrafastPED

8. Apr 18, 2014