The separation of variables method solves the Hamilton-Jacobi equation by expressing the action function S as a sum of functions of single variables (S = a(x) + b(y) + c(t)), which reduces the partial differential equation to ordinary differential equations. For a particle in a uniform gravitational field with Hamiltonian H = (px² + py²)/(2m) + mgy, this method yields the complete solution S = p2x + ∫√(2mp1 - p2 - 2m²gy) dy + p1t, where p1 and p2 are constants. The canonical transformations derived from this solution provide the equations of motion: px = p2 (constant), py = -mg(t + q1), x = q2 + (p2/m)(t + q1), and y = (p1/mg) - [(p2/m²g)(t + q1)]², demonstrating how the Hamilton-Jacobi formalism provides a systematic approach to finding trajectories for mechanical systems.
Solving Hamilton-Jacobi Equation via Separation of Variables
Added:Okay. Hello. Today we are going to look to an example of how to solve the Hamilton Hakovi equation for another mechanical system using a very famous method in this topic which is known as the method of separation of variables.
So the example that we are going to use is the a particle that is in a uniform gravitational field. So we know that if the gravitational field is uniform the Hamiltonian that is going to correspond to this particle is going to be the next it will be h equ= px 2 + p y 2 all divided by 2m. In this case, we are considering the motion of the object in two dimensions because it will have a kinetic energy associated with the velocity in the x direction and in the y direction. Okay. And then a potential energy that corresponds to m g y.
Okay. Perfect.
of of course uh this mass is uh this m is the mass of the particle and g is the acceleration of gravity. So we remember that the Hamilton Hakovi equation says that a function h which is a function of in this case and we have two uh generalized coordinates Q which is going to be qx qy px py and the time and of course in our case we consider qx just as X and Q Y as Y. Okay, we have generalized coordinates for position and coordinates for the momentum that correspond to those generalized coordinates of position and then we sum the partial uh derivative of S with respect to time and this needs to be equal to zero.
Perfect. So looking that we have two elements of um conjugate momentas we need to write them in terms of the partial derivative of this function s with respect to some generalized coordinates. Of course in this case uh we know that px is equal to the partial of s with respect to x and p y is equal to the partial of s with respect to y.
So that means that the Hamington Hakobi equation takes the form h of x comma y comma the partial of s with respect to x the partial of s with respect to y the time plus the partial of s with respect to time equals to zero. So that will be the hamilton hakovi equation for a particle that is under a uniform gravitational field. And what happens if we take this Hamiltonian and uh we take the values of px and p y into it which correspond to the partials with respect to x and with respect to y. Well, we are going to get that we will have 1 / 2m that is going to multiply the partial of s with respect to x uh squar plus the partial of s with respect to y^2.
Okay. So yeah and then plus mg y plus the partial of s with respect to time equals to zero. So this will be the Hamilton Hakobe equation for the particle in a uniform gravitational field. Perfect. Look that we have replaced the positions of px and py for the derivatives of s. Perfect. So the method that we are going to use consists in taking a function that is going to be of the variables x comma y comma t and express it as the sum of three functions of one variable. For example, a of x, b of y, and c of t. Look that these functions. Well, they are of just one variable.
This a only depends on x and this b only depends on y. So, we are going to propose a solution for this equation given by this expression and we are going to see what happens. Well, of course, if we calculate the partial derivative of s with respect to x, looking that only a depends on x, we can set that this is equal to the derivative of a with respect to x, the total derivative because of course a only has one variable. So we can just take the total derivative and that will happen the same with the partial of x with respect to y. uh that will be equal to the total derivative of v with respect to y and the derivative of s with respect to time will be equal to the total derivative of c with respect to time. Perfect. So we can take this into the uh differential equation to get that 1 / 2 multiplies the derivative of a with respect to x^2 plus the derivative of b with respect to y^ 2 plus mg y equ= and let me take this into the right hand side of the equation to get minus the partial the sorry the derivative of c with respect to time.
Perfect.
And something that I want you to notice here that is very common when you use a separation of variables method in differential equations is to uh notice that the left expression on the equation is a function of some particular variables and the right hand side of the equation is a function of other variables. Yeah, this is very very common in solving differential equations that are partial differential equations.
So we can say that this can be seen as a function of x and y while this is a function of t. So what happens if we have the derivative of a function of t in this side and then here we have a function of x and y which are different variables.
Well, that means that well all this expression on the left hand side needs to be equal to a constant. And the same thing happens with with this uh element that we have here. It has to be equal to a constant because if we have a function of different variables that are equal, they can only be equal if they are constants. Okay? So if this thing over here is equal to a constant well we can set easily that c of t is going to be uh solution well it it will have the form minus p1 t where p1 is a constant. Okay, we have just uh encountered the solution for C taking the the well yeah we had that the derivative of C with respect to time is equal to a constant. If we take the integral then we get that this is equal to a linear function of t. Perfect. And actually uh you will have to notice in some further examples that this thing that we have here which is a linear function will occur very often if for example this t does not appear on the Hamiltonian. So what I'm saying is that looking that the t doesn't appear here in the Hamiltonian then this function c in the separation of variables uh proposal well is a linear function.
Okay. So the t is not in the hamiltonian that means this c is a linear function.
Perfect. Okay. So looking that this was equal to a constant then again the left hand side of the equation is also equal to a constant. So what is that what is that constant going to be? And well looking that we name this as p1. Of course, if we take the derivative of this, we get minus p1, but minus the derivative of that is just p1. So that means that we can set 1 / 2 m time the derivative of a with respect to x^ 2 plus the derivative of v with respect to y^ 2 + m y is equal to p1.
Perfect.
So what we are going to do next is to solve this equation for the derivative of a with respect to x. So we are going to get the derivative of a with respect to x² is going to be equal to it will be p1 minus mg y and then this multiplies 2 m minus the derivative of v with respect to y^2 and with the same um explanation that we gave before. This is only a function of x and this is only a function of y. So if we have two functions of different variables on both sides of the equation, that means that they need to be equal to a constant.
Okay. So what we are going to set is that we will have that uh the derivative of a with respect to x^2 will be equal to well maybe p2.
taking that the derivative of a with respect to x will be seen just as a constant p2 and making that a as a function of x will be equal to p2x.
Perfect.
Let me close this and also let me close the solution that we found for the c.
Okay, perfect.
So this takes us to get that well the derivative of a with respect to x is of course p2 and uh the derivative of a with respect to x^2 is um p2.
Okay. So getting back to this equation we are going to get that p2 is equal to p1 and let me multiply by that 2m this 2 m p1 - 2 m^ 2 g y minus the derivative of v with respect to y² like this. So now we are interested in finding a solution for uh the derivative of v with respect to y. So if we work a little bit we are going to get that the derivative of v with respect to y can be seen as plus minus the square t of 2 m p1 minus p2 - 2 m^ 2 g y.
So um yeah the thing here is that well we do not have to care about these two signs we can only choose one looking that we are looking for one solution. So there is no problem if we just take into account the positive solution. So if we remember uh the solution proposed was a + b + c. So that means and yeah let me establish that b is equal to well um the integral of the square root of 2 mp1 - p2 - 2 n^ 2 g y d y. So this takes us to establish the solution s = to well a a of x with that was a p 2x and then b of y which is this integral that we have here 2 m p1 - p2 2 - 2 m^ 2 g y d y and then plus c of t but that was equal to p1 t. Perfect. So now we have found a solution for the Hamilton Hakobe equation as uh the sum of three functions that are um of just one variable. Okay, perfect. Remember that on the first lesson that we have given in Hamilton Hakovi formalism, we established some equations that the the function needs to to verify.
One of those equations is that um pi needs to be equal to the partial of s with respect to qi where this pi is the little p. Don't get confused. Remember we have little p and upper p. So uh the other equation was that uh the upper q is equal to the partial of s with respect to uh the upper p i. Okay, these are the equations that we showed on that first lesson. In this case, i goes from one up to two and they are equivalent to the x and the y.
So that means that we are going to consider that here is going to be p x which is going to be the partial of s with respect to x and with these cues we are going to remain with the number notation. Okay. So that means that this will be Q1 = to the partial of S with respect to P1 and the other equations will be P Y = the partial of S with respect to Y and Q2 will be the partial of S with respect to P2.
So with these equations and with the solution that we found we are able to find uh px, q1, py and q2. So px if we take the derivative of s with respect to x looking that this this element does not have an x and this element does not have an x that means that the partial of s with respect to x is only going to be this p2 that we have here. So the first result is going to be that px is equal to p2. Recall this is little p and this is upper p. Perfect. So what happens with for example PY?
Well, PY is going to be equal to the and let me close this. PY is going to be the partial of X with respect to Y. So this one does not depend on Y. This one does not depend on Y. So we just need to take the partial derivative with respect to Y of this element that we have here. But looking that we are taking the derivative of an integral. Looking that they are inverse operators. Well, we are just going to make that uh we cancel the integral like if that is the correct way maybe. Um so that means that this py is going to be equal to what is inside the integral. So that's that means that we will have here the square<unk> of 2 mp1 - p2 - 2 m^2 g y. Perfect. So this will be the value of little p y. Okay. So what we are going to do now is to calculate what is q1. Well, we need to take the partial derivative with respect to p1 of this integral that we have here. So this will be equivalent to the yeah the integral of the partial derivative with respect to p1 of that square root that we have there which I'm going to write like this 2 m p1 minus p2 - 2 m^ 2 g y uh d y. Yeah, I just switch the order of the integral and the derivative because that is legal. Don't worry.
So, and yeah, this is raised to the 1/2 power. So, let me take the derivative.
This will be the integral of 12 2 m p1 - p2^ 2 - 2 m ^2 g y to the - 12 and then the derivative with respect to p1 of what is inside due to the chain rule which is just going to be 2 m.
So this two cancels with this two. We got uh dy here. So that means that Q1 is going to be equal to the integral of M divided the square root 2 MP1 - P2 - 2 M^ 2 GY uh dy.
Okay. And look here that well the function S that we found has a P1 here and a P1 here. So we still need to take the partial derivative with respect to p1 of this which is just going to be a t well a minus t actually. So that means that we need to add a minus t here a minus t here and a minus t over here.
And I'm not going to solve this integral because well I think that is not necessary but I'm going to tell you what is the result if you make this integral remember it's just an integral uh of y it shouldn't be so hard but the result is that minus1 / mg the square root of 2 m p1 - p2 - 2 m^ G Y. So this will be Q1.
Perfect.
Okay, this is Q1.
So we are going to calculate now Q2 which is the partial of S with respect to P2. So it will happen something very similar. Here we have a an element that depends on P2. So the partial uh with respect to p2 of this element is going to be x and then we need to take the partial of everything of this with respect to p2 is going to be very similar to the procedure that we just followed. So q2 is going to be equal to x plus the integral of the partial with respect to p2 of 2 m p1 - p2 - 2 m^ 2 g y raised to the 12 d y.
So again we are going to calculate the derivative is x + the integral of 12 * 2 m p1 minus p2 - 2 m^ 2 g y to the -2 and then times the derivative with respect to p2 of what is inside.
So that is - 2 p2 and then d y. Perfect.
So we get x we cancel these twos plus the integral of p2 divided by the square t of 2 m p1 minus p2 - 2 m^ 2 g y and then dy here. Perfect. Again, we are not going to solve this integral. If we do that, the video will be very long.
So, this is going to be equal to x + p2 here. That is going to divide m^ 2 g and it's going to multiply the square root of 2 m p1 - p2 - 2 m^ 2 g y.
Perfect. This will be the result for q2.
So um let me write you these four results u here in this page. These are the four equations that we just found.
Remember that um before introducing the Hamilton hagobi formalism we were talking about some canonical transformations that they need to accomplish that they are functions of uh the generalized coordinates and the conjugate moments. Remember that if we find a canonical transformation that is equivalent to say that we have a new function Q and a new function P that are functions of the Q and the P and yeah only functions of Q and P that happens the same with the P. Okay. But in this case uh we have found uh these canonical transformations. But look here that for example this Q depends on the upper P uh the upper P1 and the upper P2 actually. So we do not want that. We would like to have a function Q1 that will be only a function of maybe Y and and maybe X and the time. Okay. but not a function of the upper P. So we need to solve these equations to get these kind of functions. You will see it in this example. So for example, let's look at this first equation that we have here.
We can see that this P2 this upper P it is actually PX little px.
So um with that we can solve this equation for P1 and in that case we will have a function P1 that will be only of the variables PX, PY and Y. So that is what we are actually looking for. So what are we going to do? Well, let me establish this as py 2 + p2 + 2 m 2 g y = to 2 m p1. Yeah. Okay. Yeah. And remember that this p2 is equal to px. So we get px². This is little p remember.
So it is easy to see that p1 is going to be equal to 12 1 actually divided by 2 m* px 2 + p y^ 2 plus m g y okay because remember these two m will cancel these two m that we have here. So we only get an m on the numerator. Perfect. So we have found the first canonical transformation for the upper P1.
Okay. So with this value that we just found, we can find this Q1 that we have here because we know what is P1. We know what is P2. So we are going to substitute those values into that expression. So we are going to get that q1 is equal to minus t minus 1 / mg the square<unk> of 2 m p1. But that p1 is going to be this that we just found which is 1 / 2 m px^ 2 p y^ 2 um + mg y like this.
So that is 2 mp1 and then we will have minus p2 but p2 is px. So px^ 2 - 2 m^ 2 g y. Recall that for now um this function q1 is already a function of the generalized coordinates and the conjugate momentas little p and little q. So if we keep simplifying we will get minus t -1 / mg the square t of um px^ 2 p y^ 2 + 2 m^ 2 g y - px^ 2 - 2 m^ 2 g y and we can cancel this we can cancel this to get that q1 is equal to minus t -1 / mg g and the square root of py squar. And we are not we are not going to worry about the absolute value of the py. We're just going to take um one of the values that will be perfectly acceptable. So q1 will be minus t minus py divided by mg. Perfect. So with this we have found uh Q1 in terms of the little P and uh the variable T.
Okay.
Okay. And let me write in this step that P2 as a function of these little coordinates is equal to PX.
So we are just need we are left with um the q q2 function. Okay. So that is this one over here. We have now the p2 we have the p1.
So we need to substitute that into this expression to see what are we going to get. Let me rewrite this equation.
Okay. So if we substitute the values that we have found we are going to get that Q2 is equal to X + P2 which is PX / M^ 2 G * the square t of 2 MP1 which is 1 / 2 M P 2 + P Y 2 + MGY I and then - px^ 2 which is p2 - 2 m^ 2 g y.
Okay.
So this is x + px / m^2 g.
Here we will have px 2 + p y 2 + 2 m^ 2 g y - px^ 2 - 2 m ^2 g y. This cancels this cancels and we see easily that q2 is equal to x + px m^2 g again uh p y perfect. So that is the function Q in terms of the little variables. So with this we have now completed the transformation the canonical transformation that corresponds to uh the particle under the gravitational field that is uniform.
So remember that we mentioned that the Hamington Hakobe equation comes from thinking that this canonical transformations lead us to a new Hamiltonian that is equal to zero. And that means that the derivatives with respect to time of these new functions that we found are equal to zero.
meaning that these functions are constants. So if we are able to express the q well the x the y the px and the py in terms of these variables looking that they are constants well those functions those new functions will be equivalent to the solutions of the equations of motion of the mechanical system that we are studying. Okay, let's say for example that we are able to express this x as a function of q1, q2, p1, p2 and the time. Looking that these are all constants.
Well, this means that we will have a function equivalent to x of t which is of course the solution of the motion of the particle that we want to find. So this means that we need to find the expressions for these four variables in terms of the upper variables. So how are we going to do that? Well, by now we already know that px is equal to p2.
So this means that well this is already an equation of motion. It tells us that the momentum in the x direction is a constant because p2 is a constant.
Okay, this is the first solution that we have. Perfect.
We have uh found also that q1 is equal to minus t minus py / mg. So we can solve this easily for py.
we will get that py / mg is equal to minus t + q1.
So py is equal to minus t + q1 mg.
Okay, perfect. So this means that this is another equation of motion that is telling us something about the momentum in the y direction. the momentum of the particle uh it well we see here that it is not a constant it depends on the time so it it changes on time and yep this can be seen as a function p y of t so this is the second solution so what happens with the x and the y well we found that uh the q2 that we have here is is this equation But uh we can set that this is q2 minus px p y / m^ 2 g is equal to the x.
But we know that px is equal to p2.
Yeah. And py is all this thing. So that means that x is equal to q2 minus p2 / m^ 2 g * py. But that is minus all this thing with this minus is going to be a plus. And then mg t + q1. So x is going to be q2 plus p2 / m * t + q1.
Perfect. Again we have found x in terms of the time and some constants. So this is equivalent to say that this is the equation of motion uh in the x direction.
Perfect. So we need to still find an equation for y.
But remember we found that p1 is equal to p y ^2 + px^2 / 2 m + mg y. So from this we are going to solve for y and we get that what are we going to get? We get that p1 minus p y^2 + px 2 / 2 m is equal to mg y but p1 remains the same minus p y^ 2.
What is p y^2?
Well, it will be this thing squared.
So, it will be equivalent to write the next t + q1 2 m^2 g 2 and then plus px² but px is p2. So P2 okay all this is divided by 2 M and this is equal to MG Y.
So we will get that y is equal to p1 / mg minus okay with this my y dividing here we will only get a g surviving at the numerator.
So this will be t + q1 g and these two in the denominator.
and then minus p2 / 2 m^ 2 g and this term is squared of course. So yep I think this is the final result. We have found a function of y in terms of the time which is the solution of the particle in a uniform gravitational field. In this case uh remember the p1 and the p2 are constants. So this is equivalent to the equation of motion in the y direction.
Okay, perfect. So this will be the four results that are important in this lesson.
Up Next

Geodesics: When Shortest Distance Isn't a Straight Line
@ParthGChannel
81.5K views•2021-06-01

Fluorescence & Jablonski Diagram | Molecular Photophysics
@yairmeiry
192.2K views•2012-01-12

NMR Spin Physics I: Zeeman Effect, Resonance Condition & Larmor Frequency
@nptel-indianinstituteofsci8064
2.3K views•2024-01-17

Entropy and the Second Law of Thermodynamics Explained
@veritasium
27.5M views•2023-07-01
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Physics



![[해밀턴 역학] 1. 해밀토니안, 운동 방정식](https://i.ytimg.com/vi/tE2ndMHf-1k/maxresdefault.jpg)


































