Physics+ Hamiltonian General: UNIZOR.COM - Physics+ 4 All -Hamiltonian
Watch on YouTubeVideo summary
The video introduces a generalized approach to the Hamiltonian formalism within the Physics Plus course on UniZohr.com, aiming to extend concepts beyond simple mechanical systems where Lagrangians are strictly defined as kinetic energy minus potential energy. The presenter begins by reviewing previous lectures that established the Euler-Lagrange equations and introduced generalized momentum, leading to a system of first-order differential equations involving coordinates ($Q$) and momenta ($P$). While this formulation is elegant for standard problems relying on $L = T - U$, it becomes insufficient when dealing with broader theoretical contexts where such specific energy definitions do not hold. Consequently, the lecture focuses on deriving a universal expression for the Hamiltonian that depends solely on coordinates, generalized momenta, and time, without assuming any particular relationship between kinetic or potential energies.
To achieve this generalization, the presenter employs a method of derivation based on simple cases rather than pure guessing, ensuring the resulting formula is robust enough to apply universally. Starting from the classical definition where total energy $H$ equals $T + U$, and knowing that Lagrangian $L = T - U$, one can algebraically manipulate these terms to express $2T$ as $P \cdot Q_{\text{dot}}$. By substituting this into the expression for total energy, a candidate formula emerges: $H = \sum P_i Q_i^{\text{dot}} - L$. Crucially, in this generalized framework, velocity ($Q_{\text{dot}}$) is treated not merely as a function of momentum but as an independent variable dependent on all coordinates and momenta simultaneously. This abstraction allows the derivation to remain valid even when complex dependencies exist between variables that would simplify away in elementary physics problems.
The validity of this generalized Hamiltonian formula is rigorously tested by verifying whether it satisfies both canonical equations: $\frac{\partial H}{\partial P_i} = Q_i^{\text{dot}}$ and $\frac{\partial H}{\partial Q_i} = -P_i^{\text{dot}}$. Through careful application of the chain rule, the presenter demonstrates that differentiating the proposed $H$ with respect to momentum yields the velocity term directly. When differentiated with respect to coordinates, the resulting expression simplifies using the definition of generalized momentum and ultimately reduces to the Euler-Lagrange equation itself. This bidirectional proof confirms that if Hamiltonian equations are satisfied, the original Euler-Lagrange equations must also hold true, establishing a complete mathematical equivalence between the two formalisms regardless of whether $L$ represents kinetic minus potential energy or any other function satisfying the necessary differential conditions.
Read the full video transcript
Hi, I'm Zohr. Welcome to UniZohr
Education.
So, we continue talking about
Hamiltonian.
Previous lecture was an introduction.
And today, I will try to generalize
basically whatever the ideas were
presented.
And that's why it's called general
Hamiltonian.
Now, this lecture is part of the course
called Physics Plus. It's presented on
unizohr.com.
The website is totally free. There is no
subscription needs, no advertisement,
uh
no sign-in is necessary.
Um so, basically, it's all available for
free for everybody
without any kind of
advertisement interruptions, et cetera.
Pure knowledge for your consumption.
Okay. Now,
uh every lecture has
uh video and uh text uh presentation.
And the text is basically like a
textbook.
So, you can learn the theory from the
notes for this lecture
and the video
uh in any sequence. And I do recommend
you to approach any kind of a lecture
from both sides.
First, you can um
watch the video presentation, then you
can uh read the textual part of it on
the same page, basically.
Or in any other sequence. It's all
all for good.
Now, back to
uh Hamiltonian.
Now, very, very brief
um repetition of what was in the
previous lecture.
First, we started with Euler-Lagrange
equation, which is
the L by
uh
it's supposed to be a partial
derivative.
By d q i is equal to
derivative. This is a full time
derivative
of partial derivative by
velocity.
Then we introduced actually by
definition
the generalized momentum which is
d l by d
q i
which actually
allowed to
rewrite basically this since this is now
p i and
full derivative by time
usually we um
symbolize with a dot
on the front
on the top. So the whole thing looks
like d l by d q i
is equal to
p i dot.
Right? This is
p i
the
generalized momentum and derivative by
time is this dot.
Very nice.
However, we have introduced
one more variable which is generalized
momentum
but the number of equations is only n.
So we have two n variables and um
uh
only n equations.
So we proceeded further in the previous
lecture and we found out that
considering the Lagrangian is equal to
kinetic minus potential energy
we have introduced function h which is
Hamiltonian which is
sum of these two which is full energy of
the system
and we came to another
um set of equations.
One equation was like this.
And another equation was like this.
The only thing is was a minus sign here
because it's the
minus U. Yeah, T minus U L.
So, uh in this case it's Q
I
derivative. Now, now these are two N
equations
with two N independent variables Q and P
coordinates and momentum.
And that basically seems to be a nicer
system of equations than the one
which is
this one. This is the second order
differential equation. These are first
order. So, we increase the number of
variables, but we have decreased the
complexity of each equation.
Plus it looks much better.
Okay. So, that was the last lecture.
It heavily dependent on this.
How Lagrangian is represented
as a as as a difference between kinetic
and potential energy. And then we have
total energy of the system and then we
derived all these equations. So, from
this
and this
we have derived this new system of
equations.
Fine. But again, we heavily dependent on
this. And this is not necessarily true.
I mean, it's true for most of the simple
mechanical systems, but whenever we want
to, you know, use this in much broader
um
uh, um,
uh
much much broader number of problems,
uh, theories, etc.
And and we do, and we will.
This is not applicable anymore.
Now, let's not get into why it's not
applicable and what are those systems
where it's not exactly true.
But,
just trust me that
the derivative
uh, der- derivation of these equations
was extremely
helpful in those new cases when this is
not true. So, my purpose today is to
generalize these things
in such a way that it does not depend on
the fact that H is actually Hamiltonian
is actually a full energy of the system
and the Lagrangian is looking as a
kinetic minus potential energy.
So, I would like to generalize this
thing and still come up with something
like this where H is something which is
related to the Lagrangian, related to
um,
coordinates and um, momenta
and momenta
without relying on the specific way how
Lagrangian and Hamiltonian look.
So, let's assume that we have a general
system with some kind of a Lagrangian,
but we would still
like to to come up with this and express
H in terms of Lagrangian, coordinates
and momenta.
So, that's my my task for today.
All right, but how can I
basically,
you know
approach this thing? Well, I don't know
the way a
function H actually look. All I know
that I have to have Lagrangian, I have
to have
all the
coordinates and all the momenta and
somehow I have to mix them together
to get this function H, which will
um
with these equations being true,
actually.
Um
and obviously using the fact that
Lagrangian and uh
uh coordinates and their derivatives
satisfy the Euler-Lagrange uh equation.
So, that's the general understanding of
the whole thing. We we completely
put our problem um
from another actual angle. We we
approach our problem. That consider we
have some Lagrangian which
has
uh the Euler-Lagrange equation
satisfied.
And the Q and P, where P is defined like
this. So, this is it. I'm not really
assuming
this.
This is not given.
What's given is this.
And I have to prove
that this is true for some kind of a
function H, which I might must guess, if
you speak.
Well, guessing is actually kind of easy.
And here is why.
Um
let's basically talk about
my assumption that L is equal to T minus
U.
And try to
uh express H which is T plus U
in such a way that it does not really
depend on T and U, but it depends on
Lagrangian and
uh coordinates and momenta. So, I have
to somehow convert this into a different
form, which is not really dependent on T
and U.
And if I will be able to do this,
it would be a good candidate for H
function
in the general case. And then what I
will have to do is I'll just check if
the function which I have guessed from
from the previous assumptions
um if I was able to
express H in terms of L, Q, and P and
this new H is satisfied these equations,
then my task actually is solved. So, I
do not present you, "Okay, H is equal to
this."
and present it as a function. I would
like to first have it
derived from whatever I know from the
some particular case
from a simple case and then I will check
if it fits the general case.
Now, it will fit, obviously.
So, how can I do that? Well, it's
actually simple.
Here it is.
How can I express H, which is T plus U
in terms of Lagrangian? Well, Lagrangian
is T minus U.
So, my I can actually put it 2 T minus
Lagrangian.
Right? 2 T minus T and plus U would be T
plus U.
That's simple, right?
Now, I have to express the kinetic
energy in terms of
of basically Q and and PI.
Well, this is actually not very
difficult because again in my very
simple
formula for kinetic energy, it's
uh sum of mass times speed square,
right?
Now, the speed square is actually
uh can be expressed somehow differently.
This is MI times VI, which is PI, right?
What's the momentum in classical
physics? Mass times velocity.
times
you know, one more velocity. We have a
square here. So, what is velocity?
Velocity is
derivative of
uh
the coordinate, right?
So, that's basically how T looks. Uh I
mean, I have to put 1/2 here. Sorry.
So, that's my T in classical mechanics.
Well, so 2T is
uh will basically cancel this two, and
my good candidate for H is
sum
of PI times QI
dot minus L. So, this is the formula
which depends only on coordinates
uh
and momenta. Uh well, and
derivative of coordinate, which is
velocity.
And Lagrangian.
It does not really depend this formula
does not explicitly depend on kinetic or
uh potential energy. So, my question is,
is this formula good for these
equations? So, is H defined as this
thing which I just guessed? But it's not
not guessed. I used some particular case
and came up with a formula which seems
to be, you know, satisfy my my uh my my
demands. So, it does not depend on
energy, it depends only on the
Lagrangian,
uh coordinates, and momenta. So, I've
got this formula.
Let me check. I mean, if it fits the
bill, if it satisfies these equations,
then there is absolutely nothing wrong
with saying, "Okay, this is Lagrangian,
and we can use it and solve this
equation instead of Euler-Lagrange.
So, L is satisfied
Euler-Lagrange
equation, I know that. So, from this
formula
and these definitions,
let me put it on the top.
So, that's what's given basically now.
H is equal to
sum of
p i q i dot minus L.
So, with this formula,
this is given and this is all given.
So, Euler-Lagrange Lagrangian,
definition of momentum, and this quite
abstract formula which I have just
invented
based on some consideration.
Now, this is given, this I have to
prove.
If I would do this, well, that means
that my
original problem,
which is n equations of second order,
can be actually solved with
2n equations with 2n
independent variables, but the first
order the first order differential
equations.
Okay. Now, this is now quite
straightforward, pure math without any
kind of physical intuition, anything
like that. I just have to check if these
two equations are satisfied. All right.
But here I would like to pay
some very important I would like you to
pay attention to very important
consideration. What are my
variables right now for H?
Well, it This looks like another
variable, but
we have agreed that momentum and
coordinates are functions. Okay? Now,
this is not really an independent
function. It's the derivative of of
QI by by time.
However,
that's not really
um
You You see, we have defined
PI as such a derivative.
But, uh
I would like QI to be treated
uh QI with a dot,
the derivative by time. I would like it
to be treated
uh
as a function of
uh
independent coordinates, which are time,
uh
all Qs and all Ps.
This is a very important
momentum.
P and Q, momentum and coordinates, are
independent variables,
as well as time.
And I do not actually
uh
want to to say that uh
derivative of uh
coordinate is totally independent on of
anything else.
I would like to treat it as another
function of these arguments, which
satisfy certain laws, obviously, but
it's supposed to be treated as an
independent function.
That's very important. It depends of
everything.
Uh now, in a simple case, for example,
of regular
um
simple mechanical system, we we know
that uh momentum is defined as P * V.
Well, V is actually
Q dot, right?
So, they are related in this case. Q dot
is a function of momentum.
So, that's very important to understand
that in this simple case it's just
function of momentum. But in more
complicated general case, I would like
to maintain the possibility that it's
actually
>> [clears throat]
>> a function of everything.
And that's the most general case, so to
speak. I'm kind of making it a little
bit
more general
just to be sure that I do not miss any
any kind of dependencies which might
actually be. Because again, I'm
abstractly considering
two N dimensional
space where P and Q are
N and N independent coordinates, which
means everything else should actually be
defined in terms of
coordinates,
momentum, well, and time.
So, it's actually two N plus one
dimensional considering the time.
So, this is a purely geometrical
viewpoint, all right?
Okay, so we have basically established
this. Now, let's check this. Okay.
Uh
Let me get some space. I will put D
H by D P I should be equal to Q I
dot and I will
free my space here.
So, I have more room. All right.
So, I have to check this.
All right, so let's start with uh
with this.
Um so, I have to basically check it for
every I. But I will use I for summation
here. So, I will check it for I is equal
to K in this particular case.
So, I will put
K here
since in this just one particular
coordinate.
And I will use I for summation.
Okay.
Fine.
So,
All right, let's start. DH by DP K
equals to
Well,
let's just look at this one. Well, first
of all, this is a sum.
Where is dependency on the momentum?
Well, first of all, obviously, there is
one particular
um pair
where this is PK and this is QK. And
partial derivative by PK of this
particular thing is just QK, right?
With a dot.
Now,
but
all functions of these all all members
of this summation have QI. And QI, as I
was saying,
with a dot is a function of
T
all the all the Ps, P1, P2, PN, and all
the Q.
So, there is a dependency
on this as well.
So, I have to
add sum
of
PI
times derivative of
um
uh of this
by PK
which is
I have to derive
partial derivative of QI by
DPK.
That would be a full derivative
of this sigma.
So, this is a product.
So, is n different products.
One particular component
has to be uh
used twice for this one, but all of them
are supposed to be containing this one.
So, it's this times partial derivative
of this
should be everywhere. But, whenever I'm
doing partial derivative of this times
this, it's only one because everything
else,
which is where
I is not equal to K, then that that zero
out.
And minus
ZL by ZPK.
Um
Now,
the derivative by DPK
is
not just itself. Again, L depends on
T,
P,
and Q. Right?
So,
um
Just get a little bit more.
L depends on T,
Q, and Q dot.
That's our original
Lagrangian, right?
Now, this is
dependency on PK is
here
within the Q
within the Q dot.
Because there are all different P's here
including the PK.
But all of them contain this. So,
basically I have to put
here
not just one.
I have to put sigma
by
DQ
I with a dot
times DQ
dot
I
by DPK.
This is the chain rule, right?
So, we have many different Q's here, Q1,
Q2, Q3, etc.
And there is a dependency on P in each
one of them.
So, that's why I have to differentiate
by
each QI. This is the sum sum by A
by each QI and then from this QI with a
dot differentiate by PK. This is the
chain rule.
Am I right? Let me check.
Yes, looks like I'm right.
Which is equal to
QK with a dot plus
>> [sighs]
>> sigma
PI minus DL by DQ I
dot
times DQI
by DPK.
Right? This is DPK and this is DPK. It's
a common
uh
multiplier.
So, I put P minus
GL by DQI dot
in parentheses.
Now,
what is this?
This is the definition basically for PI,
so it's zero.
Which means the whole thing is equal to
Q
K.
Who is it that?
Which is exactly this one.
So, we have proven
even in this complicated case when
uh, when the velocity depends on
uh, all the independent variables, all
the coordinates, and all the uh,
momenta. I still have this thing
satisfied. All right, let's check the
second one. It's basically the same
thing.
Once more.
>> [snorts]
>> DH by DQ K
is equal
Okay, this is what it is.
Now, where is dependency on QK?
Here.
It depends on all the different Qs.
So, we actually have to really
do all of them.
All right?
So,
it would be
sum PI times
DQ
I
dot by DQ
K. All right?
Yes.
So,
P is independent on Q, so it's just a
constant multiplier. So, all the
dependency on Q K is here.
And that's why each one of them should
be like this, sum by I.
Okay.
Now,
how about here?
Here we have two dependencies.
Q depends on Q K
and Q
prime and Q
dot depends on Q K.
So, I have to really again do it as a
multi-functional
derivative.
One thing is partial derivative by Q
itself.
Okay?
And another thing,
whenever I'm doing
uncovering the Q from the Q from the Q
dot, would be the whole sigma
d l by d Q
I dot
times d Q I dot
by d Q K.
Let me check.
Yeah, that seems to be right.
So, what's here?
Well, look. This one
and this one
have d Q I dot by d Q K as a common.
So, it should be equal to Now, this is
separate. So, this one minus d l by d Q
K
plus sigma
p I
minus d l by d Q
I dot
times
this.
Sorry.
times this.
Same thing here.
This is zero.
So, I have only this.
Okay.
Now,
what is this?
Look at this.
Minus
This is the same as this.
It's Euler-Lagrange equation. Now, this
is
P I.
So,
derivative by time from P I is P I
with a dot.
And that's exactly what should be
proven here.
So,
what we have proven that both equations
are satisfied
in case we have defined our
Lagrangian
as
as such.
And where
where where momentum
generalized momentum is defined as as
this.
So, from Euler-Lagrange equation, from
definition of momentum, and our
intelligently guessed
expression for Lagrangian,
and thinking basically that
P and Q are independent variables, and
even
the derivative of coordinates velocity
is a function of all of these
coordinates. This is the most general
case. In all these cases if this is
given, we have this
Hamiltonian
satisfying these equations.
Now, what I'm actually
thinking about if we are talking about
equivalency of both approaches,
Euler-Lagrange equation or Hamiltonian
equation.
We have to really prove the backwards as
well. So, if the Hamiltonian equations
are satisfied where the Hamiltonian is
this will the Euler-Lagrange equation be
satisfied?
Well, that's basically the same thing we
did before just
I'll just write it differently.
So, dH by dQ
K
as we know
it's equal to minus P K
dot.
Right?
We assume this on one hand. On the other
hand
let's just think what it is.
Uh
if we will divide if we will
differentiate it by
by Q K
uh this is the
derivative of Q1 would be here. So,
that's sigma P I
times
uh
Q
I dot by QK.
This is what it is.
Because P is constant independent of
coordinate
minus
uh and here we are also have the same
thing basically.
Uh
dL
by
d q
k
and minus sigma
d l by
d q
i times d q
i by d q k same thing, right?
But now what what happens?
If
I assume
that p i and
uh
d l by d q, that's the definition. So
these two is the same multiplier here,
go out. So what we have right now we
have that d h by d q k
is equal to
uh
minus d l by d q k
and this is as I was saying
minus p k
dot.
So
that's what we actually came up with.
But what is this?
Both of minus can be pluses, right?
Now dot is actually
d by d t, right?
And p k is by definition
d l by d q k dot by definition. And what
is this?
This is the Euler-Lagrange equation. So
if we assume that Hamiltonian equations
are correct
then we basically have derived
Euler-Lagrange equation.
Which basically now we have both ways.
From Euler-Lagrange we derived
Hamiltonian equations, from Hamiltonian
equation, we all we derived
Euler-Lagrange equation. So, these two
are equivalent and this one
is a generalized
definition
of
Hamiltonian.
Hamiltonian as a function is represented
from Lagrangian and independent
coordinates uh
coordinates and uh
momentum
in this particular formula which we have
semi-guessed. I mean, we just derived it
in a simple case and maybe decided,
okay, maybe it will fit
the bill. And it did fit the bill, which
we have proven.
So, we basically have an expression for
Hamiltonian, which is this one. In many
In many textbooks, they they just give
you this formula and then check that
this is actually
satisfied the equations. I decided that
it's much more
kind of natural
uh how how did we get this? We just
basically
somebody guessed it the first time. And
how did he guess it? Well, probably the
same way I was just trying to explain.
They solved it in a simple case, that's
what it is, and they have decided, okay,
let's check, maybe it works in general
case. And so it did.
Okay, so now this is a generalized
expression for Hamiltonian without any
kind of relation to uh
the energy
or without any relationship to expressed
uh to um
um
uh expression of Lagrangian as a
difference between kinetic and potential
energy.
It's a very, very generalized formula
and uh that's what I wanted to derive
today.
That's it. Now, I do suggest you to read
the notes for this lecture. Again, the
whole lecture is you go to
universidade.com, go to physics plus
course, the chapter is Hamiltonian.
So, the first lecture was introduction
and this is the second lecture in that
chapter.
That's what That's where it is. Thank
you very much and good luck.