# Repeated roots of the characteristicÂ equation

## Video transcript

Let's say we have the following
second order differential equation. We have second derivative of
y, plus 4 times the first derivative, plus 4y
is equal to 0. And we're asked to find the
general solution to this differential equation. So the first thing we do, like
we've done in the last several videos, we'll get the
characteristic equation. That's r squared plus 4r
plus 4 is equal to 0. This one is fairly
easy to factor. We don't need the quadratic
equation here. This is r plus 2
times r plus 2. And now something interesting
happens, something that we haven't seen before. The two roots of our
characteristic equation are actually the same number,
r is equal to minus 2. So you could say we only have
one solution, or one root, or a repeated root. However you want to say it, we
only have one r that satisfies the characteristic equation. You might say, well
that's fine. Maybe my general solution is
just y is equal to some constant times e to the minus
2x, using my one solution. And my reply to you is,
this is a solution. And if you don't believe
me you can test it out. But it's not the general
solution. And why do I say that? Because this is a second order
differential equation. And if someone wanted a
particular solution, they would have to give you two
initial conditions. The two initial conditions we've
been using so far are, what y of 0 equals, and what
y prime of 0 equals. They could give you what y
of 5 equals, who knows. But in general, when you have
a second order differential equation, they have to give you
two initial conditions. Now the problem with this
solution, and why it's not the general solution, is if you
use one of these initial conditions, you can solve
for a c, right? You'll get an answer. You'll solve for that c. But then there's nothing
to do with the second initial condition. In fact, except for only in one
particular case, whatever c you get for the first initial
condition, it won't be that-- this equation won't
be true for the second initial condition. And you could try it out. I mean, if we said, y of 0 is
equal to A and y prime of 0 is equal to 5A. Let's see if these work. If y of 0 is equal to A, that
tells us that A is equal to c times e to the minus
2 times 0. So e to the 0. Or c is equal to A, right? So if you just had this first
initial condition, say fine, my particular solution is
y is equal to A times e to the minus 2x. Let's see if this particular
solution satisfies the second initial condition. So what is the derivative
of this? y prime is equal to minus
2Ae to the minus 2x. And it says that 5A-- this
initial condition says that 5A is equal to minus 2A times
e to the minus 2 times 0, so e to the 0. Or another way of saying that,
e to the 0 is just 1. It says that 5A is equal
to minus 2A, which we know is not true. So note, when we only have
this general, or pseudo-general, solution, it can
only satisfy, generally, one of the initial conditions. And if we're really lucky,
both initial conditions. So that at least gives you an
intuitive feel of why this isn't the general solution. So let me clean that up a little
bit so that I-- I have a feeling I'll have to
use this real estate. So what do we do? We can use a technique called
reduction of order. And it really just says,
well let's just guess a second solution. In general when we first thought
about these linear constant coefficient
differential equations, we said, well e to rx might
be a good guess. And why is that? Because all of the derivatives
of e are kind of multiples of the original function, and
that's why we used it. So if we're looking for a second
solution, it doesn't hurt to kind of make
the same guess. And in order be a little bit
more general, let's make our guess for our second solution--
I'll call this g for guess-- let's say it's some
function of x times our first solution, e
to the minus 2x. I could say some function of x
times c times e to the minus 2x, but the c is kind
of encapsulated. It could be part of this some
random function of x. So let's be as general
as possible. So let's assume that this is a
solution and then substitute it back into our original
differential equation, and see if we can actually solve for
v that makes it all work. So before we do that, let's
get its first and second derivatives. So the first derivative of g
is equal to-- well this is product rule. And I'll drop the v of x, we
know that v is a function and not a constant. So, product rule, derivative
of the first, v prime times the second expression, e to the
minus 2x, plus the first function, or expression, times
the derivative of the second. So minus 2 times e
to the minus 2x. Or, just to write it a little
bit neater, g prime is equal to v prime e to the minus 2x
minus 2ve to the minus 2x. Now we have to get the
second derivative. I'll do it in a different
color, just to fight the monotony of it. So the second derivative-- we're
going to have to do the product rule twice-- derivative
of this first expression. It's going to be v prime prime
e to the minus 2x, minus 2v prime e to the minus 2x. That was just the product
rule again. And then the derivative of the
second expression is going to be-- let's see, derivative of
the first one is v prime-- so it's going to be minus 2v prime
e to the minus 2x, plus 4ve to the minus 2x. I hope I haven't made
a careless mistake. And we can simplify
this a little bit. So we get the second derivative
of g, which is our guess solution, is equal to
the second derivative of v prime, e to the minus 2x minus
2v prime-- no, minus 4, sorry, because we have minus 2, minus
2-- minus 4v prime e to the minus 2x, plus 4ve
to the minus 2x. And now, before we substitute it
into this, we can just make one observation. That will just make the algebra
a little bit simpler. Notice that g is something
times e to the minus 2x. G prime is-- we could factor
out an e to the minus 2x. And g prime prime, we
can factor out an e to the minus 2x. So let's factor them
out, essentially. So when we write this, we can
write-- so the second derivative is g prime prime,
which we can write as-- and I'm going to try to do this--
it's e to the minus 2x times the second derivative. So now we can get rid of the
e to the minus 2x terms. So that's v prime prime minus
4v prime plus 4v, right? If I just distribute this out
I get the second derivative, which is this. Plus 4 times the first
derivative. And I'm also going to factor
out the e to the minus 2x. So, plus 4 times this. So it's going to be plus 4v
prime minus 8v, right? Once again, I factored out the
e to the minus 2x, right? Plus 4 times y. We factored out the e to the
minus 2x-- so plus 4 times v. I did that, because if I didn't
do that I'd be writing e to the minus 2x, and I'd
probably make a careless mistake, and I'd run out
of space, et cetera. But anyway, I essentially-- to
get this, I just substituted the second derivative, the first
derivative, and g back into the differential
equation. And we know that that
has to equal 0. And let's see if we
can simplify this a little bit more. And then hopefully
solve for v. So let's see, some things
are popping out at me. So I have plus 4v plus
4v, that's plus 8v, minus 8v, right? So plus 4 minus 8 plus
4, those cancel out. It's plus 8 minus 8,
those cancel out. And I also have minus 4v
prime plus 4v prime. So those cancel out. And lo and behold, we've done
some serious simplification. It ends up being e to the minus
2x times v prime prime-- we could call that v prime prime
of x, now that we've saved so much space--
is equal to 0. We know this could
never equal to 0. So, essentially, we have now
established that this expression has to
be equal to 0. And we get a separable second
order differential equation. We get that the second
derivative of v with respect to x-- or it's a function
of x-- is equal to 0. So now we just have to
differentiate both sides of this equation twice. You differentiate once,
you get what? v prime of x is equal to,
let's call it c1. And if we were to take the
anti-derivative of both sides again, we get v of x is
equal to c1 x plus some other c2, right? Now remember, what
was our guess? Our guess was that our general
solution was going to be some arbitrary function v times that
first solution we found, e to the minus 2x. And when we actually took that
guess and we substituted it in, we actually were able
to solve for that v. And we got that v is
equal to this. So this is interesting. So what is g, or what does
our guess function equal? And it's no longer a guess. We've kind of established
that it works. g, which we can call our
solution, is equal to v of x, times e to the minus 2x. Well, that equals this, c1 x
plus c2 e to the minus 2x. That equals c1 xe to the minus
2x, plus c2 e to the minus 2x. And now we have a truly
general solution. We have two constants, so we
can satisfy two initial conditions. And if you were looking for a
pattern, this is the pattern. When you have a repeated root
of your characteristic equation, the general solution
is going to be-- you're going to use that e to the, that
whatever root is, twice. But one time you're going to
have an x in front of it. And this works every time for
second order homogeneous constant coefficient
linear equations. I will see you in
the next video.