0:00:00.528,0:00:01.369 - [Voiceover] So we started 0:00:01.369,0:00:02.506 with a square wave 0:00:02.506,0:00:04.239 that had a period of two pi, 0:00:04.239,0:00:05.524 then we said, hmm, 0:00:05.524,0:00:07.146 can we represent it 0:00:07.146,0:00:09.545 as an infinite series 0:00:09.545,0:00:11.877 of weighted sines and cosines, 0:00:11.877,0:00:14.487 and then working from that idea, 0:00:14.487,0:00:15.320 we were actually able 0:00:15.320,0:00:16.767 to find expressions 0:00:16.767,0:00:17.908 for the coefficients, 0:00:17.908,0:00:19.795 for a sub zero and a sub n 0:00:19.795,0:00:21.092 when n does not equal zero, 0:00:21.092,0:00:22.472 and the b sub ns. 0:00:22.472,0:00:23.723 And evaluating it for this 0:00:23.723,0:00:25.295 particular square wave, 0:00:25.295,0:00:26.128 we were able to get 0:00:26.128,0:00:27.341 that a sub n is going 0:00:27.341,0:00:28.307 to be equal, 0:00:28.307,0:00:29.467 or a sub zero is going 0:00:29.467,0:00:30.926 to be 3/2, 0:00:30.926,0:00:31.759 that a sub n is going 0:00:31.759,0:00:32.729 to be equal to zero 0:00:32.729,0:00:33.963 for any n 0:00:33.963,0:00:35.664 other than zero, 0:00:35.664,0:00:37.036 and that b sub n 0:00:37.036,0:00:39.105 is going to be equal 0:00:39.105,0:00:41.587 to zero if n is even 0:00:41.587,0:00:43.109 and six over n pi 0:00:43.109,0:00:44.109 if n is odd. 0:00:45.343,0:00:46.306 So one way to think about it, 0:00:46.306,0:00:49.804 you're gonna get your a sub zero, 0:00:49.804,0:00:50.637 you're not gonna have any 0:00:50.637,0:00:52.048 of the cosine terms, 0:00:52.048,0:00:53.189 and you're only going to have 0:00:53.189,0:00:54.772 the odd sine terms. 0:00:55.844,0:00:56.852 And if you think about it 0:00:56.852,0:00:57.885 just visually, if you look 0:00:57.885,0:00:59.039 at the square wave, 0:00:59.039,0:01:00.088 it makes sense 0:01:00.088,0:01:01.213 that you're gonna have 0:01:01.213,0:01:03.205 the sines and not the cosines 0:01:03.205,0:01:04.857 because a sine function 0:01:04.857,0:01:07.573 is gonna look something like this. 0:01:07.573,0:01:10.132 So a sine function is gonna look 0:01:10.132,0:01:11.696 something like this, 0:01:11.696,0:01:12.869 while a cosine function 0:01:12.869,0:01:14.619 looks something like, 0:01:17.052,0:01:19.360 let me make it a little bit neater, 0:01:19.360,0:01:20.731 a cosine function would look 0:01:20.731,0:01:22.398 something like that. 0:01:25.054,0:01:26.317 And so a cosine 0:01:26.317,0:01:28.226 and multiples of cosine 0:01:28.226,0:01:30.910 of two x, cosine of three x, 0:01:30.910,0:01:32.185 is gonna be out of phase, 0:01:32.185,0:01:33.501 while the sine of x, 0:01:33.501,0:01:35.071 or I should say cosine of ts 0:01:35.071,0:01:36.457 and the sines of ts, 0:01:36.457,0:01:38.082 sine two t, sine three t, 0:01:38.082,0:01:39.310 is gonna be more in phase 0:01:39.310,0:01:40.417 with the way this function 0:01:40.417,0:01:41.764 just happened to be. 0:01:41.764,0:01:43.875 So it made sense that our 0:01:43.875,0:01:45.758 a sub ns were all zero 0:01:45.758,0:01:48.066 for n not equaling zero. 0:01:48.066,0:01:50.044 And so based on what we found 0:01:50.044,0:01:51.409 for our a sub zero, 0:01:51.409,0:01:52.242 and our a sub ns, 0:01:52.242,0:01:53.662 and our b sub ns, 0:01:53.662,0:01:54.758 we could expand out 0:01:54.758,0:01:56.445 this actual, 0:01:56.445,0:01:58.018 we did in the previous video, 0:01:58.018,0:01:59.212 what is this Fourier series 0:01:59.212,0:02:00.247 actually look like? 0:02:00.247,0:02:01.779 So 3/2 plus six over pi 0:02:01.779,0:02:04.255 sine of t plus six over three pi 0:02:04.255,0:02:05.127 sine of three t plus 0:02:05.127,0:02:05.960 six over five pi 0:02:05.960,0:02:07.111 sine of five t, 0:02:07.111,0:02:08.532 and so on and so forth. 0:02:08.532,0:02:09.365 And so a lot of you might 0:02:09.365,0:02:10.198 be curious what does this 0:02:10.198,0:02:11.831 actually look like. 0:02:11.831,0:02:13.011 And so I actually just, 0:02:13.011,0:02:14.055 you can type these things 0:02:14.055,0:02:14.964 into Google and it will 0:02:14.964,0:02:16.645 just graph it for you. 0:02:16.645,0:02:17.801 And so this right over here 0:02:17.801,0:02:19.058 is just the first two terms. 0:02:19.058,0:02:22.090 This is 3/2 plus six over pi 0:02:22.090,0:02:22.923 sine of t. 0:02:23.973,0:02:24.806 And notice it's starting 0:02:24.806,0:02:26.356 to look right because our 0:02:26.356,0:02:27.635 square wave looks something 0:02:27.635,0:02:28.802 like, it goes, 0:02:30.612,0:02:33.595 it looks something like this. 0:02:33.595,0:02:35.492 So it's gonna go like that 0:02:35.492,0:02:38.106 and then it's gonna go down 0:02:38.106,0:02:40.606 to zero and then it's gonna go 0:02:42.831,0:02:44.559 up, looks something like that. 0:02:44.559,0:02:45.392 It doesn't have the pis 0:02:45.392,0:02:46.455 and the two pis 0:02:46.455,0:02:47.302 marked off between these 0:02:47.302,0:02:48.135 because it's gonna look 0:02:48.135,0:02:49.731 something like that. 0:02:49.731,0:02:51.128 So even just the two terms, 0:02:51.128,0:02:52.539 it's kind of a decent approximation 0:02:52.539,0:02:53.912 for even two terms, 0:02:53.912,0:02:54.745 but then as soon as you get 0:02:54.745,0:02:55.578 to three terms, 0:02:55.578,0:02:57.861 if you add the six 0:02:57.861,0:02:59.364 over three pi sine of three t 0:02:59.364,0:03:01.085 to the first two terms. 0:03:01.085,0:03:01.918 So if you look at these 0:03:01.918,0:03:03.566 first three terms, 0:03:03.566,0:03:04.399 now it's looking a lot 0:03:04.399,0:03:05.664 more like a square wave. 0:03:05.664,0:03:08.458 And then if you add the next term, 0:03:08.458,0:03:09.291 well, it looks like even more 0:03:09.291,0:03:10.519 like a square wave, 0:03:10.519,0:03:12.058 and then if you add to that 0:03:12.058,0:03:14.220 what we already wrote down here, 0:03:14.220,0:03:15.646 if you were to add to that 0:03:15.646,0:03:16.988 six over seven pi times 0:03:16.988,0:03:18.156 sine of seven t, 0:03:18.156,0:03:19.044 it looks even more 0:03:19.044,0:03:20.382 like a square wave. 0:03:20.382,0:03:21.675 So this is pretty neat. 0:03:21.675,0:03:22.945 You can visually see 0:03:22.945,0:03:24.405 that we were actually able 0:03:24.405,0:03:25.238 to do it. 0:03:25.238,0:03:26.454 And it all kind of just 0:03:26.454,0:03:28.860 fell out from the mathematics.