Let's do another example. This last one we had a ball dropping, which is a second-order polynomial solution, and we had an infinite expansion to begin with but we only needed a finite number of terms. Let's look at the opposite where I will still assume a polynomial expansion. Just saying, I need to be smooth so that's the classic polynomial series will give me anything that's smooth and I'll figure out what's happening. If you knew upfront it's a sine wave, there are smarter ways to come up with base functions and get this quicker, but just to show you what happens if the things don't truncate at a_3 and go everything else as zero. This is the particle. We have kinetic energy, mass over two velocities squared. The potential energy of a spring is k over 2 displacement squared and again, that's going to be negative of the work. Del T plus Del W, it will be minus Del V, all plugs in like before. Very similar, just instead of gravity we have a spring energy. On the right-hand side, it's pretty much the same because it's just a particle moving in one d, so we have mass times generalized coordinate rate times the variations and evaluated at the temporal boundaries. That's all we have to do. We plug this in, we make this assumption for this system, and we're going to have to figure out now what are these terms going to become. Much algebra later. You plug it in, you do these integrals with these differential equations, and then anything that depends on Delta a_0 gets grouped together and itself is going to be an infinite series. Everything that depends on Delta a_1 gets grouped together and it's an infinite series, so things get a little bit more complicated. But we've already argued these Delta a's, this is how we're shaping our path variations. They're arbitrary. As long as they're c_2, we're good. This squiggly bracket in the term must vanish. But within it, we have an infinite temporal polynomial series in time, so each temporal coefficient must individually vanish again like we did before. This first one, a minus a_1, well, that just self-destructs and goes to zero. That's easy. But here you can see there's a 2a_2 plus this 2a_0. Then a_3 relates to a_1, a_4 relates to a_2. Looking at that pattern, what comes to mind? What is happening here? If I gave you 8_0, could you figure out what a_2 would have to be? Yeah. If we know this, we can find this. We know a_2, can you figure out what a_4 is going to have to be? This term has to vanish, and this actually repeats. So all the even terms and a_0 counts as an even here are combined versus if you have a_1, you know what a_3 is and there would be an a_3 that relates to a_5, so there's a recursive relationship that once you know one, you can ripple through a series of stuff to get the others. We don't just truncate anything beyond second order. There's infinite terms in there, but there's a clear pattern from that. The same thing could be said here and from the others. Here I am truncating at some point, but these expand on and on. Then since a_0 relates to a_2 and a_2 relates to a_4, you can take this to infinity and that gives you an infinite series of relationships. That's interesting. What is the response we expect from a spring-mass system? Sinusoidal stuff. If you take a sinusoidal and put it into a power series form, what is it going to look like? You basically would have something like x minus x cubed over three factorial plus x^5 over five factorial and so forth versus the cosine is 1 minus x squared over 2 factorial plus x^4 over 4 factorial and a plus-minus [inaudible] but it's always these patterns that you can do, so we'd expect to see that. Looking at these relationships, a_2 relates to this, a_3 relates to a_1, a_4 relates to a_2, which really relates back to a_0. I can relate everything in all of those conditions to two constants, a_0 and a_1 and that should make sense. It's a mechanical system. I should only be able to arbitrarily pick initial position and velocity and then everything else has to come from that. All the other terms, while they don't go to zero, I can always pin them back to that. If you do that, the a_0 one looks like this, and the a_1 term looks like this. So what does this look like then? That's basically a cosine of Omega t. That's cosine of x would be 1 minus x squared over 2 plus x^4 over 4 factorial, 4 times 3 is 12 times 2 is 24. Wow, it works. We should expect a Taylor series expansion over cosine. Over here, see, we're missing an Omega because we need sine of Omega t, so you multiply and divide by Omega, then you get Omega t cubed over 6, then you get the right form. So the answer is a_1 over Omega because we multiplied and divided by Omega times the sine series. It was almost a sine series but not quite in that form. That's cool. Now we have solved using Hamilton's law of varying action without ever coming up with a differential equation. But again, it's not for free. We'd have to assume a certain algebraic form, take its variations, plug it into this stuff, and lots of deductions later, you can come up with the actual path. Never mind differential equations that must be satisfied.