Harmonic Oscilator
https://scienceblogs.com/taxonomy/term/31450/feed
enHarmonic Oscillator #2 - Lagrangian Formulation
https://scienceblogs.com/builtonfacts/2009/12/02/harmonic-oscillator-2-lagran
<span>Harmonic Oscillator #2 - Lagrangian Formulation</span>
<div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>A few days ago we looked at <a href="http://scienceblogs.com/builtonfacts/2009/11/whats_a_lagrangian.php">what a Lagrangian actually is</a>. The short of it is that it's the kinetic energy minus the potential energy of a given mass*. More importantly, if you construct the classical action by integrating the Lagrangian over the time (see the previous link for a more full explanation) you'll find that the actual trajectory is the one that minimizes the action.</p>
<p>It turns out that the way to find the path that minimizes the action is pretty easy. In honor of two of its pioneers, we call it the Euler-Lagrange equation. If you can find a solution that satisfies the Euler-Lagrange equation for your problem, you have determined the trajectory of your system. The equation is this:</p>
<form mt:asset-id="23129" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-d4bb9fe09d6b78eb832985821d8a307f-1.png" alt="i-d4bb9fe09d6b78eb832985821d8a307f-1.png" /></form>
<p>Here x is position and x-dot is velocity. We're working with a 1-d harmonic oscillator, so that one coordinate is enough to describe the system. In more dimensions you just write this equation down more times, with (say) y and z replacing x. The lagrangian for our system is:</p>
<form mt:asset-id="23130" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-88516ca505d84f969b7ab15a965c3fb3-2.png" alt="i-88516ca505d84f969b7ab15a965c3fb3-2.png" /></form>
<p>Do we all know enough calculus to plug that into the Euler-Lagrange equation? If you're not familiar with partial derivatives (the script d), that means to differentiate with respect to that variable, treating all the other variables as constant. For instance, the partial derivative of the Lagrangian with respect to t would be 0 because t doesn't explicitly appear. The d/dt derivative (which is what's in the E-L equation) is not zero, because x and x-dot are functions of t. Anyway, plugging in, we get:</p>
<form mt:asset-id="23144" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-8d7070ce28f0af28047c7a5fb8246d53-4.png" alt="i-8d7070ce28f0af28047c7a5fb8246d53-4.png" /></form>
<p>Which is exactly the equation we got when <a href="http://scienceblogs.com/builtonfacts/2009/11/simple_harmonic_oscillator_1_-.php">we did the harmonic oscillator using force-based methods</a> rather than this potential energy based method.</p>
<p>So why all that extra trouble? In this case, just to see how things work. But in other cases, this is our only option. There are plenty of times (for instance, a roller coaster on tracks) where the forces involved (such as the tracks on the car) are so blisteringly complicated as to be practically impossible to solve. However, it's easy to write the relation between the track height and the potential energy, and the Lagrangian formulation can automatically give us a much simpler differential equation to solve. We can do this because the Euler-Lagrange equations don't even care if we use x, y, and z as our coordinates. We can use radial coordinates, spherical coordinates, hyperbolic coordinates, or any ridiculous purpose-built coordinates for our problem. We don't even have to modify the form of the equation. And that makes our lives ridiculously simpler. Which I'm all for.</p>
<p>*This is true in classical mechanics. It's not true in relativistic mechanics even if you use relativistic kinetic energy. That's more complicated and we'll worry about it later.</p>
</div>
<span><a title="View user profile." href="https://scienceblogs.com/author/mspringer" lang="" about="https://scienceblogs.com/author/mspringer" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">mspringer</a></span>
<span>Wed, 12/02/2009 - 07:31</span>
Wed, 02 Dec 2009 12:31:58 +0000mspringer120899 at https://scienceblogs.comSimple Harmonic Oscillator #1 - Differential Equation
https://scienceblogs.com/builtonfacts/2009/11/26/simple-harmonic-oscillator-1
<span>Simple Harmonic Oscillator #1 - Differential Equation</span>
<div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>First of all, happy Thanksgiving everyone! I hope you spend the day happily with the people you care about, and remember to spend a moment or two reflecting on the things for which you're thankful this year. Now on with the show:</p>
<p>Back when I first started writing this blog, I focused mostly on problem solving. The goal was to bridge the gap between popularization and textbook. I was always doubtful there was much of a market for this, but of course there are at least some interested people and especially since writing is so fun I was and am I'm more than happy to fill that gap. Over the last few months though, general grad student busyness has greatly reduced the time available for those kinds of posts. And so there's been more soft-physics kind of posts around here. Still interesting, I hope, but there's really no shortage of that sort of thing elsewhere. As such I'm going to try to improve the ratio of more in-depth fare a bit. I can't promise I'll be super consistent about it, but here's hoping y'all will bear with me!</p>
<p>Let's kick it off with perhaps the most important model in physics: the simple harmonic oscillator. It's ubiquitous in everything from solid state physics to quantum field theory, but when it comes right down to it, the harmonic oscillator is a spring. Its defining property is that the force acting on the spring is proportional to the displacement of the mass from equilibrium. Move the mass farther from its resting point, and the restoring force is proportionally stronger. Wikipedia has a nice image:</p>
<form mt:asset-id="22835" class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://scienceblogs.com/builtonfacts/2009/11/26/spring.gif"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-9f57fc1fc9127f630fb3cc2cdff834f5-spring-thumb-400x90-22835.gif" alt="i-9f57fc1fc9127f630fb3cc2cdff834f5-spring-thumb-400x90-22835.gif" /></a></form>
<p>We can write "the force is proportional to the stretch" mathematically in the following way:</p>
<form mt:asset-id="22837" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-d4bb9fe09d6b78eb832985821d8a307f-1.png" alt="i-d4bb9fe09d6b78eb832985821d8a307f-1.png" /></form>
<p>The variable x is the position of the mass on the spring, and it's a function of time. Dots denote differentiation with respect to time, so x-dot-dot is the rate of change in the rate of change of position. Sounds bad, but that's just another name for the acceleration. The spring constant (the force produced by the spring per unit of stretch beyong equilibrium) is k, the mass of the object is m. Now if you know about solving differential equations, we can actually find the particular function x(t) that satisfies that equation. Physicists usually solve this kind of equation by the method of recognition - we've seen it so much we just know what the solution is. For those who haven't seen it so much, it's the pretty much the first thing you'll learn in differential equations class, and if you don't want to take the class it's ok because the problem is not difficult and either way I'm just going to tell you the solution. ;)</p>
<p>The solution is thus:</p>
<form mt:asset-id="22838" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-88516ca505d84f969b7ab15a965c3fb3-2.png" alt="i-88516ca505d84f969b7ab15a965c3fb3-2.png" /></form>
<p>Actually the solution contains k and m, but to make the equation <em>look</em> simpler, I've just substituted in omega, where it's an abbreviation for a slightly clumsier expression:</p>
<form mt:asset-id="22839" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-d18063683dcc0d42b9be45451a84d1e3-3.png" alt="i-d18063683dcc0d42b9be45451a84d1e3-3.png" /></form>
<p>And that's the general solution, for arbitrary constants A and B. Now really that's not good enough. We might have started this oscillator off close or far from equilibrium, or we might have just let it go or given it a good shove. These initial conditions - the initial position and initial velocity - determine what A and B are for our specific physical situation. Let's go ahead and nail the situation down. Call the initial position x0. That's the value of the position at t = 0 when the clock started and the system started oscillating. At t = 0, the value being plugged into sin and cos is 0. But sin(0) = 0 and cos(0) = 1, so we see that x0 = A. Nice, that pegs one of our constants. Now do the other. To find the velocity from the position equation, we differentiate with respect to time. Doing this with the knowledge of A, we see that:</p>
<form mt:asset-id="22840" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-8d7070ce28f0af28047c7a5fb8246d53-4.png" alt="i-8d7070ce28f0af28047c7a5fb8246d53-4.png" /></form>
<p>Now we're working with initial conditions, so set t = 0 again. The sin term goes to zero, the cos term goes to 1, and therefore the initial velocity v0 = B*omega. Solve for B, substitute into the general solution:</p>
<form mt:asset-id="22841" class="mt-enclosure mt-enclosure-image" style="display: inline;"><img src="http://scienceblogs.com/builtonfacts/wp-content/blogs.dir/477/files/2012/04/i-bb5c2c6b0452df43a61e3974bd9b473f-5.png" alt="i-bb5c2c6b0452df43a61e3974bd9b473f-5.png" /></form>
<p>Ok, that's great but what does it mean? For starters, it means that the simple harminic oscillator <em>oscillates</em>. It repeats its motion over and over with an angular frequency of omega. We might have guessed that it would oscillate, but thanks to the math we know it does so in an exactly sinusoidal way. Further, we now know the timing of this oscillation in terms of other physical constants, and we can relate amplitudes and velocities to the initial conditions. It's quite a bit of an improvement over the qualitative "back and forth" description we might have managed without math.</p>
<p>Why is this post given a #1 in the title, by the way? It's because there's about a zillion different and important ways to so physics with the harmonic oscillator. Even from a purely classical perspective, there's this, the Lagrangian formulation, the Hamiltonian formulation, the Poisson bracket formulation, action-angle variables, you name it. Plenty of these are graduate level, but I think I can make the interesting in a guided-tour way for those who aren't fluent in math-speak. I plan to tackle many of these methods over the next weeks.</p>
</div>
<span><a title="View user profile." href="https://scienceblogs.com/author/mspringer" lang="" about="https://scienceblogs.com/author/mspringer" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">mspringer</a></span>
<span>Thu, 11/26/2009 - 04:00</span>
Thu, 26 Nov 2009 09:00:59 +0000mspringer120896 at https://scienceblogs.com