 In order to solve our stokes wave problem up to order epsilon square we had to actually go to order epsilon cube. This was necessary because we wanted to determine omega 2 the correction to the dispersion relation and this omega 2 did not appear in the equations up to order epsilon square. So, now we have written our equation the Bernoulli equation boundary condition we have written it up to order epsilon cube. In particular some of the terms here this is a slightly lengthy exercise some of the terms are 0 even then we have 5 terms we are left with. We are trying to understand how these box terms have a reason. So, once we understand these 3 the other 2 you can understand it in a similar manner. So, I had written down one term which was like this and this would be in the Bernoulli equation in its primitive form before we did the expansion this would be del phi by del t at z is equal to eta. And then I had done the transformation and I had written the perturbative expansion and then we had got up to here note that whatever I have written in the last line of the slide has come from the Taylor series expansion of just this term. Now, let us understand where are these 3 green box expressions coming from. So, first the expression in which contains omega 2. So, that you can see very easily it is omega 2 into del phi 1 by del tau. So, omega 2 into del phi 1 by del tau the product of epsilon square into epsilon epsilon will make it an order epsilon cube term. So, that is where this term is coming from what about this term eta 1 square by 2 into a third derivative of phi 1. So, eta 1 square will appear here there is a third derivative. So, the product of there will be an because there is a square here this will come out as epsilon square. So, the product of this epsilon square and that epsilon will make it an epsilon cube. So, the product of this whole term with 1 here will just give me the term that I want. So, this term similarly you can find where we would have got this term from. We need an eta 2 the only place here in this expression at the last line where eta 2 appears is here. So, you can see that there is an eta 2 here and then we need a second derivative with respect to phi 1. So, that second derivative is this. So, it is a product of eta 2 with the second derivative and once again with 1. So, it is there is an epsilon square here there is an epsilon here that makes an order epsilon cube and then if you take the product with 1 you will get this term. So, I hope it is clear how does one write these terms. In order to determine omega 2 we will also have to write the modified Bernoulli equation. The modified Bernoulli equation has an extremely lengthy right hand side. And so, if you follow this procedure you will be able to write all the terms that I am going to write in the modified Bernoulli equation next. But before that let us make sure that we have understood how did we generate these terms on the right hand side of the Bernoulli equation boundary condition. So, this is how we got it. Now, you can also see there are other terms in if you look at the last line of this slide there are other terms which have appeared in this expression. They are either epsilon to a smaller power. So, either they are order 1 or order epsilon square or maybe they are order epsilon 4. If they are order epsilon square they would have already appeared in the previous equations. If they are order epsilon 4 they will appear in the next set of equations. We are not going to write down equations up to order epsilon 4 it will not be necessary. So, I am only going to focus on from this last line we are only trying to understand which are the terms which appear at this order this is order epsilon cube. And so, we have explained now how these 3 box terms come from. In particular this is a term of interest because this term contains the reason why we had come to this order this contains omega 2. And so, this is where these 3 boxes these 3 terms which are contained in the green boxes have come from. They are all coming from this term in the Bernoulli equation. Similarly, you can understand how does this term come from? How does this term come from? Go back to your primitive equations and try to understand which term gives birth to these terms. You will have to do a similar exercise keep writing Taylor series approximations, Taylor series expansions until you get all terms which are supposed to appear at a given order. Note that even if you miss one term this is a very delicate step and you have to be very careful with your algebra. Even if you miss one term your answers will be wrong unless that term is 0 or something like that your answers in general will be wrong. So, it is very important that one includes every term which is supposed to appear at a given order. So, now let us proceed. So, now we have determined the origin of these terms. Now we need to do whatever we did at the previous order we need to work out the functional form of all the terms which are not 0. Recall that the terms where there is a phi 2 appearing are all 0. So, I have put blue arrows indicating they are all 0. We do not have to worry about those terms, but we will have to work out the functional form of the remaining 5 terms. If you do that you can do that because you know we know now eta 1, we know phi 1, we know eta 2 and we know phi 2. Phi 2 has been used to set some terms to 0. So, all you need to do is use the information of eta 1, eta 2 and phi 1 to evaluate the derivatives that appear in these 5 terms and get the resultant expression on the right hand side. If you do that I have already done that I think you can do it yourself and so I will give you the final answer. The final answer is del phi 3 by del tau at 0 plus eta 3 after some amount of algebra is just 3 by 8 cos 3 times x minus tau minus 3 by 8 cos x minus tau plus omega 2 cos x minus. Note the appearance of the third harmonic now. This is just an outcome of the fact that we are having cos cube sin cube quantities. This is at order epsilon cube and so you will have get products which are cube of the primary. The primary is cos of x minus tau and so we are getting cos cube sin cube which can in turn can be expressed in terms of cos 3 x minus tau cos sin 3 x minus tau and so on. So, this is the third harmonic again a non-linear effect. So, this is my equation B3 with the functional form of the right hand side worked out. In order to determine omega 2 we need to actually write down equation C3. This is the lengthiest part of this exercise because in the equation for C3 the number of terms on the right hand side is just too many. So, I am just going to write down the equation C3 and using the same argument that we have provided for equation B3 you can see whether you can work out all the terms. This is a very lengthy process. So, it will take me some time to write down all the terms which appear on the right hand side of C3. C3 is the modified Bernoulli boundary condition. So, C3 is basically del square by del tau square. Now I am going to write down all the terms. So, this term will be 0 because there is a phi 2 which appears here. This term will also be 0 because there is a phi 2. There are a total of 17 terms which appear on the right hand side. So, it is going to take some time to write all of them. Although it may seem that these terms are going to become very lengthy, eventually there will be a lot of cancellation and the right hand side will become very simple. Again this term is going to be 0 because it depends on phi 2 and all derivatives are applied at z is equal to 0. That term is also going to be 0. The previous one is also going to be 0 and then I have plus once again omega 2 makes its appearance in the last term and this whole thing gets applied at z is equal to 0. So, every term gets evaluated all the derivatives of phi get evaluated at z is equal to 0. Clearly this is a very lengthy exercise, but it has to be done if we want to calculate what is the numerical value of omega 2. So, in deep water it is the algebra is lengthy. If we do this exercise in shallow water or even finite depth, the algebra is even lengthier. So, it is better to stick to the deep water approximation to get an idea of how does one determine omega 2. So, these are the terms and as I said earlier some of these will go to 0. So, this term will go to 0. There is a phi 2 there. This term will go to 0. Then this term will go to 0 and this is also 0. So, total of 6 terms will go to 0. We are still left with 11 terms and I leave it to you to work out the form of these terms. You have to label them as 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 like that and then work out one by one. It is just a lengthy exercise. It is not difficult because each of these terms you know. We know what is phi 1, we know what is eta 1, we know phi 2, eta 2. So, you just have to take the derivatives and it becomes easy to take the derivatives because the exponential factor does not really contribute. Sometimes it gets squared and it may become e to the power 2 z, but otherwise it just goes to 1. So, you have to calculate this and the interesting part is when you have calculated all the nonzero terms and then simplified them they will just there will be a lot of cancellations. So, there will be a lot of cancellations and you will find eventually there only one or two terms actually survive after doing all the cancellations. You will see only one or two terms survive. So, let me write down the final answer and you will see that the final answer is extremely compact. So, I am going to write down equation C 3 in its final form at z is equal to 0 or 0 let us write this plus twice. So, all the 11 or 12 terms which survived this thing they internally cancelled each other and we are left with only two terms both of which are proportional to sin of x minus tau. So, this is the simplification which happens. So, now let me write this as twice omega 2 minus 1 sin of x minus. So, now we need to determine omega 2 we do not want to solve the problem at order epsilon cube we only are after the value of omega 2. Now, in order to determine the value of omega 2 notice that this is a resonant forcing term why is this a resonant forcing term. So, I will show you that this is a resonant forcing term. So, let us look at an equation whose form is this is equal to sin x minus tau I have just taken the left hand side of this and I have just replace that by just unity you know I am just saying 1 into sin of x minus tau this equation is of course, related to the equation written on top. I claim that the particular integral of this equation this is a differential equation it is a partial differential equation but the left hand side is evaluated at z is equal to 0. So, the particular integral of this equation is of the form half tau cos you can verify this we will verify this shortly. But you can see where so this is like our what we did what we had in our ordinary differential equation case we had t sin t t cos t kind of terms which would come why is this coming that is because this quantity sin x minus tau happens to solve this equation. So, happens to be a solution to the homogeneous equation. So, whenever you have something which is a solution to the homogeneous part then the particular integral has to be obtained by multiplying that by the time variable. So, we have this tau and for this particular right hand side there is a factor of half in the particular integral you can check this very quickly that this actually solves the equation. So, this is a solution this is a solution to that equation solution to now. So, you can see that del phi 3 by del tau would be basically half cos x minus tau we are basically saying phi 3 is phi 3 at 0. So, not mentioned it phi 3 will have a yeah. So, this is this plus and so del square phi 3 by del tau square is just sin of x minus tau minus half of tau cos x minus tau. And if you work out the value of this derivative you know so phi 3 will have a e to the power z. So, we should let me write or e to the power z here let me get rid of the 0 here so that it is clear. And if you work out del phi 3 by del z at z is equal to 0 you will just get half tau cos of x minus tau and if you add it to this part will get cancelled out and you will just be left with sin of x minus tau. So, it is easy to check that this is a solution to this equation. What does this imply? This implies that every time we have something like this appearing on the right hand side anything proportional to sin of x minus tau we are going to get a secular term appearing in our expression for phi. If we obviously do not want that because we are looking at a wave problem we are looking at traveling wave solutions. And so the velocity potential cannot just grow in time if we want to eliminate that then we have to eliminate the term which causes this thing to appear. We have looked at these kind of problems very early on in the course we are again encountering the same problem. And we anticipating this problem we had already taken into account omega 2. I encourage you to go and think that if we had not expanded time using the Lins state Poincare scheme what would have happened? We would not have got a omega 2 and consequently we would have a resonant forcing term which could not be eliminated. Now we are going to eliminate the resonant forcing term and you can immediately see what is how to eliminate it we just have to set its coefficient to 0. So this is just telling me that if I set omega 2 is equal to half then the problematic term. So this is the problematic term which causes this to appear. So this will go away and the equation will become completely homogeneous. Once again I remind you that we are not trying to solve the equation up to third order. We are just trying to determine omega 2 up to third order and our problem has been solved. Omega 2 has been determined and its numerical value is half. Let us now put all the things that we have done together. So we have seen that eta is epsilon eta 1 plus epsilon square eta 2 plus there would be order epsilon cube corrections. Phi is epsilon phi 1, phi 2 was 0. So this would have an order epsilon cube. We anticipate that it could be epsilon cube whether there is a phi 3 or not has to be actually gone back and we have to really solve the problem at order epsilon cube in order to determine whether phi 3 is also 0 or not. We have not done that so that is why I am just writing order epsilon cube. It could if it turns out to be 0 then this would be order epsilon 4. So it is this and so if I write eta as epsilon cos x minus tau plus half epsilon square cos 2 of x minus tau. I am just writing the value of eta 2 plus order epsilon cube phi is just epsilon e to the power z sin of x minus tau plus order epsilon cube. If we dimensionalize these expressions the utility of the fact that omega 2 is equal to half will become apparent if we dimensionalize these expressions. Let us dimensionalize them. So I will write so all variables with hats are dimensional. So recall how we had non-dimensionalized their expressions epsilon was a naught into k and so this became cos and the argument of cos is kx hat minus square root gk. Now we are going back from tau to t to t hat. So this is t hat into 1 plus half. This is the half that is coming from omega 2 and epsilon square which is a naught square k square. This is the argument of the first the primary mode plus half a naught square k square and so if I pull out the a naught into k then this just become a naught into k. So this is cos again the same but now with the 2 times plus dot dot dot. So whatever appears here is basically what I have written here. So this we can rewrite it as I can cancel out a k on both sides and I can rewrite this as cos of kx hat and now let me write this as omega into t hat and I will define what is omega plus half a naught square into k cos 2 times the same thing plus dot dot dot. Similarly you can do the same exercise for phi. Phi is basically at this order there is no correction from nonlinearity. It is basically still the linear phi. So we will just have a naught g to the power half by k to the power half e to the power k z hat into sin kx hat minus omega t hat. And what have we defined as omega? Omega is basically just square root gk into 1 plus half a naught square k square plus of course there will be further corrections if we go to higher order. This is the important thing that we are finding. This is the, this is very reminiscent of what we had found for a nonlinear pendulum. Now we are doing a wave problem. We have used the same Lenzsted Poincare technique. This half is coming from there and we are finding you see this is at linear order. If we had done it for sufficiently small a naught we would have just concluded omega is equal to square root gk. This is just our deep water dispersion relation for surface gravity waves. We are finding that what we had found earlier is an approximation. The real dispersion relation is omega is equal to square root gk into 1 plus half a naught square k square plus something and so on. We have to determine these terms. We have to go to higher orders but we have done the first correction. So this is telling us that the frequency for a given k for a given wavelength the frequency not only depends on the wavelength it also depends on the amplitude of the Fourier mode. The amplitude is a naught. So the amplitude is a naught. In addition there are corrections there are nonlinear correction. So this is one correction that the frequency of the wave is different from that of the linear wave. There is a correction to the dispersion relation. There is an amplitude correction to the dispersion relation. In addition nonlinearity introduces these higher harmonics. We are writing down up to order epsilon square. So that is why the second harmonic has appeared. Note that these are what are known as bound components. Why are they called bound components? Because notice that this mode has wave number 2k and a frequency 2 omega. You can check from this dispersion relation. This is a nonlinear dispersion relation. Omega is a nonlinear function of k. So if I replace k by 2k the frequency will not become 2 times omega. So whatever is the frequency for k if I replace k by 2k the frequency will not double. And so these components these bound components do not satisfy the dispersion relation. So in this some sense they are bound to the primary mode. So this is basically the qualitative effect of nonlinearity and this entire thing is basically what is known as the Stokes traveling wave solution. You can determine this up to more and more orders. It has already been done in the literature and Stokes traveling wave is known to a very high degree of accuracy. Apart from the fact that we have discovered a nonlinear traveling wave solution which is very interesting. This is also of practical use. It is used in many engineering contexts to model ocean waves. In particular ocean wave breaking, numerical simulations of ocean waves are initiated by modeling them as a Stokes wave, as a large amplitude Stokes wave. So these are the qualitative features. Let us plot these waves up to the second harmonic and let us get a physical feel for what does the wave look like as we increase a naught. So you can see that the correction the if I put time t equal to 0 I can just plot eta from this expression. So I have done that and you can see I have done it for small value of epsilon and a larger value of epsilon. So for a small value of a naught into k and a large value of a naught into k. You will see that if a naught for a given k if a naught is sufficiently small then this second contribution will be very small and it will almost be a pure Fourier mode of the form cos kx. But as a naught gets larger and larger the second component makes a contribution. So this is the picture. This is small a naught into k. So it is just a regular Fourier mode you know just a cosine. I am plotting this at time t equal to 0. So it just cos kx here I have chosen k to be 1. But as I increase a naught this is larger a naught into k. Notice what is happening. The crests are becoming sharper. The troughs are flattening. So there is a qualitative change in the shape of the wave. There are a lot of interesting things about these waves that have been under active investigation over many years now. So this is what we learn about the Stokes wave. One can also do this exercise. It is also of interest to derive the Stokes wave on a pool of finite depth. The algebra gets even more lengthier. So we are not going to do that here. I will provide you a reference at the end of this video where you can read up about the expression for the Stokes wave. The expression for eta and for phi on for Stokes wave on a pool of finite depth h. And there you will also find the correction to the dispersion relation the amplitude correction to the dispersion relation for a on a pool of finite depth. If you hold k constant and take h to infinity you will recover the results that we have provided here. So with this we come to the end of what we wanted to discuss on Stokes wave. I hope you have seen now various aspects in this course. We have done a very similar exercise using the Linstead Poincare technique earlier and we have found out the amplitude dependence on the frequency of the pendulum. Now in the last video we are finding a very similar thing for a surface gravity wave also. So I hope you have understood the connection between these non-linear surface waves and the non-linear pendulum. Of course the dynamics of these waves tend to be far more interesting. There are interesting instabilities which happen for the Stokes wave so on and so forth. And you can read some of those things on your own.