Main content

### Course: Differential equations > Unit 2

Lesson 1: Linear homogeneous equations# 2nd order linear homogeneous differential equations 2

Let's find the general solution! Created by Sal Khan.

## Want to join the conversation?

- At2:20, Sal suggests the function e^(rx) to satisfy the equation since it keeps the derivatives "in line", so to speak. That all makes sense to me, but why not generalize it even further to the set of functions e^(rx+k), where k is some arbitrary constant? Wouldn't that be equally valid while covering even more solutions?

Consequentially the general solution to the diff equation would be y(x) = C_1e^(r_1x + k_1) + C_2e^(r_2x + k_2). Wouldn't that work equally well while covering more answers?(5 votes)- Nevermind, I realized that the more complicated version doesn't add any solutions since e^(rx + k) = e^(rx) * e^k. The e^k-factor is constant, so the term C_1*e^(rx) already covers the span of C_2*e^(rx + k) - you can just pick the constant C_1 to equal C_2*e^k, and the terms are equal!(22 votes)

- So how do you solve for r if instead of 5 and 6? You just have p and q? y"+py'+qy=0.(6 votes)
- I'm not sure what you mean, but I would guess that you would have to solve for r but putting p and q into the quadratic formula. It might get messy, though.(8 votes)

- Are the solutions to ALL 2nd order homogenous equation y=e^x functions?(6 votes)
- If r is imaginary, they will actually be a sum of trigonometric functions, not exponential functions, because e^(ix) = cos(x) + i*sin(x).(9 votes)

- How can we proof these are the only solutions? meaning where I can find a method or way to decide these are the only solutions to these problem.(5 votes)
- at6:22, why sal multiplied c's to the answers, would it not bean answer withoat c's ?(2 votes)
- It would have been A solution but he's getting the general solution.

I believe the previous video has the properties he used.(6 votes)

- If instead of that equation equaling 0 it equaled a constant such as 18, would the function still be homogeneous. as it could still be written as y''+5y'+6y-18=0 or is my reasoning incorrect.(3 votes)
- Equation y''+5y'+6y=18 is not homogenous. I believe it can be sold by method of undetermined coefficients (presented further in differential equations course). Shortly, the result of equation should be threated like 18+0, so the general solution would be general solution to this equation =0 plus the particular solution to the same equation =18(3 votes)

- How do we know there aren't other solutions, apart from the exponential one? I trust Salman Khan, but I would like to know the proof. :)(3 votes)
- for 1st order, like y'=ky, the proof is quite easy: let y(t) be any solution (perhaps not the exponential one?), then consider the function u(t) = e^(-kt) y(t)

check that u'(t) = -k e^(-kt) y(t) + e^(-kt) y'(t) by product rule, now since y‘(t) = k y(t), so u'(t) = (-k + k) e^(-kt) = 0!, what can u(t) be? u(t) = C, a constant, so the unknown solution y(t) has the property that e^(-kt) y(t) = C, so y(t) = C e^(-kt) is certain! the proof based on the fact that u'(t) = 0 implies u(t)=C, this is a basic calculus fact, that can further be proved using even more elementary real analysis techniques, however, if you accept this, then the proof for first order linear equations goes like what I've shown.(3 votes)

- Sal is giving the solution of second order differential equation through the method of finding complimentry function (C.F.) or complete solution.

But can anyone tell me how we get to the result of exponential function?(2 votes)- Given a standard linear differential equation:

y' + p(x)y = q(x) your integrating factor will always be e^(integral of p(x) dx). You then multiply through by this.(4 votes)

- I don't understand how Sal applied the chain rule to this function. Can someone please explain it to me step-by-step?(2 votes)
- The only time he used the chain rule was after substituting
`y = e^(rx)`

. The chain rule states that given:`y = f(g(x))`

`y′ = g′(x) * f′(g(x))`

Substituting the equation in the problem:`y = e^(rx)`

`f(x) = e^x`

`g(x) = rx`

`f′(x) = e^x`

`g′(x) = r`

`y′ = r*e^(rx)`

In the video Sal then takes the second derivative using the same process:`h(x) = r*e^x`

`h′(x) = r*e^x`

`k(x) = rx`

`k′(x) = r`

`y′ = h(k(x))`

`y′′ = k′(x) * h′(k(x))`

`y′′ = r*r*e^(rx)`

`y′′ = r²e^(rx)`

(4 votes)

- At7:20, Sal mentions that there is a proof for why this is the only general solution to a homogeneous first order differential equation. Can someone please provide the proof?(2 votes)

## Video transcript

I've spoken a lot about second
order linear homogeneous differential equations in
abstract terms, and how if g is a solution, then
some constant times g is also a solution. Or if g and h are solutions,
then g plus h is also a solution. Let's actually do problems,
because I think that will actually help you learn,
as opposed to help you get confused. So let's say I have this
differential equation, the second derivative of y, with
respect to x, plus 5 times the first derivative of y, with
respect to x, plus 6 times y is equal to 0. So we need to find a y where 1
times its second derivative, plus 5 times its first
derivative, plus 6 times itself, is equal to 0. And now, let's just do a little
bit of-- take a step back and think about what kind
of function-- if I have the function and I take its
derivative and then I take its second derivative,
most times I get something completely different. Like, if y was x squared, then
y prime would be 2x, and y prime prime would be 2. And then to add them together
you'd say, well, how would my x terms cancel out so that
you get 0 in the end? So draw back into your brain
and think, is there some function that when I take its
first and second derivatives, and third and fourth
derivatives, it essentially becomes the same function? Maybe the constant in front of
the function changes as I take the derivative. And if you've listened to a
lot of my videos, you'd realize that it probably is what
I consider to be the most amazing function
in mathematics. And that is the function
e to the x. And in particular, maybe e to
the x won't work here-- or you can even try it out, right? If you did e to the x,
it won't satisfy this equation, right? You would get e to the x, plus
5e to the x, plus 6e to the x. That would not equal to 0. But maybe y is equal to e to
some constant r, times x. Let's just make the assumption
that y is equal to some constant r times x, substitute
it back into this, and then see if we can actually solve
for an r that makes this equation true. And if we can, we've found the
solution, or maybe we've found several solutions. So let's try it out. Let's try y is equal to
e to the rx into this differential equation. So what is the first
derivative of it, first of all. So y soon. prime is
equal to what? Derivative chain rule. Derivative of the inside is r. And then derivative of
the outside is still just e to the rx. And what's the second
derivative? y prime prime is equal to
derivative-- r is just a constant-- so derivative of the
inside is r, times r on the outside, that's r squared,
times e to the rx. And now we're ready to
substitute back in. And I will switch colors. So the second derivative, that's
r squared times e to the rx, plus 5 times the first
derivative, so that's 5re to the rx, plus 6 times our
function-- 6 times e to the rx is equal to 0. And something might already be
surfacing to you as something we can do this equation
to solve for r. All of these terms on the left
all have an e to the rx, so let's factor that out. So this is equal to e to the rx
times r squared, plus 5r, plus 6 is equal to 0. And our goal, remember, was to
solve for the r, or the r's, that will make this true. And in order for this side
of the equation to be 0, what do we know? Can e to the rx ever equal 0? Can you ever get something to
some exponent and get 0? Well, no. So this cannot equal 0. So in order for this left-hand
side of the equation to be 0, this term, this expression
right here, has to be 0. And I'll do that in
a different color. So we know, if we want to solve
for r, that this, r squared plus 5r, plus
6, that has to be 0. And this is called the
characteristic equation. This, the r squared plus 5r,
plus 6, is called the characteristic equation. And it should be obvious
to you that now this is no longer calculus. This is just factoring
a quadratic. And this one actually is fairly straightforward to factor. So what is this? This is r plus 2, times r
plus 3 is equal to 0. And so the solutions of the
characteristic equation-- or actually, the solutions to this
original equation-- are r is equal to negative 2 and
r is equal to minus 3. So you say, hey, we found two
solutions, because we found two you suitable r's
that make this differential equation true. And what are those? Well, the first one is
y is equal to e to the minus 2x, right? We can call that y1. And then the second solution
we found, y2 is e to the-- what is this?-- r is minus 3x. Now my question to you
is, is this the most general solution? Well, in the last video, in
kind of our introductory video, we learned that a
constant times a solution is still a solution. So, if y1 is a solution, we also
know that we can multiply y1 times any constant. So let's do that. Let's multiply it by c1. That's a c1 there. This is also going
to be a solution. And now it's a little bit
more general, right? It's a whole class
of functions. The c doesn't have to just be
1, it can be any constant. And then when you use your
initial values, you actually can figure out what
that constant is. And same for y2. y2 doesn't have to be 1 times
e to the minus 3x, it has to be any constant. And we learned that in the
last video, that if something's a solution,
some constant times that is also a solution. And we also learned that if we
have two different solutions, that if you add them together,
you also get a solution. So the most general solution to
this differential equation is y-- we could say y of x, just
to hit it home that this is definitely a function of x--
y of x is equal to c1e to the minus 2x, plus c2e
to the minus 3x. And this is the general
solution of this differential equation. And I won't prove it because the
proof is fairly involved. I mean, we just tried
out e to the rx. Maybe there's some other wacko
function that would have worked here. But I'll tell you now, and you
kind of have to take it as a leap of faith, that this is
the only general solution. There isn't some crazy outside
function there that would have also worked. And so the other question that
might be popping in your brain is, Sal, when we did first order
differential equations, we only had one constant. And that was OK, because we
had one set of initial conditions and we solved
for our constants. But here, I have
two constants. So if I wanted a particular
solution, how can I solve for two variables if I'm only given
one initial condition? And if that's what you actually
thought, your intuition would be correct. You actually need two initial
conditions to solve this differential equation. You would need to know,
at a given value of x, what y is equal to. And, maybe at a given
value of x, what the first derivative is. And that is what we will
do in the next video. See