The following content is provided under a Creative
Commons license.
Your support will help MIT OpenCourseWare
continue to offer high quality educational resources for free.
To make a donation or view additional materials
from hundreds of MIT courses, visit MIT OpenCourseWare
at ocw.mit.edu.
HERBERT GROSS: Hi.
Today we're going to discuss the technique known as variation
of parameters, which is a sure fire method for finding
a particular solution of a linear differential
equation provided only, and I say only
with a little bit of a shutter, provided only that we know
the general solution of the homogeneous equation,
and I'll talk about that in a minute.
You see, the idea is this.
Let's suppose, and again, we'll stick
with our second order of equation
for purposes of illustration, y double prime plus
p of x y prime plus q of x y equals f of x.
We're given that equation, not necessarily
constant coefficients, and what we're assuming
is that the solution of the homogeneous equation, L of y
equals 0, is known in full.
In other words, we know a general solution.
By the way, let's keep in mind the following two things.
One of which is by way of review and the other
is a forecaster of what we'll be doing next time.
This whole method is going to hinge
on knowing the general solution of the homogeneous equation.
Notice that in particular, the one kind of equation
that we can certainly find the homogeneous solution of
is the equation involving constant coefficients, you see?
So obviously, then the method of variation of parameters,
if I'm correct in what I just said,
will apply to linear equations with constant coefficients.
The hardship of using variation of parameters
will center around the fact that what
if we don't know how to find the general solution
of the homogeneous equation?
And that's what the lecture of next time will be all about.
But for the time being, let's focus on this technique
and what it means.
We assume that we have the general solution
of the homogeneous equation.
In other words, y sub h is c1u1 of x plus c2u2 x, where again,
by way of review, u1 and u2 are linearly independent solutions
of the homogeneous equation.
Meaning that u1 and u2 are solutions
of the equation, the homogeneous equation,
and they are not constant multiples of one another.
That's going to play a very crucial role,
that they not be constant multiples of one another,
in our punch line in proving how the method of variation
of parameters works.
Anyway, what about this fancy name variation of parameters?
Where does it come from?
And it comes from the fact that we replace the arbitrary
constants by arbitrary functions,
so that we're really now having a variation of the parameter.
See c1 and c2 are parameters, by writing them as functions of x,
you see, I am now varying the parameters,
you see, as I let x take on different values.
So what I'm going to try now is this,
knowing the general solution of this equation, the reduced
equation, I try for a particular solution
of the original equation in the form g1u1 plus g2u2,
where g1 and g2 are now arbitrary functions rather than
arbitrary constants.
And I now go and I look to find out
what the particular solution has to look
like to be the right answer to my problem,
and this is sort of a handwaving type thing only in the sense,
not that the proof isn't rigorous,
but I'm trying to motivate for you how
without the proper hindsight I would have
invented these steps by myself.
Quite frankly, I never would have invented this proof
by myself, but I think I can give you an insight as to how
it comes about, and more importantly,
for those of you who don't know how it comes about
and for even more of you who don't even care how it comes
about, we will have a resume of what the technique means
after we've at least gone through showing what
the proof of the technique is.
What we do is is starting with g1, u1, g2, u2,
where u1 and u2 now are known functions of x,
and g1 and g2 are the undetermined functions of x.
What we say is, OK, let's find yp prime.
So notice that each term over here when we differentiate
gives rise to two terms because we're
differentiating a product.
In other words, there will be one term,
which will be g1 u1 prime, another term, which
will be g1 prime u1, g2, u2 prime, g2 prime, u2, I'm
going to group the terms sort of like this for the time being.
In other words, I take the derivative
and I'm going to group the terms this way.
One reason I want to group the terms this way
is the following.
Look it.
I have picked g1 and g2 completely at random.
That means I have one degree of freedom at my disposal.
In other words, I can still impose a condition
on how g1 and g2 have to be related in order to facilitate
how I can find a solution to this particular equation.
My feeling is this.
In trying to find g1 and g2, I don't
want to have g1, g2, g1 prime, g2 prime, g1 double prime, g2
double prime dangling all over the place.
I would like to hold the number of places
where g1 and g2 occur down to sort of a minimum.
So I'm going to hold these two terms already involved
in the first derivative off here,
I'm going to hold them separately for a while.
The worst that will happen is that this simplification
won't help me at all, in which case
I can look for a different simplification.
At any rate, starting with this, I now find yp double prime.
See, I need the second derivative here.
And how do I differentiate?
Well, each of these terms gives rise to two terms.
Each of these gives rise to two terms because they're products.
And this I'll just leave as symbolically
being differentiated.
In other words, yp double prime is simply
going to be g1u1 double prime plus g1 prime u1
prime plus g2u2 double prime plus g2 prime u2 prime.
In other words, I've differentiated g1u1 prime plus
g2u2 prime.
And the term that I'm holding off separately,
I'll just differentiate that and indicate that by a prime.
Now here's what I'm leading up to.
Notice, by the way, if I were to differentiate this term,
yp double prime would have eight terms in it
instead of just these four.
Also notice a rather interesting thing.
Ultimately, I'm going to take yp double prime, yp prime, and yp
and substitute them into this equation
in order to see what g1 and g2 must look like.
Notice that yp double prime has a g1u1 double prime
determinant.
yp prime has a g1u1 prime terminate,
and yp has a g1u1 terminate.
Similarly for u2 prime, u2 double prime, et cetera.
But the idea is this.
If I now leave this term here out.
In fact, what's the best way to leave it out?
I will now invoke one of my only free choice.
I will say, look it, I will now put a restriction
on what g1 and g2 have to look like.
They will no longer be completely arbitrary,
but rather I will choose them as follows.
Looking at the derivatives g1 prime and g2 prime,
what I will do is I will pick one of these at random
and then choose the other one, so that g1 prime u1
plus g2 prime u2 will be 0.
You see, look it.
u1 and u2 are known functions.
If I pick g2 prime at random, g2 prime is then known,
u1 is then known, u2 two is known.
If I set this equal to 0, I can solve for the g1 prime
that satisfies that equation.
So I am free to impose that particular condition.
So I say, OK, I will set this equal to 0.
Once I set this equal to 0, look what
happens when I compute yp double prime plus p of xyp
prime plus q of xyp in general.
Look what happens.
I get what?
I get a g1 u1 double prime term, plus a g2 u2 double prime term
plus a g1 prime u1 prime term plus a g2 prime u2 prime term.
That all comes from yp double prime.
I'm lining these things up judiciously,
you see, to have you see more emphatically
what's going on here.
Now from the p of xyp prime term, this will give me what?
pg1u1 prime plus pg2u2 prime.
pg1u1 prime plus pg2u2 prime, and finally, the q times
y sub p term, q times y sub p.
Remember what y sub p is.
q times that will give me what?
qg1u1 plus qg2u2.
There's my eight terms, but the beauty
is that because u1 prime and u2 prime were solutions
of the homogeneous equation.
In other words, since L of u1 and L of u2 is 0,
look at what these three terms add up to.
I can factor out a g1 and what's left?
u1 double prime plus pu1 prime plus qu1,
and by definition of u1, that satisfies L of u1 equals 0.
These three terms add up to 0.
These three terms, in a similar way, factoring out the g2,
I get u2 double prime plus pu2 prime plus
qu2, which must be 0 because u2 satisfies
the homogeneous equation.
These add up to 0.
All I have left are these two terms, namely
g1 prime u1 prime plus g2 prime u2 prime,
and since this must be identically equal to f of x,
it must be that these two terms are
identically equal to their sum.
Is identically f of x.
In other words, once I have imposed arbitrarily
this condition, I am forced to accept this condition.
At any rate, whether I'm forced to or not forced to,
the two conditions I now have to fulfill
are these two equations in, shall I say, two unknowns?
Remember, the functions I'm looking for are g1 and g2.
u1 and u2, consequently, u1 prime and u2 prime,
are known functions.
They were the functions that made up the general solution
of the homogeneous equation.
f of x is the given right hand side
of the non-homogeneous equation.
Consequently, all I don't know are g1 and g2.
And by the way, notice, these equations
are in terms of g1 prime and g2 prime.
If I know g1 prime, and I know g2 prime,
I can integrate to find g1 and g2.
You see in other words, to find g1 and g2,
it's efficient to find g1 prime and g2 prime, even, by the way,
if it turns out I can't handle the integral.
The mere fact that they function as integral means
that we know that its integral exists, and we therefore,
say we know what it is, even if we can't express it explicitly.
But that's not the key point.
The key point is that we must be able to solve
this system of equations uniquely,
hopefully-- not even uniquely, but we
hope that we can solve these the g1 prime and g2 prime.
And the only time that we can't solve these equations
for g1 prime and g2 prime would be
when the determinant of coefficients is equal to 0.
In other words, we can solve uniquely
for g1 prime and g2 prime provided
only that this determinant, the terminate coefficients--
see, g1 prime and g2 prime are our knows, is not 0.
But what is this determinant?
It's u1u2 prime minus u1 prime u2.
That must be unequal to 0.
Look it, I hope by this time you see
what's happening with this trick whenever it comes up.
This seems to suggest the derivative of a quotient.
This would be the derivative of u2 over u1,
if u1 squared had been in the denominator here.
But notice that I can divide through by u1
squared because 0 divided by u1 squared is still 0.
In other words, the left hand side
with a u1 squared in the denominator
is just a derivative of u2 over u1,
and the condition that this not be 0
is simply the condition that u2 over u1 not be a constant.
And this is the key point.
The fact that u1 and u2 were chosen
to give the general solution of y sub h, in other words,
if u1 had been a constant multiple of u2,
we would not have had this be the general solution.
Remember, to find the general solution,
you needed two solutions which were not constant multiples
of one another.
So the fact that we chose u1 and u2,
not just to be solutions of the reduced equation,
the homogeneous equation, but linearly independent solutions,
guarantees the fact that this can't be a constant.
That guarantees the fact that we can
solve for g1 prime and g2 prime, and that
ends the theoretical part of today's lesson.
In summary, leaving out the entire theory, if L of y
equals f of x, with not necessarily
constant coefficients here, and if the general solution
of the homogeneous equation L of y equals 0 is known,
and in particular, is c1u1 plus c2u2,
then a particular solution of L of y
equals f of x is given by g1u1 plus g2u2 where g1 and g2 are
any pair of functions satisfying this pair of equations.
By the way, just in passing, notice
that whereas g1 prime and g2 prime are uniquely determined,
g1 and g2 are determined only up to an arbitrary constant.
For one thing, I only need a particular solution,
so I can drop the arbitrary constant.
For another thing, if you insist that
I put the arbitrary constant in.
Notice that when I multiply out, look what I have left?
g1u1 plus g2u2 plus c1u1 plus c2u2, and that's
just my homogeneous solution back again,
which jibes with the fact that once you've
seen one particular solution, you've seen them all.
Namely, once we have one particular solution,
any other particular solution is obtained
by adding on any solution of the homogeneous equation
to the particular solution obtained.
But that's just, again, an aside.
I think the best way to hammer home what we're talking about
is to come back to the example that we ended
the lecture of last time with-- with which we
ended the lecture of last time.
The example was, if you recall, y double prime plus
y equals secant x.
The point is that because we have constant coefficients
here, we can certainly write down the general solution
of the homogeneous equation.
This is y double prime plus y equals 0.
That leads to the characteristic equation
4r squared plus 1 is 0.
That leads to r equals plus or minus i,
and using our usual technique, that
leads to the general solution c1 sine x plus c2 cosine x.
In other words, in this problem, sine
x will play the role of u1.
Cosine x will play the role of u2.
And now according to the technique,
to find a particular solution of this given equation,
all we must do is write down what?
g1 sine x plus g2 cosine x where g1 prime u1 1 plus g2 prime u2
is 0.
And g1 prime u1 prime-- see, you want a sine x--
u1 prime cosine x plus g2 prime u2 prime.
u2 is cosine x, so u2 prime is minus sine x.
That must equal f of x, and in our problem,
f of x is secant x.
So these are the two equations and two unknowns
that I have to solve for g1 prime and g2 prime.
The easiest way to do this, I guess,
is to solve for g1 prime, multiply the top equation
by sine x, the bottom equation by cosine x, and add.
If I do that, I get that g1 prime is a common factor.
This is sine squared plus cosine squared, which is 1.
So this is g1 prime.
These two terms here cancel because they're
the same magnitudes with opposite signs.
Cosine x times secant x is 1, so g1 prime is 1.
If the derivative of g1 is identically 1, g1
itself must have been x plus some constant.
And I put the constants in accentuated chalk markings
because all I need is a particular solution.
g1 could be x, all right.
Now the idea is knowing that g1 prime is 1,
coming back to this equation, that tells me
that sine x plus g2 prime cosine x is 0, from which I conclude
that g2 prime is minus sine x over cosine x.
Observing that the derivative of cosine x is minus sine x,
this becomes g2 prime is du over u where u is cosine x.
Integral of du over u is log absolute value
of u plus a constant.
In other words, g2 is log absolute value
cosine x plus some constant.
But again, all I need is what?
A particular solution.
How do I get it?
I multiply u1 sign x by g1 and u2 cosine x by g2.
g1 was x, g2 was log absolute value cosine x.
Here is my particular solution of the equation,
y double prime plus y equals secant x.
And again, notice if I had put in the arbitrary
constants c1 and c2, c1 would have multiplied sine x,
c2 would have multiplied cosine x,
and I would have found out that I not only had
a particular solution here, I had the general solution.
But that's not, again, important.
I just mentioned that so you don't think that I
lost the arbitrary constants.
I want to emphasize the fact that all I
need is a particular solution.
A solution of l of y equals f of x
is all I need to tack on to y sub
h to get the general solution of l of y equals f of x.
At any rate, let's check to see if this is the right answer.
And by the way, before I even check it out, let's
keep in mind in terms of the lecture of last time
when we said it was easy to guess what you had
to differentiate to get a sine or cosine or an exponential
or a power of x, what is the likelihood,
and be humble about this and honest, that you
could have looked at secant x and said look at the function
I want to give me this is going to be x sine x
plus log absolute value of cosine x times cosine x?
See if you can do that without any
of these theories and the like, I don't
think you need the course.
I think you should be out clairvoyantly teaching it.
But look at how complicated the solution is, assuming of course
there is a solution.
Let's check that it really is a solution.
Given that y sub p is this, to differentiate this,
this is a product, this is what? x cosine x plus sine x times 1.
That gives me these two terms.
If I now differentiate this, this is also a product.
This is this times the derivative of cosine x,
which is minus sine x.
And then it's going to be what?
This times the derivative of this,
but the derivative of this we already
know is minus sine x over cosine x.
The cosine x's cancel.
All I'm left with is minus sine x.
If I now look at this, these two terms drop out.
That's my yp prime.
To find yp double prime, again, this
is a product so it's a derivative of the first times
the second, that's cosine x, plus the first, which
is x, times the derivative of the second, which is minus sine
x, that gives me this term.
Now I have to differentiate this term, which is also a product.
That's minus log absolute value cosine x times cosine x.
See, that's this term over here.
And now it's going to be what?
This times the derivative of this.
We already know that the derivative of this
is minus sine x over cosine x.
With a minus sign in front, it just
becomes sine x over cosine x.
Multiplying that by sine x, I get sine
squared x over cosine x.
So yp double prime is this, yp p is this.
If I now add yp double prime to yp, what happens?
Here is an x sine x term appearing,
here is a minus x sine x term appearing, they cancel.
Here's a log absolute value cosine x times cosine
x term appearing, here is the same term with a minus sign,
you see they cancel.
And all I'm left with is what?
yp p double prime plus yp is equal to cosine x plus sine
squared x over cosine x.
You see?
Now I put this over a common denominator.
That gives me what?
Cosine squared x plus signs squared x, which is 1,
over cosine x.
And 1 over cosine x is secant x.
And so indeed, this messy function
is a particular solution of this equation
because it satisfies the equation.
In other words, the general solution of y double prime plus
y equals secant x is simply c1 sine x plus c2 cosine x,
you see?
That's my y sub h.
Plus x sine x plus log absolute value cosine x times cosine x.
And that's the method of variation of parameters.
And where is it used primarily?
When you have to tackle a problem which does not
have constant coefficients or if it
has constant coefficients but the right hand side
isn't as pleasant as e to the mx sine
mx cosine mx or x to the nth power.
By the way, just as a note, as will be proven in the homework
exercises, it turns out that if u1 is any solution of l of y
equals 0, the method that we used in variation
of parameters-- in other words, trying
for a particular solution in the form y sub p
equals g1 u1, rather than c1 u1, g1's a function of x now,
that this will always lead to a second independent solution
of l of y equals 0.
By the way, a little note here, and if we
don't catch this right now, it's not too important
because I'll hammer that home in the exercises.
This is only true for linear homogeneous equations
of order 2.
If the order were greater than 2,
all this technique does it guarantees
that it will reduce this homogeneous equation
to a homogeneous equation of lower order.
The point is that if the order is 2, lower order means 1.
And we already know how to solve equations of order 1.
In other words though, what this means is in particular,
if the order is 2, it means that define the general solution
of y double prime plus p of xy prime plus q of xy
equals f of x.
And this is very important, the use of variation of parameters
requires only that we know one particular solution
of the reduced equation.
In other words, if I could find just one
solution of the homogeneous equation,
but I know the method of variation of parameters
will allow me to find a second linearly independent solution.
That would then give me the general solution
of the reduced equation, the homogeneous equation.
And now knowing the general solution
of the homogeneous equation, the usual method
of variation of parameters is what
allows me then to find the particular solution
of the original equation.
And I then add that onto the general solution
of the homogeneous equation, and I then
have the desired general solution.
The hard part is that when you don't
have constant coefficients, how do you
find even that one solution of the homogeneous
equation that you need?
And that is going to be the discussion for next time.
At any rate then, until next time, that's about it for now.
And we'll see you in our next lecture, when
we're going to talk about the use of power series
in finding solutions to linear differential equations.
NARRATOR: Funding for the publication of this video
was provided by the Gabriella and Paul Rosenbaum Foundation.
Help OCW continue to provide free and open access to MIT
courses by making a donation at ocw.mit.edu/donate.