- [Voiceover] So I have
the graph of y is equal to f of t here, our horizontal
axis is in terms of time, in terms of seconds. And this type of function
is often described as a square wave, and we see that
it is a periodic function, that it completes one
cycle every two pi seconds. And so we could say its
period is equal to two pi, if we wanna put the units
we could say two pi, two pi seconds per cycle,
we could write it like that. We could also just write s for seconds. And its frequency is
gonna be one over that. So we could write its
frequency is equal to one over two pi cycles per second,
cycles per second, it could also be described as hertz. And what we're gonna
explore in this video, is can we take a periodic
function like this and represent it as an infinite
sum of sines and cosines of different periods or
different frequencies? So to write that out a
little bit more clearly, can we take our f of t,
so can we take our f of t, and write it as the sum
of sines and cosines? So can we write it, so
it's going to be sum, let's say baseline constant,
that'll shift it up or down, and as we'll see, that's
going to be based on the average value of the
function over one period. So a sub zero, and
then, let's start adding some periodic functions here. And so let's take a sub
one times cosine of t. Now, why am I starting with cosine of t? And I could also add a sine of t, so plus b sub one, of sine of t. Why am I starting with
cosine of t and sine of t? Well, if our original function
has a period of two pi, and I just set up this one so it does have a period of two pi, well
it would make sense that it would involve some functions
that have periods of two pi. And these weights will tell
us how much they involve it. If a one is much larger
than b one, well it says, okay, this has a lot more
of cosine of t in it, than it has of sine of t in it. And that by itself isn't going
to describe this function, because we know what this would look like. This would look like
a very clean sinusoid, not like a square wave. And so what we're gonna do
is we're gonna add sinusoids of frequencies that are
multiples of these frequencies. So let's add a sub two, so
another waiting coefficient, times cosine of two t. This has a frequency of one over two pi, this has twice the frequency, this has a frequency of one over pi. And then a sub three
times cosine of three t. And I'm gonna keep going
on and on and on forever. And I'm gonna do the same
thing with the sines. So plus b two sine of two t
plus b three sine of three t. And you might be saying,
well, okay, this seems like a fun little mathematical exercise, but why do folks even do this? Well this was first
explored, and they're named, series like this, infinite
series where you represent something by essentially
weighted sines and cosines, this was explored originally by Fourier, and they're called Fourier Series. And they were interesting
to him in the study of differential equations,
because a lot of differential equations are easy to solve
when you involve sines and cosines, but not as
obvious to solve when you have more general functions, like
maybe a square wave here. But if you could
represent that square wave as sums of sines and cosines, then all of a sudden you
might be able to find more general solutions to
your differential equations. Another really interesting
thing about this, and this is really the
foundation of signal processing, it's very used, it's heavily
used in electrical engineering, is you can view these
coefficients as they are, they're weights on
these cosines and sines, but another way to think about it is, they tell you how much
of different frequencies that this function contains. So, for example, if a one
is much bigger than a two, then that tells you that
that function contains a lot more of the one over
two pi hertz frequency than the one over pi frequency. Or maybe a three is bigger
than a one or a two. And so you can start to
say, hey, this helps us start to think of a function
not just in terms of the time domain which f of t does,
but it can start bringing us to saying well, how much do
we have of each frequency? And as we'll see with Fourier
Series and eventually, Fourier Transforms, that's
going to get us into the frequency domain,
where we can start doing some signal processing. So we're going to explore
all of that in future videos. In order to understand how we can actually find these coefficients, we're
gonna review a little bit of our trigonometry, especially
integrating trig functions, and then we're gonna solve for these, and we're gonna see how
good we can approximate our function f.