So the dynamical system is you've got to spring and here is a mass. Okay, but I'm adding a dash pop to it. So I have a spring mass damper system that I'm trying to find again, a very simple dynamical system. But what makes this interesting is you've got extended principle that says from T zero to TF, dell T plus dell W d T would have to be zero. I'm going to have initial conditions. So this is a fixed endpoint problem. This will lead to differential equations in contrast to Hamilton's law varying action where we got an actual path with an assumed variation of structure. So to do this, we need energy, we need to work and then take variations and carry this all out. So if we do this and let's see what we're going to get. T is mass over 2, X .squared. The potential energy of a spring is K over 2, X squared. And the non conservative work of the system, it's going to be C times X.. And there's the integral there from what did I do? T0, TF, DT so I don't know what X.is, but that's the damping force that I would have. Right, that's basically the damping coefficient that's acting on it. So it's going to resist motion there, okay, so now. And he said earlier, the variation of the non conservative work is the fourth times the virtual displacements, which in this case was minus C X stopped times delta X. So that's how this stuff all relates. I don't think we need that one, we just need to have this definition. I think there was a sign off there because there's a negative thing here. Okay, so that's what we're going to need for here. Now, let's expand this out. We're going to have temporal integration, T0, TF. I need Dlt, then I have minus del V for conservatives plus dell W for non conservatives. And this combined is nothing but dull W times DT, this has to be zero Hammond's extended hand booms principle. So let's plug these in. The variation of this was going to be m times X stopped times delta X dot. So you get TF, T0 mass X delta X dot. The variation of this was k times X times delta X. And then this part was simply minus C X.delta X, DT. That's what we have to evaluate. Now what can we say here? Delta X is a path variation that can be arbitrary. But so can delta X start so we can't just factor this stuff out and say well, the delta X is have to vanish individuals from delta X dot. So how do we get rid of the delta X.? Integration by parts exactly. So what we need to do is integration by parts and in particular this is the term we want to get rid of this would be u times v prime, right? And the answer will be UV. So I'm going to go through that and minus the derivative of this. So let me just do the rest of it? I can do it here integration T0, TF. So all of this stuff is minus KX. All right, okay, I wrote it this way the minus CX stopped delta X. Then here, if this is UV, it was U prime V, it is UV prime. So it then becomes you prime V integrated. That was the part with a negative sign. So U prime would be minus U prime would be minus the time derivative of Mx.that you have here times V which in this case is delta X. So that's good. Where, where we're at times delta T, but there was the extra term you? Ve evaluated at the boundaries, which is Mx dot delta X evaluated at final and initial conditions, and this has to be zero. This term vanishes fixed and point, right? So again, but when we get the equations of motion, it's always going to be subject two initial conditions like we argued earlier. This is Hammond's law as an extended Hamilton's principle assumes fixed endpoint conditions with that. So this part is actually going to vanish in individually. So we're left with the rest and that is going to be the integral from T0 to TF of minus kx minus cx dot because I can factor out delta x now. And the time derivative of Mx is going to be mx dot is going to be mx double dot times this times time and now what's the argument that we can make. >> [INAUDIBLE] >> Exactly, so those variations in delta x are arbitrary because we just made this up to Tennessee. Where does it happen? So everything else must individually vanish inside the integral. So this must be zero, and you get your classic spring mass damper equations of motion. So you can see to use Hamilton's extended principle. We do have to use integration by parts because you set it up, you've got energy of the system but energy doesn't have to be just in terms of discrete coordinates. You will see shortly Thursday will get into continuum and then it can be a function of space and time because if you're being is deflecting it depends where all that strain energy. We have to do that but the volume integral and this allows us to do it but then we have to solve it by taking integration by parts, that's the penalty. So you have to be really one with integration by parts and then outcomes a serious conditions here, it's very trivial. But you can imagine if we have to do integration by parts with respect to space and respect this time. We're going to have to do this multiple times lots of trans personality conditions, outcomes and stuff. This is how we get our equations of motion, right? Integration by parts but starting with energy work of the system, which is nice because we can do those even for continuum, not just for discrete systems, and that's the big benefit.