WEBVTT
00:00:01.240 --> 00:00:05.800
This video is to give you more
examples of Fourier series.
00:00:05.800 --> 00:00:08.510
I'll start with a
function that's odd.
00:00:08.510 --> 00:00:14.080
My odd function means that
on the left side of 0,
00:00:14.080 --> 00:00:19.410
I get the negative of what I
have on the right side of 0.
00:00:19.410 --> 00:00:22.900
F at minus x is minus f of x.
00:00:22.900 --> 00:00:26.610
And it's the sine
function that's odd.
00:00:26.610 --> 00:00:31.140
The cosine function is even, and
we will have no cosines here.
00:00:31.140 --> 00:00:33.250
All the integrals
that involve cosines
00:00:33.250 --> 00:00:38.260
will tell us 0 for
the coefficients AN.
00:00:38.260 --> 00:00:41.200
What we'll get is
the B coefficients,
00:00:41.200 --> 00:00:44.340
the sine functions.
00:00:44.340 --> 00:00:49.930
So you see that I chose a simple
odd function, minus 1 or 1,
00:00:49.930 --> 00:00:55.000
which would give a square
wave if I continue it on.
00:00:55.000 --> 00:01:00.710
It will go down, up, down,
up in a square wave pattern.
00:01:00.710 --> 00:01:04.530
And I'm going to express
that as a combination
00:01:04.530 --> 00:01:07.810
of sine functions, smooth waves.
00:01:07.810 --> 00:01:10.460
And here was the
formula from last time
00:01:10.460 --> 00:01:14.780
for the coefficients
bk, except now I'm
00:01:14.780 --> 00:01:18.890
only integrating over
half, over the zero
00:01:18.890 --> 00:01:22.920
to pi part of the
interval, so I double it.
00:01:26.180 --> 00:01:29.550
So that's an odd function,
that's an odd function.
00:01:29.550 --> 00:01:32.330
When I multiply them, I
have an even function.
00:01:32.330 --> 00:01:35.180
And the integral
from minus pi to 0
00:01:35.180 --> 00:01:38.260
is just the same as the
integral from 0 to pi.
00:01:38.260 --> 00:01:44.000
So I'll do only 0 to
pi and multiply by 2.
00:01:44.000 --> 00:01:49.560
But my function on 0 to pi is 1.
00:01:49.560 --> 00:01:53.910
My nice square wave
is just plus 1 there,
00:01:53.910 --> 00:01:56.400
so I'm just
integrating sine kx dx.
00:01:56.400 --> 00:01:59.200
We can do this.
00:01:59.200 --> 00:02:02.610
It's minus cosine kx
divided by k, right?
00:02:02.610 --> 00:02:05.750
That's the integral with
the 2 over pi factor.
00:02:05.750 --> 00:02:13.660
Now I have to put
in pi and 0 and put
00:02:13.660 --> 00:02:16.890
in the limits of integration
and get the answer.
00:02:16.890 --> 00:02:18.460
So what do I get?
00:02:18.460 --> 00:02:19.670
I get 2 over pi.
00:02:26.610 --> 00:02:33.450
For k equal 1, I think
I get-- so k is 1,
00:02:33.450 --> 00:02:38.620
the denominator will be 1, and
I think the numerator is 2.
00:02:38.620 --> 00:02:42.740
Yes, when k is 0, I get yeah.
00:02:42.740 --> 00:02:45.380
When k is 1, I get 2.
00:02:45.380 --> 00:02:49.960
When k is 2, so
this is 4 over pi,
00:02:49.960 --> 00:02:52.900
I figured out as the
first coefficient.
00:02:52.900 --> 00:02:56.960
The coefficient b1 is 4 over pi.
00:02:56.960 --> 00:03:02.220
The coefficient b2, now if I
take k equal to 2, I have a 2
00:03:02.220 --> 00:03:03.520
down below.
00:03:03.520 --> 00:03:09.380
But above, I have a 0
because the cosine of 2 pi
00:03:09.380 --> 00:03:12.810
is the same as the cosine of 0.
00:03:12.810 --> 00:03:17.370
When I subtract I get
nothing, so that's 0.
00:03:17.370 --> 00:03:20.420
Now I go to k equals 3.
00:03:20.420 --> 00:03:23.790
So the k equals 3
will come down here.
00:03:23.790 --> 00:03:30.000
And now when k is 3, it turns
out I get-- they don't cancel,
00:03:30.000 --> 00:03:31.140
they reinforce.
00:03:31.140 --> 00:03:32.870
I get another 2.
00:03:32.870 --> 00:03:34.400
Good if you do these.
00:03:34.400 --> 00:03:37.220
And when k is 4,
I get a 0 again.
00:03:37.220 --> 00:03:38.210
You see the pattern?
00:03:42.380 --> 00:03:50.030
The pattern for the integrals
is the k is going 1, 2, 3, 4, 5.
00:03:50.030 --> 00:03:54.900
This part gives me a 2 or
a 0 or a 2 or a 0 in order.
00:03:54.900 --> 00:03:57.530
If you check that,
you'll get it.
00:03:57.530 --> 00:04:02.220
So I see that now for this
function, which is better
00:04:02.220 --> 00:04:03.830
than the delta function also.
00:04:03.830 --> 00:04:05.600
It's not very smooth.
00:04:05.600 --> 00:04:07.000
It has jumps.
00:04:07.000 --> 00:04:10.110
It's a jump function,
a step function.
00:04:10.110 --> 00:04:14.319
I see some decay,
some slow decay,
00:04:14.319 --> 00:04:15.485
in the Fourier coefficients.
00:04:18.959 --> 00:04:24.540
This factor k is growing so
the numbers are going to 0,
00:04:24.540 --> 00:04:26.110
but not very fast.
00:04:26.110 --> 00:04:27.460
Not very fast.
00:04:27.460 --> 00:04:31.580
Because my function
is not very smooth.
00:04:31.580 --> 00:04:37.520
So now you see-- so if
I use those numbers,
00:04:37.520 --> 00:04:45.360
I'm saying that the square wave,
this function, the minus 1 to 1
00:04:45.360 --> 00:04:49.950
function, is equal
to, let's see.
00:04:49.950 --> 00:04:57.000
I might as well take
that 4 over pi times 1.
00:04:57.000 --> 00:05:08.890
So that's 1 sine x, 0, sine 2x's
then 4 over pi sine 3x's, but
00:05:08.890 --> 00:05:14.750
with this guy there's
a 3, 0 sine 4x's,
00:05:14.750 --> 00:05:23.840
sine 5x comes in
over 5, and so on.
00:05:23.840 --> 00:05:26.480
That's a kind of nice example.
00:05:26.480 --> 00:05:31.930
It turns out that we have
just the odd frequencies 1, 3,
00:05:31.930 --> 00:05:38.380
5 in the square wave and
they're multiplied by 4 over pi
00:05:38.380 --> 00:05:43.230
and they're divided by the
frequency, so that's the decay.
00:05:43.230 --> 00:05:46.020
There is an odd function.
00:05:46.020 --> 00:05:49.180
Why don't I integrate
that function?
00:05:49.180 --> 00:05:51.140
If I want to get
an even function
00:05:51.140 --> 00:05:53.740
to show you an even
example, I'll just
00:05:53.740 --> 00:05:55.910
integrate that square wave.
00:05:55.910 --> 00:05:58.840
When I integrate it square
wave, it'll be even.
00:05:58.840 --> 00:06:03.025
Maybe I'll start the integral
at 0, then it goes up at 1.
00:06:05.960 --> 00:06:12.300
And here the integral is
negative, so it's coming down.
00:06:12.300 --> 00:06:20.910
So you see it's a-- what am I
going to call this function?
00:06:20.910 --> 00:06:23.990
Sort of a repeating
ramp function.
00:06:23.990 --> 00:06:27.410
It's a ramp down and then
up, down and then up.
00:06:27.410 --> 00:06:31.770
But of course from minus pi to
pi, that's where I'm looking.
00:06:31.770 --> 00:06:35.360
I'm looking between
minus pi and pi.
00:06:35.360 --> 00:06:39.770
And I see that function is even.
00:06:39.770 --> 00:06:41.320
And what does even mean?
00:06:41.320 --> 00:06:45.780
That means that my
function at minus--
00:06:45.780 --> 00:06:48.745
there is minus x-- is the
same as the value at x.
00:06:51.920 --> 00:06:56.420
And what that means for a
Fourier series is cosine.
00:06:56.420 --> 00:06:59.370
Even functions only
have cosine terms.
00:06:59.370 --> 00:07:01.940
And of course, since
I've just integrated,
00:07:01.940 --> 00:07:04.570
I might as well just
integrate that series.
00:07:04.570 --> 00:07:09.340
So this is this ramp, this
repeating ramp function,
00:07:09.340 --> 00:07:13.150
is going to be 4 over pi.
00:07:13.150 --> 00:07:15.760
I could figure out the
cosine coefficients,
00:07:15.760 --> 00:07:18.700
the a's, patiently.
00:07:18.700 --> 00:07:21.530
But why should I do that
when I can just integrate?
00:07:24.890 --> 00:07:28.260
So the integral of
sine x will be minus
00:07:28.260 --> 00:07:31.590
is the integral of
sine x, is minus cosine
00:07:31.590 --> 00:07:38.590
x, so I'll put the minus
there, cosine x over 1 I guess.
00:07:38.590 --> 00:07:40.130
Now what's the integral of this?
00:07:40.130 --> 00:07:46.510
The integral of sine 3x
is a cosine 3x over 3.
00:07:46.510 --> 00:07:48.750
And there's another
3 and there's
00:07:48.750 --> 00:07:51.560
a minus sign, which I've got.
00:07:51.560 --> 00:07:57.540
So I think it's cosine
of 3x over 3 squared,
00:07:57.540 --> 00:08:00.580
because I have one 3
there and I get another 3
00:08:00.580 --> 00:08:01.810
from the integration.
00:08:01.810 --> 00:08:05.540
And similarly here,
when I integrate sine 5x
00:08:05.540 --> 00:08:09.930
I get cos 5x with a 5.
00:08:09.930 --> 00:08:13.570
And then I already had
one 5, so 5 squared.
00:08:13.570 --> 00:08:16.260
So there you go.
00:08:16.260 --> 00:08:17.700
[LAUGHTER]
00:08:17.700 --> 00:08:20.330
There's something in freshman
calculus which I totally
00:08:20.330 --> 00:08:22.930
forgot, the constant term.
00:08:22.930 --> 00:08:27.000
So there is a constant term,
the average value, that a0.
00:08:27.000 --> 00:08:30.570
I've only found
the a1, 2, 3, 4, 5.
00:08:30.570 --> 00:08:35.110
I haven't found the a0, and that
would be the average of that.
00:08:35.110 --> 00:08:38.070
I don't know, what's the
average of this function?
00:08:38.070 --> 00:08:40.919
Its goes from 0 up
to pi and it seems
00:08:40.919 --> 00:08:45.410
like it's pretty-- I didn't
draw it well, but half way.
00:08:45.410 --> 00:08:51.060
I think probably its average
is about pi over 2, right?
00:08:51.060 --> 00:08:52.940
Let's hope that's right.
00:08:52.940 --> 00:08:56.240
So let me sneak in the
constant term here.
00:08:56.240 --> 00:09:02.710
The ramp is, I think I have
a constant term is pi over 2.
00:09:02.710 --> 00:09:04.120
That's the average value.
00:09:04.120 --> 00:09:07.550
It would come from the
formula and those-- well,
00:09:07.550 --> 00:09:09.870
what do you see now?
00:09:09.870 --> 00:09:12.660
That's the other example
I wanted you to see.
00:09:12.660 --> 00:09:15.180
You see a faster drop off.
00:09:15.180 --> 00:09:20.630
1, 9, 25, 49, whatever.
00:09:20.630 --> 00:09:24.820
It's dropping off
with k squared.
00:09:24.820 --> 00:09:28.930
And the reason it drops
off faster than this one
00:09:28.930 --> 00:09:32.820
is that it's smoother.
00:09:32.820 --> 00:09:35.210
This function has corners.
00:09:35.210 --> 00:09:37.890
This function has jumps.
00:09:37.890 --> 00:09:43.650
So a jump is one level
more rough, more word
00:09:43.650 --> 00:09:47.340
noisy than a ramp function.
00:09:47.340 --> 00:09:50.670
The smoother function
has faster decay.
00:09:50.670 --> 00:09:53.060
Smooth-- let me
write those words--
00:09:53.060 --> 00:10:04.680
smooth function connects
with faster decay.
00:10:04.680 --> 00:10:08.160
Faster drop off of the
Fourier coefficient.
00:10:08.160 --> 00:10:11.100
It means that the Fourier
series is much more useful.
00:10:11.100 --> 00:10:14.900
Fourier series is really
terrific for functions
00:10:14.900 --> 00:10:20.760
that are smooth because then you
only need to keep a few terms.
00:10:20.760 --> 00:10:26.550
For functions that have
jumps or delta functions,
00:10:26.550 --> 00:10:28.880
you have to keep
many, many terms
00:10:28.880 --> 00:10:31.380
and the Fourier
series calculation
00:10:31.380 --> 00:10:33.620
is much more difficult.
00:10:33.620 --> 00:10:38.530
So that's the second example.
00:10:38.530 --> 00:10:42.660
Let's see, what
more shall I say?
00:10:42.660 --> 00:10:44.940
We learned something
about integrating
00:10:44.940 --> 00:10:47.010
and taking the
derivative so let me
00:10:47.010 --> 00:10:49.950
end with just two basic rules.
00:10:49.950 --> 00:10:53.340
Two basic rules.
00:10:53.340 --> 00:10:57.940
So the rule for derivatives.
00:11:02.460 --> 00:11:05.380
What's the Fourier
series of df dx?
00:11:09.180 --> 00:11:13.005
And the second will
be the rule for shift.
00:11:16.650 --> 00:11:23.130
What's the Fourier series
for f of x minus a shift?
00:11:23.130 --> 00:11:26.940
You know that when I change
x to x minus d, all that does
00:11:26.940 --> 00:11:30.550
is shift the graph
by a distance d.
00:11:30.550 --> 00:11:34.250
That should do something nice
to its Fourier coefficient.
00:11:34.250 --> 00:11:37.230
So I'm starting with--
oh, I haven't given you
00:11:37.230 --> 00:11:40.140
any practice with
a complex case.
00:11:40.140 --> 00:11:41.690
This would be a good time.
00:11:41.690 --> 00:11:52.390
Suppose start is f of
x equals the sum of ck,
00:11:52.390 --> 00:11:58.140
a complex coefficient e to the
ikx, the complex exponential.
00:11:58.140 --> 00:12:01.860
And you'll remember that
sum went from minus infinity
00:12:01.860 --> 00:12:02.360
to infinity.
00:12:06.330 --> 00:12:08.260
So I have a Fourier series.
00:12:08.260 --> 00:12:12.510
I'm imagining I know the
coefficients and I want to say,
00:12:12.510 --> 00:12:14.490
what happens if I
take the derivative?
00:12:14.490 --> 00:12:16.740
Well, just take the derivative.
00:12:16.740 --> 00:12:26.640
You'll have a sum of the
derivative brings down
00:12:26.640 --> 00:12:30.000
a factor ik.
00:12:30.000 --> 00:12:31.860
So that's the rule.
00:12:31.860 --> 00:12:33.500
Simple, but important.
00:12:33.500 --> 00:12:37.390
That's why Fourier series
is so great because you
00:12:37.390 --> 00:12:40.450
have orthogonality and then
you have this simple rule
00:12:40.450 --> 00:12:43.340
with derivatives.
00:12:43.340 --> 00:12:46.910
it just brings a factor
ik so the derivative
00:12:46.910 --> 00:12:52.890
make sure function noisier and
you have larger coefficients.
00:12:52.890 --> 00:12:55.730
And if I do f of
x minus d, so I'll
00:12:55.730 --> 00:13:04.120
change x to x minus d, so I'll
see the sum of ck e to the ikx,
00:13:04.120 --> 00:13:08.950
e to the minus ikd, right?
00:13:08.950 --> 00:13:13.290
I've put in x minus
d instead of x.
00:13:13.290 --> 00:13:17.690
And here I see that the Fourier
coefficient for a shifted
00:13:17.690 --> 00:13:23.636
function-- so the ck was a
Fourier coefficient for f.
00:13:23.636 --> 00:13:28.070
When I shift f, it
multiplies that coefficient
00:13:28.070 --> 00:13:31.650
by a phase change.
00:13:31.650 --> 00:13:34.310
The magnitude stayed
the same because that's
00:13:34.310 --> 00:13:39.730
a number-- everybody recognizes
that as a number of magnitude 1
00:13:39.730 --> 00:13:43.700
and just has a phase shift.
00:13:43.700 --> 00:13:46.050
Those are two would
rules that show
00:13:46.050 --> 00:13:51.220
why you can use Fourier series
in differential equations
00:13:51.220 --> 00:13:54.400
and in difference equations.
00:13:54.400 --> 00:13:56.120
Thank you.