If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:6:49

Video transcript

several videos ago we introduced the idea of a Fourier series that I could take a periodic function we started with the example of this square wave and that I could represent it as the sum of weighted sines and cosines and then we took a little bit of an interlude building up building up some of our mathematical foundations just establishing a bunch of properties of taking the definite integral over the period of that of that periodic function of sine and cosines and we established all of these properties and now we're going to get the benefit from establishing all those because we're going to start actually finding a least e formulas for Fourier coefficients and then we can apply it to our original square wave to see that hey this is this could actually be a pretty straightforward thing so right over here I have rewritten a Fourier series expression or I have rewritten a Fourier series for a periodic function f of T let's say its period is 2pi and i'm going to use this and some of the properties that we have established to start solving for these for these actual coefficients and what I'm going to do in this code in this video I'm going to first I'll try to solve for a sub-zero and then in the next video we're going to solve for an arbitrary a sub N and either in that one or the next one will also star solve for an arbitrary B sub n so to solve for a sub 0 what we're going to do is take the definite integral of both sides from 0 to 2pi so 0 to 2pi DT of f of T well that's going to be the same thing as going from 0 to 2pi of all of this stuff and remember this is an infinite series right over here we have an infinite number of terms and then we would have a DT out there but we know from our integration properties taking the definite integral of a sum even an infinite sum is the same thing as the sum of the definite integrals so that's going to be the same thing as taking this integral DT Plus this integral and I could take this the the scalar out actually let me not just not do that let me just write it like this 0 to 2pi DT 0 to 2pi DT 0 to 2pi DT this is getting a little monotonous but it'll be worth it zero to two by DT is zero to two pi D T zero to 2pi DT and we'll do it for every single one of the terms and now what's nice is we can look at our integration properties this right over here we could take that we could take these coefficients out we could take this a sub one put it in front of the integral sign the a sub two put it in front of the integral sign the B sub one put it in front of the integral sign and then all you're left with is the integral from zero to two pi of cosine of some integer multiple of T DT well we established a couple of videos ago well that's always going to be equal to zero the integral from zero to two pi of cosine of some nonzero zhan zero integer multiple of T DT that is equal to zero and then the same thing is true for sine of M T so this is going to be fun this is going to be zero based on what we just saw if you just take that take that factor out of that integral take that a sub one out of the integral is going to be a sub one times zero there's going to be a sub 2 times 0 that's going to be 0 that's going to be 0 that's going to be 0 that's going to 0 every term is going to be 0 except for this one involving a sub 0 and so what is this going to be equal to well let me write it this way let's take the integral of the definite integral let me see where I have some space so we're going to take the definite integral from 0 to 2 pi of a sub 0 DT well that's the same thing once again we could take the coefficient out of a sub 0 and I could just put the DT like I could just put the DT like this and so that's going to be equal to a sub 0 times T let me do that in magenta times T evaluated at 2 pi and 0 which is going to be equal to a sub 0 times 2 pi minus 0 times 2 pi minus 0 well that's just 2 pi a sub 0 so I could just write this a sub 0 times 2 pi so this expression right here is a sub 0 to times two pi so let me scroll down a little bit so I can rewrite this thing up here the integral from zero to two pi of F of T DT F of T DT which is equal to this integral but we've just figured out that the integral from 0 to 2pi of a sub-zero DT is the same thing as a sub 0 times 2 pi is equal to a sub 0 times 2 pi times 2 pi and so now it's actually pretty straightforward to solve for a sub 0 a sub 0 is going to be equal to a sub 0 is going to be equal to 1 over 2 pi 1 over 2 pi times the definite integral from 0 to 2pi I'll just write the DT of let me write it a little bit DT of F of T I'll just write like this F of T DT and this is pretty cool because think about what this is this over here this is the average value of our function this is the average value of F over the interval 0 to 2pi average value of f over over the interval over we could say the interval from zero the interval from zero to 2pi and hopefully that actually makes intuitive sense because if I am if you just think it from an engineering point of view if we're trying to engineer this trying to just play around with these numbers you know all these cosines and sines they oscillate between positive 1 and negative 1 so in order to actually represent this function you're going to have to shift that that oscillation and sum of a bunch of oscillation is still going to be an oscillation that's going to vary between positive 1 and our negative 1 and in order to shift it well that's what our a sub is 0 is going to do and so what you it makes sense that you would want to shift the oscillation so it oscillates around the average value of the function or you could say the average value of the function over over an interval that's that's representative of a period of that function and so that is what a subs euro is doing a subzero is just going to be that average value of the function