 Okay, let's go ahead and get started now. So today, we're going to talk about how you can determine the ways in which molecules can vibrate, okay? And so the first thing we might start out with is a little motivation. So why is it that we're interested in the study of molecular vibrations? Does anybody want to volunteer on motivation? Yes, spectroscopy. Yes. So as you've learned, probably mostly in organic chemistry, molecular vibrations often absorb radiation in the infrared region of the electromagnetic spectrum. And if you shine infrared light on a molecule, you will then excite transitions between vibrational levels, quantum mechanical levels. And this gives you an opportunity to find out basically what are the energies involved. And it turns out that chemical bonds, you know, have very distinct signatures in the infrared spectrum, right? So you can tell a carbon-carbon single bond by where it appears in the infrared spectrum or a carbon-carbon double bond or different types of carbon-oxygen bonds, et cetera, et cetera, et cetera, okay? So if you can measure the vibrational spectrum of a molecule and assign it, meaning label the peaks according to what kind of bonds give rise to those peaks and also bending modes, there's various kinds of motions that show up in the infrared spectrum, then this is one of the many tools that you have at your disposal to determine the structure of the molecule. In addition, the frequencies at which the vibrations show up in the infrared spectrum tell you something about the strengths of the bonds, right? So stronger bonds have higher characteristic frequencies and weaker bonds have lower characteristic frequencies. So vibrational spectroscopy is also a way to gain deep insight into chemical bonding in general. So it's both an analytical tool and then also a very nice tool for getting fundamental information on chemical bonding. Now, if you want to use a vibrational spectrum in order to do some kind of structure determination, then you need to know what are the frequencies associated with different types of chemical bonds? And there's various ways to do that. One is to just put in molecules of known structure and then sort of heuristically figure out where they are. Another is that you may use a theoretical model to help you understand the spectrum. And so that's what we're going to talk about today. And the theoretical model that we will discuss and work out in some detail, it'll take at least all of this class, is what's known as normal mode analysis. And so in order to illustrate what normal mode analysis gives to you, I fired up a little Spartan calculation here where I sketched in CO2, carbon dioxide, and I minimized the energy with respect to the positions of the nuclei and then I asked Spartan to do a normal mode analysis for me, or vibrational analysis. And what I get out is a list of four different vibrations with their corresponding frequencies. Well, it's not really a frequency. It's called the wave number, inverse centimeters, which is a common spectroscopic unit for vibrational spectra. And so what I want to start out with today is to show you what these things correspond to, and then we'll talk about how you actually get this information. And it's going to be a long exercise mostly for your entertainment, but it'll be comprehensive in the sense that we'll be using a lot of the tools that we have learned this quarter, so it'll be kind of a review where we use a lot of the tricks that we've learned over the quarter to solve a long and complicated problem. I won't ask you to solve such problems, but I hope that you'll at least, having seen this once, have an appreciation for where these modes come from that you find in your textbooks and that you can calculate yourself using a program like Spartan. Okay, so if I go over here to this little table here, which reports the frequencies of the vibrations, the first thing I notice is that there are four, all right? There are four vibrations here, and it looks like two of them have essentially the same frequency. And if I click on the checkbox here, I see that the one corresponding to about 526 wave numbers is actually a bending motion of the CO2 molecule, okay? And it turns out that the bending motion in CO2 is degenerate because I can, you know, bend in the plane of the screen or I can bend out of the plane of the screen, those have essentially the same frequencies and you can see when I click on the other one, that one was in and out of the plane of the screen. Okay, so there's two bending motions, and then there's this higher frequency motion. Let's see what that looks like. That's what we call the symmetric stretch where you can see the oxygen atoms are moving away from the carbon away and toward, but they're in phase, both of those, and then the highest frequency motion is what's called the asymmetric or anti-symmetric stretch where you see that as one oxygen moves out, the other one moves in. Okay, so these are what we call the normal modes of vibration for CO2, all right? Now, first a little comment on the number, okay? So if I have n atoms in a molecule and each atom can move in x, y, and z directions, so three directions, what that means is the total number of, if you like, degrees of freedom or ways of moving the atoms around relative to one another and with respect to a reference frame would be three times the number of atoms. Now, in vibrational analysis, we're not interested in overall translations and rotations of the molecule. So actually, the number of vibrations is less than 3N by a number that either depends on whether or not the molecule is linear. Okay, in the case of a linear molecule like CO2, there's three times the number of atoms minus five unique vibrations. So for CO2, we have three atoms. Three times three is nine, minus five is four. So we expect to have four normal modes and in fact, we do. In the case of nonlinear molecules, the number is 3N minus six, okay? So a molecule like water has three atoms. Three times three is nine, nine minus six is three. So water has a bend like CO2. It's got a symmetric stretch where the hydrogens move in and out together and then it's got an anti-symmetric stretch. Those are the characteristic modes and you've probably seen these in your books when you talked about molecular vibrations. Okay, so today what we're going to do is we're going to see where that comes from. I don't know if you ever wondered where those things come from, but today we'll see where they come from. Using a harmonic model, meaning we're going to assume that the vibrations in the molecule can be described as simple springs. Now in order to formulate the problem, I have to give you a lot of background information, all right? So I'm going to spend a little bit of time over at the board sketching for you what we need to do if we want to determine these modes. They look really simple, but as you'll see, where they come from is not necessarily so simple, all right? So what we're going to do is we're actually going to do the case of CO2, all right? But we're going to simplify it a little bit because we want to keep it as simple as possible so we can see how it works without getting carried away. So what I'm going to do is I'm going to suppose that all of the atoms in CO2 are on the x-axis, okay? And I'm going to have one oxygen here, a carbon here, and an oxygen here, okay? So this is OCO and I'm going to label this atom A, this one B, and this one C, okay? Now one way that I can describe the vibrations so the changes of the bond lengths say, okay, so maybe I didn't say, we're going to do this one-dimensional CO2 where the atoms are only allowed to move along the x-axis so we're not going to be able to describe the bends, but we will be able to get the stretches, all right? And we're going to start out by describing those stretches in terms of the lengths of the bonds, all right? So I'm going to call this RAB and this will be RBC, okay? Now initially, we're going to assume that the energy that describes how, well, the energy as a function of bond length, we're going to describe it by what's called the Morse potential. We've seen that earlier in the quarter, okay? So we're going to have a Morse potential for this bond and a Morse potential for this bond, all right? And so what that means then is we're going to have for the first bond a potential energy VAB which is going to be a function of this RAB and that looks like a number D which is the dissociation energy times E to the minus 2 A times RAB minus B. Now this B here is the preferred value, the equilibrium bond length, if you like, and then we have minus 2 E to the minus A, RAB minus B, okay? And as we saw earlier in the quarter what this looks like, something like this, okay? So it's a typical bond stretching energy and this here is the dissociation energy. The position of the minimum is B and then A determines the curvature of this thing, okay? So we're going to have a potential like this describing the deformation of this bond and then we're going to have another one that describes this bond, say 2 Morse's and then we're going to say that the total potential energy which is going to be a function of both of the bond lengths is equal to VAB as a function of RAB plus VBC as a function of RBC, okay? So that's going to describe the total potential energy associated with stretching or compressing those bonds. All right, so what I want to do now is we're going to go ahead and type these potentials in and then we'll have a look at the total potential energy and then what we're going to do is we're going to generate harmonic approximation. So you've done this in one of your homeworks for one Morse potential. We'll do it for the two-dimensional or the, I guess the three-dimensional potential energy, all right? And then we're going to change the coordinate system. But let's get started by having a look at the potential energy and its harmonic approximation, okay? So we're going to get rid of Spartan and bring up Mathematica, okay? All right, so first is VAB, so I'm going to call that V, little V capital AB and this is going to be a function of little R capital AB underscore, colon equals. And then that's going to be D times parentheses, EXP, bracket minus 2 times A times RAB minus B. Okay, so and then we have minus 2 times EXP minus A times parentheses RAB minus B and then parentheses. Okay, now we can copy this in and put it back and then just change all the ABs to BCs. There's one, there's another, another and another, all right? And now I'm going to define the total potential energy, I'll just call that V, bracket and it's going to be a function of RAB and, oops, underscore and RBC underscore, underscore, colon equals, so that will be VAB of RAB plus VBC of RBC. Okay, now let's do a couple of things. So the first thing is let's just plot one of these guys, all right? So we're going to, let's do plot of the first one, VAB. So we just remind ourselves what the most potential looks like, so this will be VAB of RAB and we'll use replacement rules to put in some values, so for CO2, D here is going to be 7.65 and this is in units of electron volts, not curly, A is going to be 2.5 and B, the equilibrium CO bond length is 1.162 angstroms, okay? And now we'll plot that for RAB going between 0.5 angstrom and 3 angstrom, all right? So let's have a look and we don't get anything. All right. I think you didn't enter it. Oh, I haven't entered that, okay, there we go. Thought I had them all in one cell, but I guess not, okay. There you go, thank you very much. Okay, so as advertised, you know, this is the Morse potential, we've seen it before and so this would be the energy associated with deforming the AB bond away from its equilibrium bond length where the energy is the minimum. All right, so you see as you compress it, the energy goes up and as you stretch it, the energy goes up and then at some point the bond would dissociate. Okay, now let's have a look at the three-dimensional potential which is a function now of both of the bond coordinates. So this will be the total potential energy of vibration for this one-dimensional CO2 molecule. All right, so now what we'll do is we'll say plot 3D V total of RAB and RBC and we can mouse in the same parameters and put them here, okay, and we'll go ahead and plot this for RAB goes from 0.5 to 2, angstrom and the same for RBC. Okay, and I'm also going to put in a plot range for the energy so that'll be arrow minus 16 to 10. All right, so let's have a look, oops, I don't have, oh arrow here, yeah, thank you. Okay, so let's have a look. So here now is a plot of the potential energy as a function of two of these coordinates. So one of the bond lengths is along this axis and the other one's along this axis. There's a minimum where both RAB and RBC are at their equilibrium values and then the energy increases as you move away from the equilibrium value, okay? And it got cut off here because I set the plot range to go only up to 10, okay? All right, so this now would be the total potential energy if we describe to both bonds with the Morse potential. Now to do a normal mode analysis, the first place, the first approximation you bring in when you do normal mode analysis is that you assume that near the minimum, the potential energy minimum that the system behaves as if it was a harmonic system, okay? So now what we're going to do is we're going to use the series command to generate an approximation to this three-dimensional Morse potential. It's going to be a Taylor series expansion around the minimum out to second order, okay? You did that already in your homework for one-dimensional Morse. Now we're going to do it for the two-dimensional Morse and that will be a starting point for doing the normal mode approximation, normal mode analysis, okay? So to do that I'm going to go ahead and since we're going to plot it in just a minute, I'll go ahead and start a new line here and I'm going to call this approximate one vTaylor. So it's going to be a Taylor series expansion, okay? And that's going to be normal of series of vRAB, RBC and we have two variables that we're expanding around. So we'll say that RAB is being expanded around the minimum v, the equilibrium bond length and we're doing it keeping two terms, harmonic approximation and then the same thing for RBC. So RBCB2, all right? So let's go ahead and enter that. We need one more bracket here. Okay. So notice now we have this equation. So there's this constant term that involves the dissociation entry and then notice there's two terms that are quadratic in the bond lengths, okay? So that's the form you get when you make the harmonic approximation. Okay, so let's go ahead now and plot that approximation along with the actual function so we can see what we're doing when we make the harmonic approximation. Okay, so to do that I'm just going to put a curly bracket here and another one here. Wait, let's not put that one there. Let's put it here. All right, so now we'll add to the list here vTaylor. All right, let's see if that works. Okay, so it looks kind of funky but it's good enough to make the point that I wanted to make. All right, so just to remind you, here's our original morse. You can sort of see it from the side. It looks like the one-dimensional one from this angle. And then this bowl here, that's basically a parabola that's been spun around, an axis drawn through the minimum, this is the harmonic approximation. All right, so whenever you talk about the harmonic approximation to a potential energy, what you will generally observe is that close to the minimum, the harmonic, very close to the minimum, the harmonic approximation is a very good representation of the actual potential. And the assumption that we make when we invoke the harmonic approximation is, and it's a reasonable one in this case, is that under normal circumstances, the amount of deviation of the bond lengths away from the minimum energy configuration is pretty small. So we really are only hanging out down near the bottom. Now, why do we make the harmonic approximation? Well, the reason we do that is because we can't solve the problem of determining the vibrations of Morse potentials without really using some sophisticated analysis, okay? But if we can represent the Morse potential by this harmonic approximation, the problem still will look pretty hard, but it's much, much, much easier and then we get out the normal modes. Okay, so now I'm going to take a little pause and go back to the board because it also turns out to be the case that these variables that we're using here, the relative, well, the separations of the atoms, this is not the most convenient set of coordinates for doing our normal mode analysis. Okay, so now I'm going to come up with a version of this formula here for the potential energy that's going to be a function of the Cartesian coordinates of the atoms, okay, where they're X coordinates, so we're going to move from two variables describing the separations between the atoms to three variables defining the positions of each of the atoms, all right? So I have to show you now how we're going to do that. Okay, so first thing I'll do is I'll just write down what we just did, okay? So what we just did was generated our harmonic approximation to the Morse in terms of the distances between the atoms, okay? So essentially what we said was we have now an approximate potential that looks like this. Okay, now, next thing is I want to notice that this variable, RAB, for our one-dimensional CO2, this is just the difference between the X coordinate of atom B and the X coordinate of atom A. And now I'm going to define some displacements away from equilibrium position in Cartesian coordinates, okay? We have a similar one for RBC. So I'm going to say delta X sub A is equal to the actual value of X of A minus its preferred equilibrium position, so we can call that XA0. And I can similarly define delta X sub B. And now what I want to do is rewrite this guy essentially but bringing in the X's and getting rid of the R's, okay? So now, the next thing I'm going to notice is that B, equilibrium bond length, is the difference between the preferred positions of atoms A and B and A. So that's XB0 minus XA0, okay? Each of these two guys has their equilibrium position. The difference between those equilibrium positions is the bond length, all right? So now, I can write XA is equal to delta XA plus XA0. So that's just rearranging this. And XB is equal to delta XB plus XB0, all right? And so now, if I plug these guys into here, I see that RAB, the thing I want to eliminate, can be written in terms of the deltas as follows. That'll be delta XB minus delta XA plus XA0, sorry, XB0 minus XA0. But this is just B, all right? So now, this thing, RAB minus B, is just delta XB minus delta XA, okay? And I could do exactly the same thing for B and C and find that RBC minus B is delta XC minus delta XB, all right? So what that means now is that I can rewrite this potential but now as a function of these displacements of the atoms from their equilibrium positions as follows. V and now there's three of them, delta XA, delta XB and delta XC, that's going to be equal to minus 2 times D plus A squared D times delta XB minus delta XA squared and then plus A squared D times delta XC minus delta XB squared. Okay, so that was a little bit of effort to go from two variables to a more convenient set as we'll see three. Now, to make this look like the problem that you solve in physics class when you talk about harmonic motion, you presumably did that, what I'm going to do is I'm going to say that this is equal to V0, so some energy offset plus one half times a force constant K, so that's the K that appears in Hooke's law, times delta XB minus delta XA squared and then plus a half times the same K, delta XC minus delta XB quantity squared and then just comparing these two, I see that that means that V0 is equal to minus 2D and K is equal to 2A squared D in terms of our Morse parameters, all right? Okay, now the next thing we want to do is we want to actually come up with essentially Newton's equations of motion for these three dynamical variables, okay? So we're just going to do a classical mechanics treatment and find out what the equations of motion are for these three variables in this potential, all right? And the easiest way to do that is a way that you probably didn't learn in your physics class and I'm just going to briefly summarize for you what we're going to do and if you ever have the pleasure of taking an advanced mechanics class then you'll have the pleasure of learning what I'm about to tell you but if it looks like something you don't want to be bothered with, you can ignore it, okay? All right, so now we have potential energy and once we have potential energy and we know how to write down kinetic energy then there's a nice fancy way that we can come up with the equations of motion, all right? And this fancy way is what's referred to as the Lagrangian formalism of classical mechanics. Has anybody heard of that? Probably not. You have? Okay, well then I'll remind you or you can help me if you want. Okay, so according to the Lagrangian formulation of classical mechanics it's a sophisticated and more extended version of Newton, okay? And what you get out, what we're going to get out is essentially Newton's equations for these three variables. But one of the nice things is Mathematica knows about the Lagrangian, essentially the Lagrangian formalism and so we'll be able to crank out the equations of motion using Mathematica. Okay, but the basic idea here is and this is the part you can ignore if you don't care about it, is there's a function that we can write down called the Lagrangian and it's a function of the set of all the positions which I'm just going to use X. This is general. This is way more general than the problem we're doing here. So this is just a set of positions and then it's also a function of the time derivatives of the positions which are related to the velocities and just to, this dot is just a nice shorthand way of saying dXI by dt, okay? All right, so it's a function of positions and velocities essentially and the function is defined as the difference between the kinetic energy which is a function of the velocities and the potential energy which we're going to assume here is just a function of the positions. So this is the function defined as kinetic energy minus potential energy, okay? And here I would range from one to the number of objects in our system so for us it's going to be three. Okay, now skipping lots and lots and lots and lots of details the beauty of the Lagrangian formalism is once you write this guy down there's an equation that tells you what the equations of motion are, okay? And you get those equations of motion by plugging your Lagrangian into the so-called Euler Lagrange equations, okay? And what those look like in this notation is derivative with respect to t of the derivative of the Lagrangian with respect to the positions and then I mean with respect to the velocity, sorry, and then subtract off from that the derivative of the Lagrangian with respect to the positions and set that equal to zero. Looks kind of scary but actually it's not. It's a very nice way of deriving equations of motion, okay? And like I say, if you take a more advanced mechanics class that's something you would learn. So the idea here is then what we want to do for our system here, we have the potential energy sitting right here, the kinetic energy is just going to be 1 half m times the time derivative of the deltas and we know how to write that down. So we're going to construct a Lagrangian for our three atom vibration system problem and then we're going to use a function in Mathematica which will calculate or determine the Euler Lagrange equations for us. Then we're going to rearrange those equations of motion and we're going to see that we can write them down as a matrix equation that is an eigenvalue problem and then we're going to see that the eigenvalues of that eigenvalue problem are related to the vibrational frequencies and the eigenvectors will tell us how the atoms actually move. In other words, they're going to give us the normal modes like what we just animated for the CO2 molecule, all right? So I hope I haven't lost you yet but okay. So what I'm going to do right now is we'll go ahead and get to this point here and then I'll need to come back to the board and give a little more information before we turn it into an eigenvalue problem. Okay, any questions? Does that look familiar? Okay, good. All right, so the first thing we're going to do is we're just going to type in the version of this guy here that was derived over there in Cartesian coordinates, okay? So I'm going to call that V-harm cart, so meaning the harmonic potential energy in Cartesian coordinates, okay? And I'm going to say that's equal to V0 plus K divided by 2, force constant divided by 2 times and then I'm not going to put the deltas in. I'm just going to call delta X, X, all right? So the first term is X capital B of T minus X capital A of T and then the whole thing squared and then we'll have the second term K over 2 times and now we put in X capital C of T minus X capital B of T, not a curly, squared. All right, so that's our potential energy. Now, kinetic energy, I'll call kinetic E equals, so this is just the sum of 1 half MV squared, so for A, B, and C, okay? So we're going to have 1 half times, I'm going to call the mass of atom A little m sub A and then I'm going to multiply that by XA prime of T squared, right, because according to our formalism over there, we write the velocity as the time derivative of the position. All right, and then we want to just put in analogous terms for B and C. So plus 1 half times MV times, parentheses, XB prime of T squared and then finally, 1 half times MC times XC prime of T squared, okay? So now we have our kinetic energy and our potential energy and now I can form the Lagrangian. Lagrangian equals kinetic E minus V harm cart, okay? So let's go ahead and enter that. Now, as I told you, the Mathematica knows how to generate Euler-Lagrange equations if we give it a Lagrangian, all right? But the command that you need to do that is in a package that's not normally loaded, all right? So we're going to load the package that contains the appropriate command and it's called variational methods. So we say less than, less than variational and then capital M methods. Oops, we have to spell it right. Now I'm going to left single quote and we can enter. All right, and the command that we're going to use that generates the Lagrangian equations is called Euler equations. So Euler equations, oops, I have to spell it right. And then we put in the Lagrangian and then we put in the variables that we want the equations for. So that's going to be X, we need a curly here. X A of T, X B of T, X C of T. And then we put in the time variable which is going to be T. And then a bracket and then I know from experience that the equations will look better if I put a post fix simplify. And another thing I'm going to do is I'm going to stash these in a variable which I'm going to call EOM for equations of motion. All right, so let's go ahead and let that rip and so notice what we get. Three equations, this one has only X A and notice it's got now the acceleration and no actually sorry, it's got the B and it also right because A and B are bonded. In any case, these are equations of motion but I want to rearrange them a little bit to make them look more amenable to writing as a matrix, okay? So I'm going to put these in the form X A of T equals something something, X B of T equals something something and X C of T equals something something. All right, and the way we can do that is as follows. I can say solve EOM and so if I want X A that's going to be bracket, bracket one, bracket, bracket the first element in that list, solve it for X A double prime of T, all right? And if we do that we get something that looks like acceleration of X A, second derivative with respect to time is equal to force on X A divided by mass of A, okay? And then we can do the same thing for B and C so we can just mouse this in, put in two and solve for B and then we can do the same thing for C. Now, why the heck did I do that? Well, the reason I did that I'm going to go over to the board and show you, okay? Okay, just to make it clear, does everybody understand what we have now? These are basically Newton's equations now for the displacements of the X coordinate of A, B and C, all right? That's what we've generated there. And Euler equations took our Lagrangian and did all this for us, okay? All right, now let's have a look at what we've got here. So if I write now those three guys as a vector, let's have a look at the first one. So the first one minus K over MA times X A of T, okay? And then we have plus K over MA times X B of T. And then to sort of hint at where we're going here, we have plus zero times X C of T, okay? And then for B, so these are actually deltas, actually all these are deltas in our original notation, all right? So the next one is K over MB times delta X A of T minus 2K over MB times delta X B of T. And then plus K over MB times delta X C of T, all right? And then for X C double prime, we have zero times delta X A of T plus K over MC times delta X B of T. And then minus K over MC times delta X C. Now, those of you who have worked with matrices maybe can recognize that we can write this array of equations here as a matrix times a vector, a 3 by 3 matrix times a 3 by 1 matrix. All right? So if I put here delta X A of T and then delta X B of T and delta X C of T, then I can get these three equations by multiplying by a matrix that has the following terms. They're just the coefficients of those in each of these equations, all right? So I have minus K over MA plus K over MA, zero. And then I have K over MB minus 2K over MB and plus K over MB. And then I have zero K over MC and then minus K over MC. You see that? So this is a concise way of writing our equations of motion. Now, it's not quite an eigenvalue problem yet. And to turn it into an eigenvalue problem, now we invoke one of the key assumptions of the so-called normal mode analysis, okay? And to kind of explain that assumption, I just want to remind you for the case of a single oscillating coordinate X, the harmonic oscillator. What we normally do is we write it as follows in physics. We have our equation of motion which is M X double prime of T is equal to minus K X of T, right? That's just Hooke's law for the force and this is mass times acceleration. I guess I can put deltas in here to make it look more like what we have, okay? And we can write this, this is what's often done when you talk about the harmonic oscillators, delta X of T is equal to minus omega squared X of T where omega now is the characteristic frequency of the oscillator and it's equal to, we can call it omega zero, it's equal to the square root of the force constant divided by the mass, okay? And we're interested in frequencies when we do normal mode analysis, right? We want to know for a given configuration of a molecule that's at an energy minimum, what are the frequencies and modes of vibration? So in order to do that, what we're going to do is we're going to suppose that for each vibrational mode which will correspond to, you know, a particular set of dynamics for the three atoms, there's going to be all of the atoms are going to be oscillating at the same frequency and so what we're going to say now is that we can write this, each of these equations in this form which means we're going to say it's equal to minus omega squared times X A of T, delta XB of T and delta XC of T, okay? So for one mode of the vibration, we would have one frequency omega, all right? And what's hopefully apparent here is I've just written this down as an eigenvalue problem. Matrix times vector equals number times vector and as we did before, we can take the, so there will be three such equations with three frequencies and we can collect them all into one equation which I'm going to write as the following. Matrix, that's this matrix here and I'm going to collect the three modes of vibration in vectors in an eigenvector matrix, call that X and then I'm going, we know that that will be X times lambda where now this is a diagonal matrix whose elements are minus omega squared. So we've transformed this problem of determining the modes and frequencies of the vibrations in this one-dimensional triatomic CO2 molecule into the problem of finding the eigenvalues and eigenvectors of this matrix here and that we know how to do. We just have to type that in, okay? Now what are we going to get out? Well, we're going to get out our, the eigenvectors are going to give us amplitudes of oscillatory motion and the eigenvalues will be related to the frequencies, all right? So let's go ahead and get those and then the last thing we're going to do is I'm going to show you how to animate the eigenvectors so you'll, we'll recover the usual symmetric and anti-symmetric stretch and then we'll check to see how good the frequencies are for a particular set of the parameters A, B and D and we'll actually see, by comparing to the experimental infrared spectrum of CO2 that this actually works very well, okay? So that's what we're going to do and that's the end of the mathematics part. All right, let's go ahead and type in our matrix. I'll call it matrix equals, it's going to be a three by three, this first element minus K over M, A and then we have K over M, A and zero. Second row, K over M, B minus two times K over M, B and then K over M, B and then we have for the third row zero K over M, C and minus K over M, C, okay? Now let's have a look at that in matrix form to see if it looks like what's on the board. Does that look right? Looks good. Okay, now let's plug in some numbers. So for the masses I'm going to use atomic mass units so M, A and oxygen is equal to 16, B is a carbon, so that's 12 and then C is an oxygen, so that's 16 and then I'm going to put in A equals 2.5, it's our curvature parameter, B the equilibrium bond length is 1.162 onkstrom units and D, the dissociation energy is 7.65 and this is in electron volts and we need to remind ourselves what is K, we determined earlier that K is equal to 2 times A squared times D. All right, now we're ready to get the frequencies and eigenvectors, all right, so the frequencies equal the square root of minus eigenvalues of the matrix because the eigenvalues are minus omega squared, if we want omega we take square root of minus eigenvalues. Okay, now I know from having done this example before that we will benefit by putting in the chop here to get rid of the tiny values that don't mean anything, chop here and here. Okay, oh I want to take off the semicolon. Okay, now we get three numbers, so there's three modes of motion, one has a frequency of 4.68, another has 2.44 and the other has zero, we'll talk about the zero in a minute. These are in funny units because energy is in electron volts, distances in onkstrom units and we're going to convert those to wave numbers so we can compare to experimental data and but that's probably going to wait until Tuesday. But in any case, don't be worried about the numbers because they're in funny units. But we do see there's one higher frequency, one lower frequency and one zero. Okay, now let's get the amplitudes of the motion, the eigenvectors. I'm going to call that modes equals and we're going to chop eigenvectors of matrix. All right and if you enter that you get a list of three lists, this is the eigenvector telling us how the atoms move for the vibration that has this frequency, this is the eigenvector that tells us how the atoms move at this frequency and this is the eigenvector for the zero frequency mode. All right, so we can already see what these vibrations are just by looking at these numbers. This one tells us that for this mode that has zero frequency all the atoms are moving in the same direction, right? They have exactly the same amplitude. So that's just a translation of the molecule as a whole. It's not a vibration. You see that? So that's not interesting. So we don't care about that one. Look at this one. This one says that the carbon atom doesn't move and the two oxygens are moving in opposite directions with respect to the carbon. So that's our symmetric stretch. And in this one here we have carbons moving in one direction, this oxygens moving to the left and the other oxygens moving to the left. That's our anti-symmetric stretch, all right? So we can already see that without doing any animation. But let's go ahead and do just for fun an animation of the two modes and just bear with me. I'm going to type in the long commands and then if you want you can kind of study what they're actually doing. Okay, now to actually animate the modes we have to do a couple of things. What we're basically going to do is we're going to step over cycles, we're going to step over a couple of cycles of oscillation, all right? And we're going to use as the oscillatory component. These are just amplitudes. This is not the oscillatory motion. It's just the coefficient that goes in front of the oscillatory motion. We're going to use a sine motion for the oscillatory motion to animate the modes. And I'm going to use a little time step which I'm going to call DT and I'll set it equal to 0.1. And then I'm going to use this variable here, I mode to indicate the number of the mode that I'm animating so this first one will be the first mode and then I'm going to say W is going to be a frequency so that's going to be frequencies of I mode. Such is going to pick out from the list the frequency corresponding to I mode. I'm going to use a variable called this mode to equal the eigenvector so modes of I mode and then I'm going to use the variable dim to tell me how many elements there are in the eigenvector so that's length of this mode. Then this number here is just a scaling factor to make my picture look nice and I'm going to call it 0.25. And now I'm going to generate a bunch of images that show the atoms moving around and the atoms are going to be represented as black disks. All right, so I'm going to say points equals graphics which will allow me to draw disks and then I'm going to specify them in a table. So I have disk of I plus scale times sine so here's our oscillatory motion W times T and then times the amplitude which is this mode bracket, bracket I and then put in a zero curly and then I think that's the size of the disk. All right, and then I'm generating the table for I goes from 1 to dim which is 3 the length of our eigenvector. All right, so it's going to give me a bunch of pictures where there's going to be three disks drawn but they're going to be in different positions depending on where we are along the oscillation and I'm missing something here, curly bracket here. Okay. All right, now I'm going to say plot range, arrow and these are some values that I sort of determined by trial and error to make a nice looking plot minus dim over 4 comma dim plus 0.75 curly comma and then minus dim over 4 to dim over 4 curly square bracket semicolon, you're going to be underwhelmed by how beautiful this, how not so beautiful this picture is going to be but it's kind of fun to be able to do it. All right, next thing we'll do is we'll say graphs equals table of points and then we're going to have the time variable t going from 0 to 2 times pi divided by w. 2 times pi divided by w is the period of the oscillation that has frequency w and we're stepping through at an interval dt. Okay, so we can put a semicolon there. We need instead of a comma here, there we go. Okay, and then finally, list animate 8 animation running arrow false. Okay, let's see if it works. All right, we got something. Notice we have a little box, it's got our CO2 molecule in it and now what we're going to do by pressing play is we're actually going to see what's the mode of vibration of the first normal mode that we calculated and sure enough as we surmise from the eigenvector, that's the anti-symmetric stretch. Pretty cool, huh? And you did it all by yourself and now you know where that comes from. Okay, let's go ahead and do the second one. Now that we've done all this hard work, we just mouse and just need to change a couple of things and what we need to change is only i-mode because we set it up to be nice in general. We enter, get the same picture except now we see that the second mode is the symmetric stretch. Pretty cool, huh? Any questions? Okay, so let's just reiterate what we did today. So first of all, I just want to tell you that the objective of this whole exercise, well there were a few objectives. So one was to see how we could put together a lot of the various things that we've learned through the quarter to work on a pretty complicated problem and we needed one or two little extra things like the Euler equations, okay? So that's one objective. The other objective is that I wanted to allow you to explore where those normal modes come from that you've probably seen on at least a few occasions in your textbooks, okay? And then also to have you appreciate a little more what's involved if you actually want to use theoretical calculations of vibrational modes to assign actual vibrational spectra. The normal mode analysis or normal mode method is a route to being able to do that. Now to convert the units is actually a little bit non-trivial so we're going to do that next time because what I want to do, what I want to show you is that these numbers we calculated, let me go back to the big screen here. So we have these frequencies, right? And I told you they're in some funny units because we used a mixture of units in our calculations. So what we're going to do next time is we're actually going to convert the first two numbers so this is the frequency of the anti-symmetric stretch and the symmetric stretch. We're going to convert those to wave numbers and then we'll go look up experimental data for the anti-symmetric stretch and symmetric stretch and CO2 and compare. And what we'll see is actually that the agreement is quite good. And what that tells us is that the Morse model that we started with and the harmonic approximation that we made along the way were actually pretty reasonably accurate for being able to identify these normal modes in CO2. All right, so that's something to look forward to on Monday and I guess that will conclude our class today.