So now Hamilton's Variational Principles. This is that we made the leap to go to infinite dimensional systems with this. So that's the motivation. So let's revisit again, we've had virtual displacement. This is what we did with Donald Bear Kane's equations, led to classic Lagrange in dynamics of discrete coordinates all of that stuff. Right, where at any instance purely for the sake of analysis, where could you be? And with these virtual works, we come up with equations of motion. Now we're dealing with path variations because with this we were really limited in we have discrete points, therefore discrete coordinates. With path variations, you need some states that define what is happening. And you could say your Bernoulli beam has a state a deflection angle and it's simply a function of time, by looking at path variations all of a sudden we can have a continuum of changes across space that we can consider. It's not just at an instance where could this part of the beam or fuel sloshing B but it's the whole thing combined. And that's the power of what we're doing here. This is why it's worth yet another layer of generalization. Right, so that's what we're considering here is path, smooth, C2 smooth path differentiate variations and all the math is based on that. Hamilton's principle, we're going to start with a form of Donald Bear. This is almost the canes version where we had one way to write, it was the not the working forces conservative. Actually conservative would still be here. But just know nonworking forces constraint forces F minus MA, started with the invisible variations was fine. And the virtual work was the sum over these forces times these virtual variations of every particle. Right, we're still dealing with particles right now. This is what we had and this must also hold for path variations, so we can use this as a stepping stone to kind of come up with more general Hamilton's extended principle. So the kinetic energy for particles masked over to velocity squared and you're summing over all in particles. If I'm looking at path variations, how are these trajectories varying well then with every path variation there is an associated delta X dot. So you would have which is the varied velocity, maybe you're moving a similar path but you're moving a little bit quicker or slower depending on how you're traversing that. And so that's the varied energy, so are varied paths now. They aren't just instantaneous but really this varied velocity path has to be related to the optimal one plus U delta R dot, and they're all C2 functions that we needed. So therefore the first order variation is to delete the varied energy minus the reference, optimal or energy. And if you take the classic variation of this, one half m times R dot squared gives you one half m two R dot. And the derivative of the variation of R dot which is what we have here then so the two and one half canceled each other. That's the classic thing. So that's the first order variation of what you would have just for kinetic energy. Now, if you look at the lower right, look here we have this delta T is this, as my advisor Junkins would say for no apparent reason. Let's consider what happens if we take the time derivative of this stuff and these are vectors. I'm doing inertial derivative. That's why I really get dots. So ethical MA holds for that system. So again, kinematics is hidden in here. But mass times velocity dotted with this path variation and you take its derivative. You will get the derivative of this, MR, double dot times the variation plus MR. The variation of delta R is going to be delta R dot, right? This is how these path variations are related to each other. This term is really mass times forces. So that all the forces acting on at times the path variation, that was nothing but the virtual work. And we're summing over all the particles that was the virtual work that acts on the system. This other one times delta R dot. If you go back and look here, mass times velocity dotted with delta R dots. That was our variation in energy. So here we have del, the work the virtual work done plus the variation and energy are really summed up. So this derivative is nothing but the variation and energy plus the variation and work done on the system equal to this derivative of some terms. Now this is always a nice form. This is a perfect integral. The derivative of some expression is equal to something. Well, therefore you can integrate it and say, then the integrated version of that something has to be equal to you know, this is differentiated and we integrate again. So we get back the same expression evaluated at the boundaries TF- T0. And this is it, this is actually the most general, this is the general form of Hamilton's Principle, also known as Hamilton's law of varying action. So both names, we will use that one name later for an example that we go through, this is actually really handy but it's not the most common one that's used. People use Hamiltonian dynamics. So I'll show you some refinements here that happened. But this actually holds for general forces, general constraints and general initial and final boundary conditions because they take everything into account. I'll show you later an example where we can solve for the particle motion by never actually getting differential equations. I can use this general form of Hamilton's Principle to directly come up with a trajectory that must be true and it's not solved for some initial conditions only, but it solved for all possible initial conditions. So that I'm not saying I'm launching from here, but I might launch from here. I might launch from here, from many places. So that would be an example where we use this more general form. So it has applicability and it is super general. And if you have, items doing work, they would come in here through these expressions. And if you have energy in the system, we have to take the first variation of it, kind of like Lagrange and everything is based on energy. Right, and the beauty of this, so this side still is partials So we have to deal with that. That's still discreet coordinates, but the left hand side energy, I can also write for a continuum, you can have an elastic beam or beam, Timoshenko beam had come up with the strain energy and compute over the domain. How much strain energy have you put into the system so that will all come into play. So, this side already allows now for general stuff, If it is conservative, you mentioned earlier, conservative forces, in which case the virtual work done is simply, minus the work is minus V convention, right, is that the forces the gradient of negative potential, the negative gradient of the potential function minus del V. So for variations, it looks very much the same, if you only have conservative forces, this must be true, in which case Dell t minus del V right? That should start to look very familiar, that is simply going to be Del of the Lagrange in t minus V is your Lagrange in of a dynamical system. So the time integral from here is that, now this is where it gets more complicated. If you have holla gnomic constraints, then the variation of the Lagrange in integrated is equivalent to taking the variation of the integrated Lagrange, in that you can take that dell outside. So if you don't just have something as holla gnomic constraints, this isn't necessarily always possible and things get much more complex. People write whole thesis and books on this stuff, but in the end our action integral appears again, right? We call this S function. So the Hamiltons function there. So the integral of it, the first variation would have to be zero, which is what we rediscovered earlier and that's good. Below the line, assume del Ri at initial time and del Ri at final time are zero. So if these variations at initial and final time are zero, then something times zero, as long as something is finite is going to be zero. And this whole thing simplifies and this is really probably the most popular form of the extended Hamilton's Principle. So it's not the same as law of varying action because the difference is the law of varying actions assumes you might have boundary conditions on the endpoints. And if you don't, if it's a fixed endpoint problems, especially on the states, then this comes out. Why is this important for dynamics? If I'm saying to you look get equations of motion, here's the particle we're going to take off, when you integrate differential equations, what must you have to integrate them? How much uncertainty is their initial conditions? As soon as I said it like yeah- >> I put myself in a trap, but in a mathematical world, right, you have a Bouncing ball? How much uncertainty is there when I say the bouncing balls at 1 m? >> [INAUDIBLE] >> Yeah, then it's really, that makes it actually dynamical systems solving for those different, finding differential equations are a fixed initial time point problem, immediately because then we have to plug it in and I know where it is. I'm trying to figure out where is it going to be six months from now, right? What is the difference between initial time and final time? As you've seen the flow of time, this gets a little bit deep now. But [LAUGH] it's really that arrow that we always traverse forward in time. It's true for our everyday life, I've never seen time go backwards, I could rewind some of those days and do things differently. It doesn't happen, right? But mathematically, nothing says this broken egg can't come together with just the right initial conditions and reform complete structure, right, it never happens in real life. But mathematically there's no reason this can't happen. Time flows forwards and backwards, so if you said I'm solving from T0 and figuring out where am I going to be? It is completely equivalent to argue and starting from TF and trying to figure out where was I? That's an equivalent statement really. What your what your goals are. You have conditions from which the resulting motion comes and there's no uncertainty from that. This is where I was, where was I at T0 or I'm at T0, where will I be here? Those are equivalent. So for most of the things we'll see, we'll keep saying, okay, now, assuming for a dynamical system, assuming it's a fixed endpoint problem and then we basically drop this and then we just use this variation and we come up with everything we need. But you can see the one that had the terms that depended on states, discrete states has dropped now. Everything here is, I just need the variation of energy and I need the variation of the work to the forces. The ritual work being done basically, do the time integral and then this has to be zero. And from that comes everything that we need. So you can see you asked earlier, well, we only had T, right? But the Lagrange in, we are T minus V. So if it's conservative, it works if it's non conservative, now you have stuff that does work, you added to this term. So it's not T minus V, in it was here, but it would be T minus V plus the non conservative work that's being done on the system. That's the most general form that we've arrived at now and now we can handle anything with this very simple differential, not differential, but it's a variation of equation that we can do. We can get the equations of motion. This won't make sense yet, because we haven't done any examples. [LAUGH] Hopefully the steps make sense. But like what does this actually mean? How do I get these equations of motion? It seems mystical that this will give you these nasty complicated fuel blobs in space, with panels flexing, bending and twisting. This is it, everything starts from here, from those systems.