 And what we will do is we will look at, let me explain what we are trying to do now, right, so that we get the context right. We have, we know that the error in the solution En plus 1 satisfies this, is determined by this iteration equation, is that fine. Now what we have is, we are going to, this error corresponds to a function Exy, which is the error in the original solution, okay. So remember that every time that you have a phi H, there is a corresponding phi, right, there is a corresponding, I would say, so see this actually corresponds, though they are set of points, it actually corresponds to a function, it is a function because we can use linear interpolants to find the value at any given point, am I making sense, okay. See if you, as I said before in an earlier class, you are supposed to be giving me a solution to Laplace's equation. And if I say that I have a square and in this case we have actually gone from, we have taken an L by L square, for the sake of this discussion we have gone to an L by L square. If you say that I have gone to an L by L, if I have, if you are saying that you give me a solution to Laplace's equation in this square, right, that means I have a right to pick any point and say what is the function value at that point. And you have to give me a value, you cannot say no, it is not one of my grid points, I cannot give you a value, that is not an acceptable answer. Then you have not given me a solution, anywhere in this L by L, L by L square, if you say that you have solved Laplace's equation satisfying the boundary conditions that I have prescribed, then you must necessarily give me a value, right, at any given point. You understand what I am saying, which is why we talked about the hat functions and all those ways by which given values at nodes, you are actually able to give me intermediate points, that was the objective, okay. That was, that is the reason why that we know that there is an underlying function representative, representation, though I am giving you nodal values, is that fine. So, EXY corresponds to that. Now, what we are asking, the question that we are asking is, if I go through this sequence, En plus 1, P times En, if I keep repeating this, I will generate a sequence which is E0, which is our first, the error that we make when we assume the solution. Then you have E1, E2, E3, these are not E as in 2.71, this is E as in the error, right. So, you E4 and so on. So, the question that we have is, does the sequence converge? What we are proposing to do now in today's class, what we are proposing to do is, we are going to expand this using Fourier series, we are going to expand this using Fourier series, okay. The original equation, this is a linear equation, this is a linear equation, Fourier series is a linear combination of sines and cosines, okay, right. So, if I were to substitute the Fourier series, any mode, any single mode of the Fourier series, if I ask the question, what does this equation do to any single mode of the Fourier series, right? If I pick a general mode and ask the question, what does this do to the amplitude of that mode? This first wave number or the second wave number or the third wave number, right, I can address that question individually because the equation is linear, is that fine? Okay, because this crop top. So, essentially what I am going to do is, I am going to write E of x, y as a Fourier, but it is in two dimensions, Fourier series in two dimensions. And I know that the boundary conditions are 0, because this is the error, this is the error, so the value of the error on the boundaries is 0, because the boundary conditions are applied exactly, so it is non-zero only on the interior, okay. So, if you do Fourier series normally, you have to do something called periodic extension and all that, because your initial mode, if you think about it, just in one dimension, if this is x, that is y, just in one dimension, the initial mode sin x will be something like this, okay. The initial mode sin x will be something like this, it is 0 here, it is 0 there, your error can contain, your error can contain, for example, your error could be this, could just be this, okay, your error could just be this. So, you have to be able to represent this, so this goes from 0 to L, what we normally do is, we extend it to –L and there is a function on that side that we are not going to worry about, because I do not care, it is not in my problem domain. So as a consequence, this E of x, y, I am just saying this so that you can go back and look up your Fourier series, right, and figure out where it is, okay. As a consequence, I can write E of x, y as a double summation, because it is in two dimensions, Al Bm exponent I pi L x by L and exponent I pi M y by L, is that fine, everyone? And the summation right now, this summation, I will just write M L and M. The summation, if you go look at, look up your Fourier series, the summation actually goes from a –n to plus n or something of that sort, okay. I will just write L and M, you go check this out, okay, because there are, there are, there are grid points that go, because I have extended it to –L, there are grid points that go, there are grid points that go the other side, if I have started numbering this at 1, this would be –1, –2 and so on, but we would not go and get into that, I do not want to get into that, okay. So I just leave it as M and L, okay, fine. Now where do I want to, at what points, but I do not, though this is a continuous function, I plan to substitute it into that equation, the iteration equation, right, which is a discrete equation and that is going to be evaluated at my grid points, which are x p, q and y p, q. So because, because it is a uniform grid, I do not need the q here, nor do I need the p here. So x p is p times h, h is the grid size and y q is q times h, right. So this turns out to be e x p, so I will write e of x p y q, I will write that as e p q, turns out to be a summation over L, summation over M, a L, b M exponent i pi x by L, x is p h by L and i pi M and L here, q h by M, q h by L. Now we have already seen, so e p plus 1 q, what is the relationship between e p plus 1 q and e p q? So the difference will only be a e power, e power i pi h, right, you can work that out, so e p plus 1, so it will be turned out to be an e power i pi h by L times, let me write exponent, I do not want to write e power because I am already using e for exponent i pi h by L into e p q, is that fine, right. Now because they are equal intervals, h by L is known, L, L, L, Lh, Lh, Lh, yes, so I have to have the summation, okay, I do not want to do this, I am doing this a bit early, let me do this, I have to take component by component first, okay. Now this e, I want to substitute into en plus 1 equals p times en, okay, because this equation is linear, this is linear, I can swap out the sums and I can swap out the double summation and so on and component by component, I can actually extract out the a's and l's, component by component by appropriately doting it with the appropriate e power, appropriate sine and cosine, right, they are all orthogonal to each other and so on. So in fact it is enough if I just look at, if it is enough, if I can take any one wave number and ask the question what is the effect that this iteration equation has on that wave number, okay, I have an orthogonal set essentially, I can ask what happens to any one of them, is that fine, okay. So the objective of course is we want to find out which wave number is growing the, growing the, is decaying the slowest, you want to find out which of these wave numbers is decaying the slowest. So I can pick an L and an M, so for an arbitrary L and M, so I pick L and M arbitrarily and I ask what happens to that component, so if all the others was 0, right and that the error was in that form, there are different ways by which we can argue this, all the other coefficients was 0 and only the L and M components were left, how would that L, M component grow, okay, that is another way that we can look at, okay, how would the L, M, if I had only this, how would this component grow, is that fine, the different ways that you can look at this, so that is one possibility that you can ask the question what is the, how would that L, M component grow. So I should in theory also add a subscript, right, I should in theory also add, right, so EXY I should also add a subscript saying that I am going to do the L, M component but just so that I do not make it too complicated, I will just leave the, we know that we are dealing only with the, I picked an L, M component, okay, so what does that do, how, let us substitute it into our equation and see what that does. So EPQ at n plus 1 is 0.25 times EP plus 1 Q at n plus EP minus 1 Q at n plus 1, leave this at n plus EPQ plus 1 at n plus EPQ minus 1 at n, is that fine. So for the L, M component, for L, M component what do I have, EP plus 1 Q in fact is exponent I pi L P plus 1 H by L which equals exponent I pi L P H by L into EP power PQ, okay. So we get these expressions, EP plus 1 Q equals this exponent I pi L H by L is n and EP minus 1 Q equals exponent minus I pi L by n, EP minus 1 Q and similarly you get the other ones with M and rate plus M and minus M, the wave numbers will change. So EP plus 1 Q going back to our iteration equation, EPQ n plus 1 is 0.25 times, is that fine, EPQ at n multiply exponent I pi L by n plus exponent minus I pi L by n plus exponent I pi M by n plus exponent I pi minus I pi M by n, is that okay, is that fine, pardon me, there has to be, no H by L is, I have replaced H by L by n here, okay, H by L is 1 by n, is that fine, H by L is 1 over n. Now we will use the fact that EP power I theta exponent of, I should not write, I should be very careful how I write this, exponent of I theta, since I have called my error E, I pay the price for that, right, exponent of I theta cos theta plus I sin theta, substitute back here and you will get EPQ n plus 1, remember this is for wave numbers L comma M, this is for wave numbers L comma, we are just asking the question what happens to the wave numbers L comma M, okay, equals EPQ n by 4 of course, into 2 cos I pi L by capital L plus 2 cos I pi M by capital L, pardon me, no I, no I and that should be an N, thank you, what got me in trouble earlier, okay, right. So the gain going from one iteration to another iteration, the gain is the basically the ratio of these amplitudes, okay, so it is EPQ at n plus 1 divided by EPQ, which is G, this happens to be real, so we do not have to worry about, right, normally if G, if G were complex then we would have to do GG bar or something of that sort, happens to be real, so we want only at the gain and we want the modulus, right, absolute value and this is mod of 2 cos pi L by N plus 2 cos pi M by N divided by 4, is that okay, everybody with me. Now we ask the questions what is the value, right, when is this maximum, I want the maximum value, I want the maximum possible value, now it turns out the error, error is not going, see the error is 0 at the boundaries, we do not have the electrical engineers would say we do not have a DC component, right, so we do not have, we do not, these summation need not start at 0, A0, we do not have an A0, we do not have an A0 or a B0, right, so the summation starts, the wave numbers that we get correspond to the wave numbers that we get, the largest wave numbers that we get go from 1 basically through N minus 1, that are of interest to us, okay, so 0 as I said the DC component is not there, the function is the error is 0 on all the boundaries, so fortunately for us the expression that we have G as mod 2 cos pi L by N plus 2 cos pi M, I will just repeat it here by N, fortunately the expression that we have mod divided by 4, we ask the question when does this become maximum, right, when does it take its maximum value and that occurs fortunately for us, it occurs when at the two extremes 1 and N minus 1, we do not really have to hunt anywhere in between, am I making sense, because if you go to 0, if it 0 is possible then cos would be 1, if you went to pi cos would be minus 1, which are the extreme values that it can take, you have a modulus so the sign does not matter, so I substitute 1 and this gives me the max over L and M, okay, so you see the game that we played, we have used the fact that the equation is linear, we have considered an arbitrary wave number L and M, we have got the gain that we can get for that L and M and now we are asking the question for which L and M is it maximum, is that gain maximum, okay, that is the key, so the max over L and M gives me V max which is 4 cos pi by N divided by 4 which is cos pi by L, is that fine, okay, which of course I can expand using Maclaurin series, so Maclaurin series would give me and I will just use the first two terms, Maclaurin series this will give me approximately 1 minus pi by N squared, 1 half, other terms I will ignore those, pi by N squared, okay, so this is R, this is R largest Eigen value, this is basically the spectral radius, you understand, when I put it through, I put it through the crunch once, I iterated once, right, if I go from an Nth iterate to an N plus first iterate, N was chosen arbitrarily, Nth iterate to an N plus first iterate, the gain that I get is of this order, this is the largest gain, corresponds to the largest Eigen value, right, corresponds to the largest Eigen value and what is this value, so if you take say for example N is 100, what are you going to get, we can just estimate it, if you take N is 100, pi squared is like 10, we will do an engineering approximation, pi squared is like 10, right, so N is, right, this is so the denominator gives me 2, 1 minus, it is of the order of 1 minus 1 over 2000, that is like 0.999, is there one more 9, enough, something of that sort, you understand what I am saying, okay, so for the first mode, if you have an error, I am drawing it only in one dimension now, we will forget the other, if you have an error, if you have an error, if your initial guess is such that the error is like that, that is the first mode, that is going to decay, this amplitude is going to decay at this rate, every iteration that you do, that amplitude will be multiplied by this number, it is going to take forever to converge, am I making sense, okay, right, so as I said we will do, in the next class I will do a demo and you will actually see that, you will actually see what, how bad it can be, fine, are there any questions, yes please, because exponentials are orthogonal to each other and the equation is linear, right, it is like the equivalent of saying that sigma f equals 0, when you do statics or dynamics, you say sigma f equals 0, then you can say the x component of forces is 0, y component of forces is 0, z component of force, there you are using orthogonality, okay, but you also need that the equation into which I am substituting, say sigma f equals 0 fortunately happens to be a linear equation, right, so ijk are orthogonal, so you can do it component wise, but the equation that you are going to decompose has to be linear, the equation is not linear then you run into difficulty, right, because you can get coupling terms and all of that kind, is that fine, does that make sense, you have to be a bit careful because the ijk argument you have to be a bit careful, right, that analogy only goes so far, right, be a bit careful, okay, so if the equation were non-linear then you would get, see if the equation were non-linear in this case, right, if you had a u du dx term, right, which we are all familiar with from our fluid mechanics, if you had a u du dx term, right, if you substituted Fourier series into it, let us not, let us forget exponentials, let us just stick with sines and cosines, if u you are looking at the sin x term, du dx would give you a cos x term, right, and suddenly u du dx gave you a sin 2x term, you understand, because this is a cos x, sin x cos x, okay, so the u du dx term contributes to the sin 2x component, so you cannot when you say I am going to decompose it, you have to be a bit careful, okay, if you are going to decompose it component wise, you have to be a bit careful, you understand, right, so it is important that the equation, the iteration equation is linear, that is very important, fine, okay, so yeah, so you can see that if you try to get any sensible, if you try to get any, so even n equals 10, even n equals 10, right, I mean it is going to give you like 1 minus 1 over 20, even for n equals 10, you are going to end up, even for n equals 10, g max is going to be like 1 minus 1 over 20, am I making sense, so the convergence rate, I mean it is quite, so you may be happy with how fast it runs with for n equals 10, but the minute you want to say, if you want to try something larger, now you are talking about let me try at n equals 1000, then it gets really bad, right, if you, for whatever reason, you want to use higher resolution, then it gets really bad, okay, there are no other questions, the other thing that we looked at was writing a, using the fact that a transpose equals a, so we use the fact that a is symmetric, you remember when I say a what I am talking about, a is symmetric, symmetric a, right, that is this equation could be transformed to or I will write, could be transformed to a discrete version, it was a, p equals b, okay, this is what I meant, so this could be transformed into, to stick to our consistent notation, this could be transformed into this and I basically said that for consistency, I mean not for consistency, but to make it look like a traditional standard problem that you are used to, if you just write it at a as ax equals ax tilde equals b, then corresponding to this we can come up with a function q, which is a function of x tilde, which is 1 half x tilde transpose a x tilde minus x tilde transpose b, for b tilde, and sticking the bit, tildas underneath just to indicate that they are vectors, and I made it a b tilde because I have called it x tilde, that is the only reason why we are doing what we are doing, just so that the equation is consistent. And we already saw that the gradient of q, x tilde gives us, because a is symmetric, this gives us ax tilde minus b equals 0 for extima, okay, I think I had a sign error earlier. So the one-dimensional equivalent of this, a one-dimensional analog, I just consider one coordinate, so I can have a q of x, this is just x equals 1 half ax squared minus bx, so normally when we do flow past anything, flow past the cylinder or something of that sort, right, I just set up the boundary conditions and then we will talk about it later. So and we have Laplace's equation for, we say the flow is rotational, so I would not go through the fluid mechanics of all of this, right. So what is the, if this is a solid cylinder and there is a fluid flow past the cylinder, there is a flow past the cylinder, okay. So what is the boundary condition that you have on the cylinder? There is no penetration boundary, it is called the no penetration boundary condition, solid wall condition, right, which is the normal velocity is 0, normal component of the velocity is 0. So there is no normal component of the velocity, there is only a tangential component, okay. That is grad phi dotted with n equals 0, right, and from our understanding of directional derivatives which we will need in a little while now, this tells us that dou phi dou n equals 0, we are not going to do flow past cylinder here, this is just for motivation, we are not going to, we are not planning to do flow past cylinder, okay. So we will stick ourselves, we will, we will restrict ourselves to a box, but the factor of the matter is that anywhere on the box, it is possible that your given dou phi dou n is 0 or dou phi dou n equals something, okay. If you have a, if you have a, if this is a room, if this represents a room and there is some air coming in through a air conditioner or whatever it is, then dou phi dou n may be, may give you some velocity at that point, which is the speed at which the air conditioner is injecting air into. So you may be given the dou phi dou n value, what we have done so far is we have prescribed the phi values on the boundary, but the question is what happens if we are not given phi, but you are given dou phi dou n, okay, fine, are we given these on all the boundaries, are we given it only on one boundary, okay. You would have studied this in PDE, I am pretty sure partial differential equations course you have seen Dirichlet problems, no, Neumann problems and Robin problems. So Dirichlet problems you have given the function value on the boundary, Neumann problem you have given derivatives on the boundary and Robin problem is a mixed problem, you have given combinations of derivatives and function value, okay. So we have to basically see how we have to, how we will handle the problems that have derivative conditions given on the boundary, right, so that is a very small segment that we will do that in the next class and we will also do a few demos, okay, thank you.