WEBVTT

00:00:05.181 --> 00:00:06.780
PROFESSOR: Hi everyone.

00:00:06.780 --> 00:00:08.470
Welcome back.

00:00:08.470 --> 00:00:12.470
So today, I'd like to take a
look at solving a linear ODE

00:00:12.470 --> 00:00:14.630
but with a periodic input.

00:00:14.630 --> 00:00:16.630
And specifically,
we're asked to find

00:00:16.630 --> 00:00:20.090
one solution, a particular
solution, which is also

00:00:20.090 --> 00:00:22.480
the periodic solution of
the differential equation

00:00:22.480 --> 00:00:28.400
x dot dot plus 2x dot plus
4x equals the square wave

00:00:28.400 --> 00:00:29.440
function.

00:00:29.440 --> 00:00:32.259
So the square wave function
is a periodic function

00:00:32.259 --> 00:00:33.870
with period 2pi.

00:00:33.870 --> 00:00:36.790
It's defined as minus 1 and
1 on the intervals minus pi

00:00:36.790 --> 00:00:39.310
to 0 and 0 to pi.

00:00:39.310 --> 00:00:42.180
And we know that the
square wave function has

00:00:42.180 --> 00:00:44.800
the following Fourier series.

00:00:44.800 --> 00:00:47.050
So I'll let you think about
this problem for a moment.

00:00:47.050 --> 00:00:48.341
And I'll come back in a second.

00:00:58.360 --> 00:00:59.670
Hi everyone.

00:00:59.670 --> 00:01:02.150
Welcome back.

00:01:02.150 --> 00:01:04.790
So the reason we've been
studying Fourier series

00:01:04.790 --> 00:01:06.870
is to essentially solve
differential equations

00:01:06.870 --> 00:01:10.530
with complicated forcing inputs
on the right-hand side which

00:01:10.530 --> 00:01:11.960
are periodic.

00:01:11.960 --> 00:01:14.600
And the reason we've been
studying Fourier series

00:01:14.600 --> 00:01:17.490
is because we know that
differential equations

00:01:17.490 --> 00:01:20.200
with sines and cosines
as forcing terms

00:01:20.200 --> 00:01:24.340
on the right-hand side are
relatively easy to solve.

00:01:24.340 --> 00:01:27.900
And we want to be able to
solve the same differential

00:01:27.900 --> 00:01:30.760
equation with a more
complicated periodic function

00:01:30.760 --> 00:01:32.360
on the right-hand side.

00:01:32.360 --> 00:01:44.350
So the general approach
is to first decompose

00:01:44.350 --> 00:01:49.230
the right-hand side
into a Fourier series.

00:01:57.529 --> 00:01:59.570
And this step is essentially
already done for us.

00:01:59.570 --> 00:02:02.810
We're told what the
Fourier series is.

00:02:02.810 --> 00:02:09.445
And what we do is
we solve the ODE x

00:02:09.445 --> 00:02:14.500
dot dot plus 2x dot plus 4x.

00:02:14.500 --> 00:02:19.790
And I'm just going to take one
term of the Fourier series,

00:02:19.790 --> 00:02:20.520
sine n*t.

00:02:23.251 --> 00:02:24.750
So if we know the
right-hand side is

00:02:24.750 --> 00:02:27.620
a sum of a whole bunch of
sines, what we're going to do

00:02:27.620 --> 00:02:32.287
is we're going to solve for any
specific one of those sines.

00:02:32.287 --> 00:02:34.245
So we want to solve this
differential equation.

00:02:36.920 --> 00:02:41.610
And then, we use superposition.

00:02:45.660 --> 00:02:49.319
So if we know what the
solution is to one sine n*t,

00:02:49.319 --> 00:02:51.860
and we know that the right-hand
side forcing is a sum of many

00:02:51.860 --> 00:02:55.670
sine n*t's with
appropriate weight factors,

00:02:55.670 --> 00:03:05.240
then we can use superposition
to construct a final solution.

00:03:11.180 --> 00:03:15.220
So this is the method
to attack this problem.

00:03:15.220 --> 00:03:20.180
So we were given step one,
and we want to solve step two.

00:03:20.180 --> 00:03:22.900
And we can solve this just
using the exponential response

00:03:22.900 --> 00:03:23.775
formula.

00:03:23.775 --> 00:03:25.400
So what we're going
to do is we're just

00:03:25.400 --> 00:03:28.030
going to complexify
the right-hand side.

00:03:32.150 --> 00:03:35.590
So if I want to solve the
differential equation x dot dot

00:03:35.590 --> 00:03:39.650
plus 2x dot plus
4x equals sine n*t,

00:03:39.650 --> 00:03:44.200
I'm going to denote the
solution with the subscript n.

00:03:44.200 --> 00:03:48.224
And it's going to be
the imaginary part

00:03:48.224 --> 00:03:51.430
of-- and I'm just using the
exponential response formula--

00:03:51.430 --> 00:03:58.110
1 over the characteristic
polynomial evaluated at i*n,

00:03:58.110 --> 00:04:01.367
e to the i*n*t.

00:04:01.367 --> 00:04:02.700
You might ask how do I get that.

00:04:05.670 --> 00:04:15.910
Well, I basically just took
the complexified equation,

00:04:15.910 --> 00:04:19.075
and noted that sine n*t
was the imaginary part of e

00:04:19.075 --> 00:04:22.910
to the i*n*t, and then used the
exponential response formula.

00:04:22.910 --> 00:04:25.410
And I want to take the imaginary
part at the end of the day.

00:04:29.760 --> 00:04:32.630
So what is the
characteristic polynomial?

00:04:32.630 --> 00:04:37.320
In this case, it's s
squared plus 2s plus 4,

00:04:37.320 --> 00:04:43.060
which means that p of i*n is
going to be negative n squared

00:04:43.060 --> 00:04:46.820
plus 4-- so I'll just group
the real terms together--

00:04:46.820 --> 00:04:54.290
plus 2i*n, so the 2i*n
comes from the 2s term.

00:04:54.290 --> 00:05:01.960
And then x of n is going to be
the imaginary part of 1 over 4

00:05:01.960 --> 00:05:08.720
minus n squared plus
2i*n e to the i*n*t.

00:05:12.100 --> 00:05:18.240
And I'm going to use the
amplitude-phase form.

00:05:23.100 --> 00:05:25.720
I'm going to convert this
Cartesian complex number

00:05:25.720 --> 00:05:28.270
into an amplitude-phase
form just because it's

00:05:28.270 --> 00:05:31.237
going to make taking the
imaginary part of the solution

00:05:31.237 --> 00:05:32.570
very easy at the end of the day.

00:05:36.100 --> 00:05:41.080
So the amplitude of this complex
number is 4 minus n squared,

00:05:41.080 --> 00:05:45.410
quantity squared, plus the
imaginary part squared,

00:05:45.410 --> 00:05:48.900
so that's 4n squared,
square rooted.

00:05:51.790 --> 00:05:58.369
And then, upstairs is e^(i*n*t).

00:05:58.369 --> 00:06:00.160
And downstairs, it's
going to be e^(i*phi).

00:06:04.600 --> 00:06:09.370
And I'm going to put a
subscript n on the phi

00:06:09.370 --> 00:06:13.090
just because for
each complex number,

00:06:13.090 --> 00:06:15.740
we're going to have a
different phase phi.

00:06:15.740 --> 00:06:20.460
And that phase
phi_n is going to be

00:06:20.460 --> 00:06:33.480
the arctangent of 2n divided by
4 minus n squared, like that.

00:06:38.430 --> 00:06:43.000
So now, I can combine phi of n
with the upstairs term, i*n*t,

00:06:43.000 --> 00:06:44.740
in the exponent.

00:06:44.740 --> 00:06:46.500
And when I take
the imaginary part,

00:06:46.500 --> 00:06:52.200
I'm only going to be left
with sine of n*t minus phi_n.

00:06:52.200 --> 00:07:02.750
So x of n is going to be 1 over
4 minus n squared squared plus

00:07:02.750 --> 00:07:12.780
4n squared quantity
squared-- square rooted--

00:07:12.780 --> 00:07:20.350
times sine of n*t minus phi_n,
where phi_n was given using

00:07:20.350 --> 00:07:23.050
the arctangent formula.

00:07:23.050 --> 00:07:26.000
And this gives us a
solution, which note

00:07:26.000 --> 00:07:27.340
is periodic with period 2t--

00:07:27.340 --> 00:07:29.000
AUDIENCE: [INAUDIBLE].

00:07:29.000 --> 00:07:31.020
PROFESSOR: Right.

00:07:31.020 --> 00:07:46.490
I should also note that phi
of n is between 0 and pi.

00:07:49.010 --> 00:07:52.270
And this gives us this one
solution to the differential

00:07:52.270 --> 00:07:56.130
equation with a forcing of sine
n*t on the right-hand side.

00:07:56.130 --> 00:07:59.340
So now what we want to
do is we want sum up

00:07:59.340 --> 00:08:02.850
many of these solutions using
the superposition principle.

00:08:02.850 --> 00:08:06.632
So if I go back now,
I'm going to write

00:08:06.632 --> 00:08:08.090
the original
differential equation.

00:08:11.280 --> 00:08:15.320
So I'm just going to go
back and just rewrite this.

00:08:15.320 --> 00:08:17.500
And I'm going to write the
right-hand side using its

00:08:17.500 --> 00:08:24.920
Fourier series, 1 over n
sine n*t, where n is odd.

00:08:28.570 --> 00:08:31.170
And this is the problem we
originally wanted to solve.

00:08:31.170 --> 00:08:33.640
And essentially what we've done
is we've solved the problem

00:08:33.640 --> 00:08:36.240
for each individual sine n*t.

00:08:36.240 --> 00:08:37.789
So how do we get
the full solution?

00:08:37.789 --> 00:08:40.289
Well, what we have to do is we
have to multiply the solution

00:08:40.289 --> 00:08:45.292
for each sine n*t by a factor
of 4 divided by pi and 1 over n.

00:08:45.292 --> 00:08:47.250
And then, we have to add
all of these solutions

00:08:47.250 --> 00:08:49.660
up for all odd values of n.

00:08:53.360 --> 00:09:04.710
So for example, x is just going
to be 4 over pi sum of n odd,

00:09:04.710 --> 00:09:10.620
1 over n times the
solution to every sine n*t,

00:09:10.620 --> 00:09:14.925
which we've already computed,
and I've denoted it as x sub n.

00:09:14.925 --> 00:09:17.870
And x sub n is up here.

00:09:17.870 --> 00:09:21.810
So if we want to be
explicit about it,

00:09:21.810 --> 00:09:32.220
I'll write the whole thing out
as 4 over pi, n odd, 1 over 4

00:09:32.220 --> 00:09:35.120
minus n squared,
quantity squared,

00:09:35.120 --> 00:09:39.720
plus 4n squared, square rooted.

00:09:39.720 --> 00:09:43.500
We also have a factor
of n out front.

00:09:43.500 --> 00:09:48.174
We have a sine n*t minus phi_n.

00:09:51.890 --> 00:09:55.180
So there's the final answer
for a particular solution

00:09:55.180 --> 00:09:58.320
in its full glorious detail.

00:09:58.320 --> 00:10:00.370
We can also check that
this particular solution

00:10:00.370 --> 00:10:02.330
is periodic.

00:10:02.330 --> 00:10:04.740
Note how each sine
n*t is periodic.

00:10:04.740 --> 00:10:09.070
And each sine n*t has
period of at least 2pi.

00:10:09.070 --> 00:10:11.080
So when we sum up a
whole bunch of functions

00:10:11.080 --> 00:10:13.950
which all have a
period of at least 2pi,

00:10:13.950 --> 00:10:17.110
the sum is also going to be
periodic function with at least

00:10:17.110 --> 00:10:17.610
2pi.

00:10:21.250 --> 00:10:25.770
And as a result, this gives us
the answer we're looking for.

00:10:25.770 --> 00:10:28.070
Also, in addition, if we want
the full general solution

00:10:28.070 --> 00:10:31.110
to the differential equation
to this particular solution,

00:10:31.110 --> 00:10:35.340
we also have to add
the homogeneous piece.

00:10:35.340 --> 00:10:37.610
So this concludes the problem.

00:10:37.610 --> 00:10:39.460
And I'll just quickly recap.

00:10:39.460 --> 00:10:40.960
When solving a
differential equation

00:10:40.960 --> 00:10:43.340
with a periodic forcing
function on the right-hand side,

00:10:43.340 --> 00:10:45.880
again, to iterate
the steps, you first

00:10:45.880 --> 00:10:48.160
Fourier decompose
the right-hand side

00:10:48.160 --> 00:10:50.940
into summation of
sines and cosines.

00:10:50.940 --> 00:10:54.490
You then solve the differential
equation for sine n*t,

00:10:54.490 --> 00:10:57.810
cosine n*t individually.

00:10:57.810 --> 00:10:59.760
This gives you a
solution for each term

00:10:59.760 --> 00:11:02.250
on the right-hand side of
the differential equation.

00:11:02.250 --> 00:11:03.708
And then at the
end of the day, you

00:11:03.708 --> 00:11:06.260
use superposition to sum
up all of the solutions.

00:11:06.260 --> 00:11:09.910
And that gives you one
final big solution.

00:11:09.910 --> 00:11:11.330
So I hope you
enjoy this problem.

00:11:11.330 --> 00:11:13.484
And I'll see you next time.