 In previous lecture, we studied the solution method of the Hewitt's equation that was based on the matrices. Now, we will see there is another way of solving the Hewitt's equation and we will see in this lecture. What we did earlier? Actually, we reduced this equation to simple harmonic oscillator equation by keeping k constant in different elements. This means we divided complete optics in pieces, one piece may be of the one magnet and inside that piece k is constant and we solve that equation just like the simple harmonic oscillator equation. This method which leads to matrices also known as piecewise solution of the Hewitt's equation. Again, we can see that how the k varies, it is just a repetition of something which we learned earlier, but repetition is sometimes better to learn in effect. So, suppose this is a bending magnet and we are plotting in the bottom graph k for these optics. Since certain dipole magnet k may be zero, what is that case in which a dipole magnet can produce k zero? The first very case is it should not have the gradient and then in the last example of last lecture, we have seen that parallel age magnet acts just like the drift. So, if this is a parallel age magnet without any gradient then k will be zero. So, assume that this kind of magnet is this. So, k is equal to zero. Now, there is a focusing quadrupole. Again, remember this is a convention. When we say focusing quadrupole, means it is focusing in the horizontal plane. So, k will be high here and it is again a convention that we make k positive for the focusing quadrupole and height of this k is just showing the magnitude of it. k for this quadrupole magnet. So, k will be just like here inside this quadrupole k at certain constant. Then again drift, k will be zero and then there is a defocusing quadrupole in this example. So, k will be plotted on the negative side and height of this plot is just similar to the magnitude of this defocusing quadrupole strength. Then there is again drift space k is zero. Now here in this bending magnet, there may be some k means may have some gradient or it is not a parallel age magnet. So, some k is there and you can see that direction of k is like the focusing quadrupole means it is focusing in the horizontal. Maybe a sector magnet like that. However, you can see that k is lower than quadrupole because this provides a refocusing and quadrupole provides a strong force. So, in general, in usual the optics of charged particles, the focusing effect of the dipole magnet is weaker than or not much significantly compared to the quadrupole. And again there may be a quadrupole. So, again k rises to this value and again a drift space k is zero. So, such kind of function k may be defined by such type of function of s. And in each piece we solve the equation of motion and do the solution. This is known as piece by set. Now we see we can plot various trajectories. Various trajectories means trajectories associated with different initial conditions very easily using this piece by solution or matrices. It is just an example in which you can see that the first element magnetic element is defocusing quadrupole. Second is focusing quadrupole and third is eliminating defocusing quadrupole and fourth is focusing. So, this provides overall focusing if we choose carefully the strength of this quadrupole as well as distance between these four. So, how the matrices can be used to produce the trajectories within different initial condition you will see in this way. So, now as this trajectory reaches to this magnet all defocuses and then it focuses means these are coming towards the descent trajectory. Again, this is a defocusing magnet. So, effect will be such kind of thing and lastly we have a focusing magnet. So, all the trajectories again are coming towards the descent trajectory. So, you have an overall focusing solution for this space. Now, is there any way to solve the Hayes equation really keeping KA as a function of us? Is there any mathematical tool in which we need not to break the optics in pieces and for each optics we solve differently? Yes, definitely we have. Now, suppose this is the picture of one of the trajectories which we plotted in the movie. Now, you can see that this trajectory is going upside due to defocusing magnet and again due to focusing it is coming towards the descent trajectory. And again this defocusing magnet produces some effect of defocusing some angle with respect to descent trajectory has been increased and again a focusing. So, overall under the action of defocusing and focusing effect due to these vertical magnets, the trajectory is seeing some kind of oscillatory behavior along the descent. Means this trajectory shows some kind of oscillatory behavior and you can see in each trajectory of that movie that some kind of oscillatory feature is there. Means this focusing and defocusing effect actually produces some oscillation in the trajectories. These oscillations are known as betatron oscillations and transfers beam dynamics is actually the studies of betatron oscillations. So, now we know that there will be some oscillatory type solution for the helix equation. Definitely these oscillations are not very simple. You cannot represent it by single sinusoidal or like that. So, this may be because of the s dependence of k. S dependence of k means if you will choose s, say s is equal to s1, you will get different k means different wave length locally here. And if you will put s is equal to s2, you will get a different wave length locally here. It means amplitude will also be a function of s. Keeping these two things in mind. One, oscillatory solution. And the amplitude may be the function of s. We can have a trial solution of this equation. So, we can write down the trial solution like a, b as a function of s cos phi s and phi c. Now, because this is a second order differential equation, we require at least two constants of motion. That's why this a and phi 0 serve that purpose. So, a and phi 0 can be obtained using the initial conditions. Now, because this is our trial solution. So, what should be the nature of b and phi? If you want to know that, we will put this trial solution into the helix equation. So, for doing this thing, we have to obtain the x double prime means second derivative of x with respect to s. So, differentiate x with respect to s. We will get now here amplitude itself is a function of s. So, we have differentiation of this amplitude also. So, a b prime s cos phi s plus phi 0 minus a b. This is the differentiation of the cos phi in term. So, cos phi s plus phi 0 phi. This is the differentiation of phi with respect to s. We don't know what is the dependence of phi on the s. We will know by putting this term into the helix equation. So, just we are putting phi prime s here. Again, differentiating it. So, we will get x double prime this equation a b prime double prime cos. I have omitted here the writing down again and again this s in the bracket. Keep it in mind that these quantities have dependence on x. So, this a b double prime cos sin term minus a b prime sin term with phi prime. And these all these terms when you differentiate these two terms. We will get this equation. This is an easy thing which you can do. Now, we have x double prime. And we also know what is the overall solution x. So, x double prime plus kx is equal to 0. This is the helix equation. So, these two equations we can put into the helix equation. So, we will get these when we will put these terms in the helix equation. This is the expression which we get. Now, you can see here that this is true. Phi is a function of s. So, this is true for everywhere. Whatever is the s, it should be the true cos helix equation is valid everywhere. So, cosine and sine coefficient should separately be 0 to satisfy this equation. So, let us do that. So, here we collect the term with sine. So, this is the first term with sine and this is the second term with sine. So, the coefficient of sine is here is minus twice a d prime pi prime minus a d pi double prime is 0. So, this a cancels out. So, we get and minus sign also we can make it 4 plus 2 e prime pi prime plus e pi double prime is 0. This is the equation we can. Now, we want this equation can give you the relation between the amplitude and fix. b is the amplitude part which depends on the s and phi is the phase of those beta transolutions. So, this equation actually relates amplitude with fix. If we multiply this equation again with b, it becomes perfect differential. Now, you can see that this is a perfect differential and you differentiate it. b is perfect, right? You will get the above equation. So, this is the perfect differential of this b square pi prime. If you will differentiate it, you will get 2 b e prime pi prime plus b square pi double which is the above. So, now, differentiation of b square pi prime is 0. Means this term which is written inside the bracket must be constant. So, take it constant as 1. So, 5 prime is equal to 1 by b square. 5 prime means you are writing to make it. d5 by ds is equal to 1 by b square. Means how much phase advances per unit length. This is and compass is in 1 by b square. So, instead of a square, if we have simple term beta, I replace b square by beta. So, 5 prime is 1 by beta. So, we have a simple relationship and simple interpretation of this beta. This beta is now, you can say d5 by ds is equal to 1 by beta. So, beta actually is the length of the optics for unit phase advance. So, beta has a meaningful thing. It is the length of the optics equal to the length of the optics in which beta term phase advances by unit. So, here you can see that if you will calculate phase, it will come out to be ds by b. So, this is a bit different relation than the simple harmonic oscillator. In simple harmonic oscillator, what you have? Pi SHM is equal to omega t. So, pi SHM varies linearly with the independent parameter t. Pi is directly proportional to t, but in the case of beta term oscillation, it is not so. Pi varies with integration of ds by beta. So, it has a complicated relation with the independent parameter and visualization is a tricky. In the case of simple harmonic oscillator, the visualization of phase is quite easier, yet it is a quite tricky. Now, in the solution, we can write down at the place of d which was our trial solution root beta using this relation. So, our solution will be a root beta cos phi plus cos phi naught and this phi s is basically this. So, our whole solution will be in the form of beta. Now, as we have b root beta, so b prime will be this quantity. This is just the differentiation of beta and d beta by ds and double derivative of b will be like this. So, now, if we make the coefficient of the percent terms, we will get the second equation. This equation was obtained using the coefficient of the symptom equation. So, in this case, we will get the equation of beta and this is the equation of beta, how it varies with s. This is a bit complicated. However, in later chapters, you will see that it can be reduced down to very simple form. So, right now, we will not talk about this equation anymore in this. Now, because our solution is a root beta cos phi plus cos phi, we can calculate x prime also very easily. Now, here you can see the amplitude part beta as s dependence. So, when we differentiate with s, beta has to be differentiated. So, this is a 1 upon 2 root beta is the differentiation of root beta and d beta by ds is there. Cos as it is and now root beta as it is and cos has been differentiated sin phi plus sin and then d phi by ds. Now, d phi by ds, we know this is a 1 by beta. Now, what we are doing, what we are trying to do? Actually, we have x is equal to x upon root beta if we write down. This will be a cos just like the simple harmonic oscillator. And in the case of simple harmonic oscillator, if we differentiate x, we get the velocity. In that case, velocity is also omega a sin phi with minus sign. So, can we get some form of differentiation of x similarly? So, we are trying to do that. So, if this a root beta here cos phi plus phi naught can be put in the form of x upon a root beta in this equation. And when we put x upon a root beta at the place of cos phi, we will have only sin term in the equation. This a and a will be cancelled out. So, finally, you will get x prime beta minus half beta prime x is equal to minus a root beta sin phi plus phi. This is exactly what we wanted. Now, right hand side contains only sin term and here right side contains only cos term. We want to put one thing here. In the case of simple harmonic oscillator, we have x is equal to a cos omega t. So, if we differentiate it means we calculate x dot. When I am using the dot, it means it is a d by dt. When I am using the prime, it means it is d by dx. So, x dot will be equal to minus omega a sin omega t. Now, from this, you can get x upon a is equal to cos omega t. And from here, you can write down x dot upon omega t is equal to sin omega t. So, using these relations, you can get x by a square plus x dot upon omega a square is equal to 1. So, in coordinates x and velocity, you get an ellipse in the case of simple harmonic oscillator. Can we get such kind of any curve in the case of beta term oscillations? We are trying to do that. First term, we obtained x is equal to a root beta cos phi. And now some variable combination, we want in the form of something into sin phi. If we and we have obtained this relation, that's something into sin phi. So, now we square and add, we can get such kind of solution which we obtained in the case of simple harmonic oscillator. However, here, you can see that it involves d beta by dx, d beta by dx. And it is with minus half. Let us define this is a new variable. Say this is that. So, now our equation become x prime beta plus alpha x is equal to a root beta sin phi. And our displacement is x is equal to a root beta cos phi. So, now we have a root beta cos phi and here a root beta sin phi. So, if we square it and add it, we can get here 1. And our equation will be like this x square. I have done this square of the first lh's term. Second lh's term is also a spin squared. It will be equal to p squared. We turn the phase part, it's been removed because of the cos squared pi plus sin squared pi. So, now we open this bracket. So, this will be 1 plus alpha square x squared and rearranging the terms. Putting together the terms with x square and x x prime and x prime is equal to a square beta. So, we here, a was the constant. We took the amplitude as a root beta in which beta has the s dependence while a is the constant. So, if we divide this equation by beta, then in RHS we will get a constant quantity. Let us do that. So, this will be 1 plus alpha square by beta. Here beta will be cancelled out and this will be cancelled and this. So, 1 plus alpha square by beta. See, this is another variable namely gamma. So, we have now three parameters. One is the beta which defines amplitude at a particular location of s. Then we have differentiation of beta with respect to s and we relate it with a new parameter alpha. And now alpha and beta combined gives you a new parameter gamma. So, definitely we have three parameters but two are of these independent, how it can be calculated using the values of 2. So, there are basically two independent parameters which we have introduced. Now, the above equation becomes gamma x square plus twice alpha xx prime plus beta x prime square is equal to this. Now, you can see one thing here that left part contains gamma alpha beta. This beta basically is a function of s. Alpha, because it is a differentiation of beta, it is a unique function of s. And gamma is also a function of s. So, in a lecture's part of this equation, we have three parameters which have s dependence. And also, we have x and x prime which is the coordinate of an particle trajectory along s. It also varies with s. So, a lecture's part is a function of s but the R H is the constant. Means the combination of such s dependence part means constant. Means we have found the invariant of the motion. It is just like that in the course of mechanics, you find that energy is the invariant of motion. Here we find another invariant of motion. This is the combination of this. In case of energy, you have x and px. These two are variable and that vary with the time in any dynamical system. But the combination of potential energy and kinetic energy remains constant in the case of conservative system. Similarly here, in LHS part, we have s dependence terms. The combination of these terms gives it constant. So, this is the invariant of motion.