PROFESSOR: Hi everyone.
Welcome back.
So today, I'd like to take a look at solving a linear ODE
but with a periodic input.
And specifically, we're asked to find
one solution, a particular solution, which is also
the periodic solution of the differential equation
x dot dot plus 2x dot plus 4x equals the square wave
function.
So the square wave function is a periodic function
with period 2pi.
It's defined as minus 1 and 1 on the intervals minus pi
to 0 and 0 to pi.
And we know that the square wave function has
the following Fourier series.
So I'll let you think about this problem for a moment.
And I'll come back in a second.
Hi everyone.
Welcome back.
So the reason we've been studying Fourier series
is to essentially solve differential equations
with complicated forcing inputs on the right-hand side which
are periodic.
And the reason we've been studying Fourier series
is because we know that differential equations
with sines and cosines as forcing terms
on the right-hand side are relatively easy to solve.
And we want to be able to solve the same differential
equation with a more complicated periodic function
on the right-hand side.
So the general approach is to first decompose
the right-hand side into a Fourier series.
And this step is essentially already done for us.
We're told what the Fourier series is.
And what we do is we solve the ODE x
dot dot plus 2x dot plus 4x.
And I'm just going to take one term of the Fourier series,
sine n*t.
So if we know the right-hand side is
a sum of a whole bunch of sines, what we're going to do
is we're going to solve for any specific one of those sines.
So we want to solve this differential equation.
And then, we use superposition.
So if we know what the solution is to one sine n*t,
and we know that the right-hand side forcing is a sum of many
sine n*t's with appropriate weight factors,
then we can use superposition to construct a final solution.
So this is the method to attack this problem.
So we were given step one, and we want to solve step two.
And we can solve this just using the exponential response
formula.
So what we're going to do is we're just
going to complexify the right-hand side.
So if I want to solve the differential equation x dot dot
plus 2x dot plus 4x equals sine n*t,
I'm going to denote the solution with the subscript n.
And it's going to be the imaginary part
of-- and I'm just using the exponential response formula--
1 over the characteristic polynomial evaluated at i*n,
e to the i*n*t.
You might ask how do I get that.
Well, I basically just took the complexified equation,
and noted that sine n*t was the imaginary part of e
to the i*n*t, and then used the exponential response formula.
And I want to take the imaginary part at the end of the day.
So what is the characteristic polynomial?
In this case, it's s squared plus 2s plus 4,
which means that p of i*n is going to be negative n squared
plus 4-- so I'll just group the real terms together--
plus 2i*n, so the 2i*n comes from the 2s term.
And then x of n is going to be the imaginary part of 1 over 4
minus n squared plus 2i*n e to the i*n*t.
And I'm going to use the amplitude-phase form.
I'm going to convert this Cartesian complex number
into an amplitude-phase form just because it's
going to make taking the imaginary part of the solution
very easy at the end of the day.
So the amplitude of this complex number is 4 minus n squared,
quantity squared, plus the imaginary part squared,
so that's 4n squared, square rooted.
And then, upstairs is e^(i*n*t).
And downstairs, it's going to be e^(i*phi).
And I'm going to put a subscript n on the phi
just because for each complex number,
we're going to have a different phase phi.
And that phase phi_n is going to be
the arctangent of 2n divided by 4 minus n squared, like that.
So now, I can combine phi of n with the upstairs term, i*n*t,
in the exponent.
And when I take the imaginary part,
I'm only going to be left with sine of n*t minus phi_n.
So x of n is going to be 1 over 4 minus n squared squared plus
4n squared quantity squared-- square rooted--
times sine of n*t minus phi_n, where phi_n was given using
the arctangent formula.
And this gives us a solution, which note
is periodic with period 2t--
AUDIENCE: [INAUDIBLE].
PROFESSOR: Right.
I should also note that phi of n is between 0 and pi.
And this gives us this one solution to the differential
equation with a forcing of sine n*t on the right-hand side.
So now what we want to do is we want sum up
many of these solutions using the superposition principle.
So if I go back now, I'm going to write
the original differential equation.
So I'm just going to go back and just rewrite this.
And I'm going to write the right-hand side using its
Fourier series, 1 over n sine n*t, where n is odd.
And this is the problem we originally wanted to solve.
And essentially what we've done is we've solved the problem
for each individual sine n*t.
So how do we get the full solution?
Well, what we have to do is we have to multiply the solution
for each sine n*t by a factor of 4 divided by pi and 1 over n.
And then, we have to add all of these solutions
up for all odd values of n.
So for example, x is just going to be 4 over pi sum of n odd,
1 over n times the solution to every sine n*t,
which we've already computed, and I've denoted it as x sub n.
And x sub n is up here.
So if we want to be explicit about it,
I'll write the whole thing out as 4 over pi, n odd, 1 over 4
minus n squared, quantity squared,
plus 4n squared, square rooted.
We also have a factor of n out front.
We have a sine n*t minus phi_n.
So there's the final answer for a particular solution
in its full glorious detail.
We can also check that this particular solution
is periodic.
Note how each sine n*t is periodic.
And each sine n*t has period of at least 2pi.
So when we sum up a whole bunch of functions
which all have a period of at least 2pi,
the sum is also going to be periodic function with at least
2pi.
And as a result, this gives us the answer we're looking for.
Also, in addition, if we want the full general solution
to the differential equation to this particular solution,
we also have to add the homogeneous piece.
So this concludes the problem.
And I'll just quickly recap.
When solving a differential equation
with a periodic forcing function on the right-hand side,
again, to iterate the steps, you first
Fourier decompose the right-hand side
into summation of sines and cosines.
You then solve the differential equation for sine n*t,
cosine n*t individually.
This gives you a solution for each term
on the right-hand side of the differential equation.
And then at the end of the day, you
use superposition to sum up all of the solutions.
And that gives you one final big solution.
So I hope you enjoy this problem.
And I'll see you next time.