 Welcome to the 16th session in the second module of the course Signals and Systems. We have been talking a lot of geometry in the last few sessions. So let us take the following example. We have a periodic signal x t, a square wave. I will show one period of the signal. The signal is 1 for the interval 0 to t by 2 and minus 1 for the interval t by 2 to t and this is one period and needless to say x t plus t is equal to x t for all t. So it is periodic with period capital T. Now we find out its decomposition at different frequency. So let us take first the 0 frequency component. The 0 frequency component is essentially the mean of x t over a period. Now you can see that mean is equal to 0 for this x t. That is because you can see that the function is symmetric about its middle as positive on one side of the middle of the period as it is negative on the other side. So the area under the function in one period is 0 and therefore there is no so-called dc component. There is no constant component. Now let us take the kth component. So the kth angular frequency that we need to consider is 2 pi by t times k and we shall evaluate the two components at this frequency. The first component is of course x t dot product with cos 2 pi by t k t multiplied by 1 by t cos 2 pi by t plus the inner product of x t with sin 2 pi by t k t and then again multiplied by 1 by t sin 2 pi by t. Now let us visualize how we are going to calculate each of these dot products and show them to you in two different colours. I will show this dot product to you first in red. Take one period, dot product over a period, do not forget. This is x and I draw cos. How does cos 2 pi by t k t look? So it is going to complete k cycle, k cycle over a period of so between 0 and t by 2 it is going to complete k half cycle and between t by 2 and t it is again going to complete k half cycle. How would this be? Take for example k equal to 1. So it would look like this. You see cosine begins like this, goes there and then rises up. This is k equal. Let me draw k equal to 2 as well but in dotted. So it is completed 2 cycles as you see over the entire period of t. Now you see you can carry this one. You can look at k equal to 1. You can look at k equal to 2. I have already drawn them for you. You can look at k equal to 3 and in each case you will see that whatever area is contributed on the positive side is annulled by the negative side. Let us look at these 2 cases to convince ourselves. So let us look at the k equal to 1. This part is integrated out to get a total of 0 air because whatever positive area is contributed from this portion is annulled by the negative area contributed by this and similarly whatever positive area is contributed by this portion is annulled by the negative area contributed by this portion. Therefore for k equal to 1 the dot product will be 0. The same thing holds for k equal to 2. You can see that. Whatever positive area is contributed by this portion is annulled by the area contributed by this and so too by this. Now you can visualize this. You see I have shown you the situation for k equal to 1 and k equal to 2. I encourage you to do it for arbitrary k. So what I am saying is the dot product with cos 2 pi by TkT falls to 0. So whatever positive integer k you take let us record that. So what you are saying is this dot product or this Ena product equal to 0 for all positive k. So we should now only focus on the second term and let us do that. Let us focus only on the second term. Let us therefore calculate the dot product. In fact you know that is also easy to do. I will show it to you graphically. I have xT here. I will show you for k equal to 1. You have sin 2 pi by TkT. I will show that in green. So sin 2 pi by TkT has an appearance like this. You can see that this dot product is definitely non-zero. And in fact this Ena product can be seen to be two times what you get on each half cycle. So this is from 0 to T by 2 and this is from T by 2 to T. Whatever you would get between 0 and T by 2 would be the same as what you get between T by 2 and T because positive multiplies positive here and negative multiplies negative on this. So 2 times the integral from 0 to T by 2 xT sin 2 pi by T times T. You are talking about k equal to 1. And of course xT is equal to 1 for that integral. So what do we have here? Very simple. We have 2 times 0 to T by 2 sin 2 pi by T T dt and that is minus evaluated. So minus 2 cos 2 pi by T small t divided by 2 pi by T evaluated from 0 to T by 2. That is minus 2 by 2 pi by T of course cos 2 pi by T times T by 2 minus cos of 0 and that gives us minus T by pi times minus that is easy to evaluate and therefore that is minus 2T by pi. So this is the component for k equal to 1. Now let me draw for k equal to 3 and you will see the pattern. So let me first show you the sketch. With k equal to 3 you are going to have 3 full cycles. So of course you know you had one half cycle and of course another half cycle and you see now in the other case you had just one. Now here you need to have 3. Well let me instead draw for k equal to 2. That might be easier to understand. So here for k equal to 2 I need to have 2 full cycles. How will 2 full cycles look like? You are going to have one cycle completed between 0 and T by 2 and one more full cycle completed between T by 2 and 2 full cycles and you can see that the inner product is going to be 0. Why is this true? Because whatever you can see that in each individual half cycle an entire cycle of the sinusoid has been integrated out. In fact you can see this will happen for all even values of T. You are going to have a 0 integral because each half cycle is going to integrate out full cycles, complete cycle. You know for example for k equal to 4 you would integrate out 2 cycles in the first half interval and 2 cycles in the second half. For k equal to 2 you are integrating out one cycle in the first half interval and one cycle in the second. And similarly you can go on constructing this. So for all k equal to even you are going to have a 0 component. That is very interesting. There are no cosine components. There are no even components. So what is left is only the odd components k equal to 3, k equal to 5, k equal to 7 and so on. And of course you can see that there always going to be a symmetry. For k equal to 3 for example you can construct the first half cycle, look at the inner product. If you focus on that first half cycle and you will see it is the same as contributed by the second half cycle. But what we will do is first to avoid any confusion we will just write down the inner product as it is. So I will write that down for you. So for k odd we have inner product is 0 to t by 2 integrated 1 multiplied by sin 2 pi by t kt dt plus integral from t by 2 to t minus 1 into sin 2 pi by t kt dt. And let us evaluate each of these terms separately. Now I leave it to you to show that this term and this term are equal, exercise. Show these are equal, this one and this one. And therefore I am just going to evaluate any one of them. Let us evaluate 0 to t by 2 sin 2 pi by t kt dt and multiplied by 2. And I leave it to you to work this out. It is essentially going to be 1 by k times the answer for k equal to 1. So we had this answer for k equal to 1, 2t by pi for k equal to 1. We will just divide it by 2. This is now 2t by pi into 1 by k. I leave it to you to verify this. And all in all what we have is xt is therefore summation k going from 1 to infinity 2t by pi 2k minus 1 sin, this is the complete expansion. I leave it to you as an exercise to verify this. So I worked out one example. I suggest you work out a few more. We will discuss a few more examples, just presenting them as exercises to you, but you must work them out on your own. Thank you.