 So, let us look at one more example. I do not know whether I discuss the popcorn function or let us discuss what is the popcorn function. So, f is a function on 0, 1, 2 and this function is f of x is equal to 0, if x is irrational like before. In 0, 1, if it is irrational, the value is 0. If it is rational, it will be a fraction, p by q. If it is p by q, where p and q, this is a number between 0 and 1. So, q will be bigger than p anyway because it is between 0 and 1. So, put it as 1 over q, if x is p by q. Forget the numerator, take only the denominator of that function. Clear? What is the function? Can you think of drawing a sort of a graph of this function? What do you think the graph should look like? Let us try to plot this to see whether we can do something or not. So, this is 0, 1 function will take values between 0 and 1 only. Let us see when it is 0, this is not defined. p by q, denominator could be anything. So, let us say r, x is equal to 0. For x is equal to 0, the value is 0. For every irrational, the value also is 0. We can put value at 1 also, 0 if you like. It does not matter much actually. Let us take what is the value at the point x is equal to half. When x is equal to half, what is the value of the function? It is half. Is it rational? The value is half. It is 1 by 3, what is the value? The value is 1 by 3. What is the value at 2 by 3? Again, forget. Again, the value is 1 by 3. This is 1 by 2. Now, you can see what is happening. At 1 by 4, what is the value at 1 by 4? 1 by 4. At 3 by 4 is 1 by 4. So, here is 1 by 4. So, value at 1 by 4 and 3 by 4 and so on value. It will be kind of triangular kind of a thing. Here, the value is smaller. So, if you make these dots bigger and smaller, these are smaller. Just for the sake of visualization, they look like popcorns when being fried or baked. They are jumping upright. So, this is normally called popcorn function. In fact, it was given by a mathematician called Thommage. I think spellings I am not very sure Thommage's function or popcorn function. Anyway, it does not matter. Mathematically, we know what is this kind of a function. Do you think it is a continuous function? No, it does not look like. Otherwise, I should have drawn the graph better. But what are the points of discontinuity of this function? At what points it is? Discontinuous. So, let us look at the way of analyzing discontinuity because the function is defined differently at a rational, differently at a irrational. So, we should analyze continuity in two cases when x is a rational and it is a irrational. Supposing x is irrational, the value of the function is 0 and look at a sequence of points converging to that irrational. But the sequence I can choose of irrationals, then all the values will be 0. So, no problem. But I can choose a sequence of rational converging to that irrational. And if I choose the irrationals, then close to it I can have a point where the value is not 0. So, that will not converge to 0. So, at all irrational points, it is discontinuous. At all irrational points, it is discontinuous or continuous? Are you sure? Yes. So, I let me analyze discontinuities. I have given you some idea. Now, supposing let us take x to be a rational point, the value will be 1 by Q. Now, value at all rational points is 0. So, now given a rational point, so here is a rational point, here is 0, here is 1. This is a rational point, call it x 0. I know the value is not 0 for the function at this point. But I can have a sequence of irrationals converging to it. Irrationals are dense. Irrationals are dense. So, I can have a sequence of irrationals converging to x 0. But the value at every irrational is 0. But the value of the function at that point is not 0. So, at a rational point, it is not continuous. So, that is why I am saying, try to convince yourself that this function has discontinuity at all rational points. It is continuous at all irrational points. At a rational, it is discontinuous. Is that clear? If you want to say it is discontinuous everywhere? No, it is not. Irrationals are the only points of discontinuity. So, exercise. I have already given you that at a rational point, it is discontinuous. These are the only points. That means what? That means, at every irrational point, the function should be continuous. So, check that. So, mull it over and think about it. I will put it as a problem in the problem session. I will ask them to discuss it with you that this is so. Let us not discuss now because we will have time to think. Let everybody have a time to think about the problem and discuss in the problem session. That is a better way of doing it. Anyway, the number of discontinuities of this function are infinite. Rationals and every sub-interval of 0, 1 will have infinite number of rationals. So, infinite number of discontinuities. It has infinite number of discontinuities in every sub-interval of 0, 1. Now, let us try to understand, is this function f integrable? Is this function integrable? It is not differentiable everywhere anyway because it is not continuous everywhere. So, that point is okay. Let us say integrable. Can I think of saying what is the area below the graph of the function? So, let us try to see. So, to do that, let us take p, a partition. So, if I want to show it is integrable, what I should try to do? Let p be a partition of a, b or 0, 1. What is the lower sum with respect to, I have to compute lower sum and upper sum. What is the lower sum? That will be 0 because every sub-interval will have a rational unit. So, it is 0 for every partition. I have to worry about what is the upper part. So, let us try to see the upper one. In the upper sum, the contributions will come from the rational points because at rationals the value will be 1 over q into the length of the interval. So, I have to bother about how many points the function, what value it takes. So, let us look at the set a. So, let us, if I want to show it is integrable, I have to make upper minus the lower small for some partition. So, let us start with let epsilon be given. So, I am looking at the values of the function. I want to look at, here is my epsilon. At how many points the value can go above epsilon? At how many points in the domain, the value of the function can go above epsilon. So, those are the rational points. At the rational points, the value is 1 over q. So, the only points possible are when 1 over q is bigger than epsilon. So, I am looking at the set, consider a to be all x belonging to 0, 1 such that the value of f of x is bigger than or equal to, does not matter. What can you say about a? It is bigger than f of x is bigger than epsilon when f of x is 1 over q. So, how many q's are possible so that 1 over q is bigger than, countably many, I do not know, I am asking. x belonging to a f of x not equal to 0 implies f of x is equal to 1 over q. So, we want 1 over q bigger than epsilon that is q is bigger than 1 over epsilon. How many q's are possible between 0 and, q has to be bigger than 0 anyway. Between 0 and, bigger than 0 and less than epsilon is fixed. How many are possible? There are only finitely many, not countable, only finitely many. q is positive. So, how many are possible? Only how many natural numbers? Because also a is, so that means implies a is finite. So, the set of points where it goes above, so points where it is less goes above it is only finite. So, let us call this finite number as something say x 1 less than x 2 less than finite sum number say x n bigger than a less than. Now, so here are the, here is a point x i at this point the value goes above epsilon. So, I want to make them in some sense, I want to enclose them in a box, so that these points are inside intervals of length small. So, around every point I can have a interval. So, it is x 1, x 2, x i and so on. I can enclose each one of them in a interval, so that total length of these intervals is small. So, there are only finitely many, there are only finitely many. So, let us support, so enclose these points in intervals of total length small. So, meaning what? They are all English, what is the mathematics of that? That means for every i, find a interval i i, an interval such that x i belongs to i i, length of i i is small, sigma length of i i, i equal to 1 to n is small. So, how small you want it? Let us make it less than epsilon again. Is that okay? Around every point, find a interval of length epsilon by n. So, when you add up all these finite numbers, total length will be epsilon by n plus epsilon by n, n times that will be epsilon. Here is my a and here is my b. Now, these intervals have got some end points like this. These are the points. So, these points give me a partition of the interval a, b. So, what are the partition points? a, 1 point here, 1 point here, next point here, next point here, next point here and so on. So, if you want, let us give them a name. So, let us, if you like, let i i be, you want to give a name. So, let us a i b i. So, what does it look like? Here is a 1, here is b 1, here is a 2, here is b 2, x 1 is somewhere inside, x 2 is somewhere inside and so on, x n a n b n and here is a, here is b. That is the picture it looks like. Length of a 1 b 1 plus length of this plus length of this put together is less than epsilon. So, this gives me a partition. So, consider this partition. So, what is this partition? So, p is a equal to a 0 less than a 1 less than b 1 less than a 2 less than so on less than a n b n less than b. With respect to this partition, lower sum is 0. We know that always. Lower sum for every partition is 0. I want to calculate what is the upper sum with respect to this partition. So, the upper sum, I will divide it into two parts over the intervals which are a 1 b 1, a 2 b 2, a n b n. What is the upper sums? Maximum value in the sub interval times the length of the sub interval. So, let us divide it into two parts. So, one part is with respect to this a i b i. So, let me call it as maximum value a n a i b i. So, length is length of i i, i equal to 1 to n plus the other parts. So, these intervals. So, what is this sigma? Let us call it m j, if you like. So, what will be the length now? It will be a 2 minus a 1, a 3 minus. So, it is a n minus b n minus 1. What will I write? n minus 1 b 1. This is the only way of writing. So, this we call it as a 0 and this we call it as b n plus 1. Then, what I am looking at is, so a 1 minus is over j. You understand what I am writing here? I am writing over the sums over these green portions. So, what will be that? The maximum value m j, whatever that may be, into the length of the interval. So, length of the interval will be like, here it will be a n minus, a 2 minus. What is the length here? a 2 minus b 1. The next one will be a 3 minus b 2. So, that is what I have written here. Oh, sorry, a j. Now, in the red ones, I do not know what is the value of the function. But, I can write the red ones. I can write some constant m, the function is bounded, bounded by 1, into sigma length of i i. All the intervals, maximum value. Each m i, the maximum in the sub-interval is less than or equal to the maximum in the whole interval. Plus, what can you say about the other part? m j, what is the m j here? That is the maximum in the portion where the green ones. What is the value of the function in the green portions? In the red ones, the value was bigger than epsilon. So, green ones, those points where it is bigger, we have finitely many. So, it will be less than epsilon. So, let us write this value is less than epsilon times sigma a j minus b j minus 1, whatever that j may be. And this length, this one, we have seen it is the way we found these intervals were less than epsilon. So, let me put that as epsilon. So, less than or equal to m times epsilon plus epsilon times some, call it as m 1. See, this is a constant. So, total length. So, is less than or equal to m plus m 1 times epsilon. So, the basic idea of the proof. So, I have found a partition, say that the upper sum is less than epsilon times the constant. So, the constant does not matter in our analysis. So, I have found a partition, so that the upper sum, lower sum is 0, so that the difference is less than epsilon. That means the function is integrable. So, let me revise a bit the idea of the proof. See, this is the crux of the proof. This upper sum will arise from the values where the values are non-zero. So, where the values are non-zero, I look at those points where the values exceed epsilon and less than or equal to epsilon. Where they exceed epsilon, the value of the function, they are only finitely many such points. Those points where the value can tend to become larger, I enclose them into small intervals of total length small. So, that upper sum with respect to those intervals, I make it small by enclosing each point in a small interval of total length small. In the other intervals, the value of the function itself is small. So, does not matter because the total length of the sub intervals is b minus a. So, that is how I contain the upper sum minus the lower sum. I make it small by making the upper sum small in the intervals where the value exceeds something, there only finitely many. Other parts do not matter because the value is less. So, try to read and understand this proof yourself later on when I will send you the slides. The basic idea is that this function is a function which has got discontinuities infinite in every sub interval, but still it is an integrable function. The earlier function rational, irrational 0 1, that was discontinuous everywhere. So, that was not integrable. And if the number of discontinuities are finite, that is not really a problem. Once again, we can define the integral in separate parts and add. So, the function is integrable. So, integrability of the function has to do something with continuity of the function. We have got different examples. Constant functions continuous everywhere integrable. Monotone function discontinuities are countably infinite at the most. We do not know how many, but still integrable. This function is a function with infinite discontinuities in every sub interval still integrable. And the other extreme is that 0 1 function discontinuities everywhere are not integrable. So, somewhere continuity, we have to say how many points you are allowing discontinuity for the function to be integrable. So, next time we will prove first one theorem that every continuous function is integrable. Like every monotone function is integrable, every continuous function is also integrable. And there is a deep theorem which says you can actually give a measure of how many discontinuities are allowed. And that is the beginning of a story called Lebesgue measure. That is the beginning of probability theory, Lebesgue measure, measure theory and so on. That basically says the set of discontinuities of a function if they do not contribute much in the length of the interval, then that function is going to be integrable. For example, in a finite set, in this, we were able to enclose each finite set in a interval total length small. But if I take a countable set, even that I can enclose each point in a interval of total length small. Therefore, x1, x2, xn is a countable infinite set. x1 enclose it in an interval of length epsilon by 2, x2 enclose it in an interval of length epsilon by 2 square, next one epsilon by 2 cube. So, what is the total length of these intervals? Sigma epsilon by 2 to the power n and that is a geometric series. The sum is equal to epsilon. So, you can enclose countable infinite set of points in small intervals of total length small. So, in that sense, you say that the countable set do not contribute anything towards the size of the interval. You say it is countable number of points form a set of length 0 because you can put them in any small collection of sub intervals. So, there is a deep theorem says that a function is integrable if and only if set of discontinuities are small size set of length 0. We will not prove that theorem. I am just saying this may come across sometimes somewhere. But you have seen a lot of examples of that. On one end, continuous everywhere, constant function slowly we are coming to monotone infinite but integrable. Then this function popcorn function infinite in every sub interval still integrable and then discontinuous everywhere not integrable. So, let us stop here.