If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

2nd order linear homogeneous differential equations 3

Let's use some initial conditions to solve for the particular solution. Created by Sal Khan.

Want to join the conversation?

  • piceratops sapling style avatar for user Magne Bugten
    What if the characteristic equation turns out to be quadratic? for instance (r^2 - 6r + 9).
    The factors of that would then be (r-3)^2. Does your example here infer that the general solution of that would be: y(x) = c1e^(3x) + c2e^(3x)? (and not just ce^(3x))
    (13 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Annalise Trite
      Excellent question.
      Short answer...No.

      If the characteristic equation turns out to be a quadratic there are three possible scenarios. In this video only one scenario is explored, namely, when the roots of the characteristic equation are real and different. In this case the general solution will always work.

      The second scenario is when the roots are real but identical (like the example you gave). Notice that your solution can be rewritten by factoring out the like term e^(3x) giving you, y(x) = (c1+c2)*e^(3x)
      And since a constant plus a constant is a constant,
      y(x)=c*e^(3x). However, this is not a sufficient general solution because it only has one part (this is a terribly oversimplified explanation). There is a general solution for this scenario but it is different. Try searching for it.

      The third scenario is when the roots are not real, i.e. they are imaginary. For example, try solving the equation y''+ y '+ 1 = 0
      Thumbs up!
      (26 votes)
  • blobby green style avatar for user Mohammad Abdollah
    what's the method to find a solution to this 2nd order linear homogeneous differential equations. we can't just guess and try a solution. in this example you suggested e to the rx and it worked but there must be a way ti find that a solution. Thanks.
    (6 votes)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user mbfranc78
      The "method" Sal used here was to "choose" a function whose derivatives were multiples of itself as a possible solution the differential equation. As the only way to sum multiples of a function and its derivatives such that they equal zero is for the function and its derivatives to be multiples of one another. Well, we've already learned that the only function that satisfies this condition is f(x)= e^(rx) since d^n/dx^n(f(x))=r^n*e^(rx), i.e., the nth derivative of e^(rx) is just r^n*e^(rx) which itself is a multiple of the original function. Thus, f(x)=e^(rx) is a general solution to any 2nd order linear homogeneous differential equation.
      To find the solution to a particular 2nd order linear homogeneous DEQ, we can plug in this general solution to the equation at hand to find the values of r that satisfy the given DEQ. These particular values of r give general solutions which themselves can be combined linearly to form a more general solution to the original DEQ. To get the specific solution to the DEQ, one must use initial conditions to calculate the coefficients that apply to the solution for this particular DEQ.
      This "guess & check" method is employed all the time in advanced science and engineering courses. Your intuition about the problem leads to an answer which you then verify.
      The neat thing about this method for the solution of homogeneous 2nd order DEQs is that the solution boils down to simple algebra. The characteristic equation derived by differentiating f(x)=e^(rx) is a quadratic equation for which we have several methods to easily solve.
      Furthermore, if the solutions to the characteristic equation are real, we get solutions that involve exponential growth/decay. However, if the solutions of the characteristic equation are imaginary, we get trigonometric/periodic functions (sin x & cos x) as solutions to the DEQ since e^(irx)= cos(rx)+ isin(rx). Hence, f(x)=e^(rx) is a very versatile function.
      (12 votes)
  • blobby green style avatar for user Ryan Kristopher Albaugh
    Can you show this using a matix?
    (6 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Angelique Del Rosario
    how can i determine if an equation is linear or non linear equation.... can you give me some examples
    (3 votes)
    Default Khan Academy avatar avatar for user
    • male robot donald style avatar for user Jeremy
      Angelique,

      In Linear DE's, the variable that is being differentiated isn't itself part of a non-linear function.

      For example, in the differential equation y'' +3y' +y=7x+2, the variable that is being differentiated is y. This differential equation is linear, because there are no y^2, y^3, e^y, cos (y), sin ( y' ) , yy' terms, or anything like that.

      Note, it would be okay to multiply a y term (or y', y'', y''', etc) by any constant, and the equation would still be linear. In the above equation, for example, there is a product of the 1st derivative of y and 3... that doesn't make the equation non-linear. In fact, it's even ok to multiply the term being differentiated by the independent variable and the equation is still linear: y''+xy'+y=7x is still linear... and so is y'' +sin(x) y' + y=7x.

      But all of the following equations are NON-linear:

      ln( y'') = y'
      y''/y = y' (But y''/y=4x is linear, because you can manipulate it to: y'' -4xy =0)
      sin (y')=4x
      (y'')^2+y =0

      et cetera, et cetera.... make sense?
      (3 votes)
  • purple pi teal style avatar for user Anshuman Nayak
    what does the solution of a differential equation actually mean?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Alexander Wu
      What does the solution to a regular equation mean? The solution set of 3x + 1 = 10 is the set of x's that satisfy 3x + 1 = 10. One solution is one element in that solution set. For differential equations, it's the same, except the solutions are functions. The solution set of f'(x) + f(x) = x^2 is all functions f that satisfy that equation (for all x).
      (3 votes)
  • aqualine ultimate style avatar for user Vincent Proud
    How do I deal with a situation in which I have an equation that contains both a function, it's derivatives and the variable that the function is defined in terms of?

    For instance, if I have 20y'' + y' = 150 - 2x
    Where y is defined in terms of x.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • aqualine tree style avatar for user hakeem
    hello, is it possible to find c1 and c2 using non-graphing calculator?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • leafers seed style avatar for user Muhammad Touseef
    Find a second solution of the differential equation
    x^2y''+-xy'+2y=0 and y=xsin(lnx)
    by using the formula.
    how can we solve this.?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user emx.v94
    A comment: At the end, Sal says it is the particular solution to the original differential equation. Well, technically, it is the HOMOGENEOUS solution to the original differential equation. The PARTICULAR solution is the solution to a non-homogeneous differential equation. Am I right?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Rateeb
    If i flipped c1 and c2, so that the solution would be y= -7e^(-2x) + 9e^(-3x), why would it still work?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user Robert
      While you do still get a solution to the original equation with the constants switched, they would not satisfy both of the initial condition equations for c1 and c2 (boxed in video). It does still satisfy the first one, c1 + c2 = 2 (or y(0) = 2), but not the second condition that -2c1-3c2 = 3 (or y'(0) = 3). Did you check the conditions after you switched the constants? Hope this helped clear that up.
      (1 vote)

Video transcript

In the last video we had this second order linear homogeneous differential equation and we just tried it out the solution y is equal to e to the rx. And we figured out that if you try that out, that it works for particular r's. And those r's, we figured out in the last one, were minus 2 and minus 3. But it came out of factoring this characteristic equation. And watch the last video if you forgot how we got that characteristic equation. And we ended up with this general solution for this differential equation. And you could try it out if you don't believe me that it works. But what if we don't want the general solution, we want to find the particular solution? Well then we need initial conditions. So let's do this differential equation with some initial conditions. So let's say the initial conditions are-- we have the solution that we figured out in the last video. Let me rewrite the differential equation. So it was the second derivative plus 5 times the first derivative plus 6 times the function, is equal to 0. And the initial conditions we're given is that y of 0 is equal to 2. And the first derivative at 0, or y prime at 0, is equal to 3. What does y equal at the point 0, and what is the slope at 0-- at x is equal to 0-- and the slope is 3. So how do we use these to solve for c1 and c2? Well, let's just use the first initial condition. y of 0 is equal to 2, which is equal to-- essentially just substitute 0 in into this equation. So it's c1 times e to the minus 2 times 0, that's essentially e to the 0, so that's just 1. So it's c1 times 1, which is c1, plus c2 times e to the minus 3 times 0. This is e to the 0, so it's just 1. So plus c2. So the first equation we get when we substitute our first initial condition is essentially c1 plus c2 is equal to 2. Now let's apply our second initial condition that tells us the slope at x is equal to 0. So y prime is 0. So this is our general solution, let's take its derivative, and then we can use this. So y prime of x is equal to what? The derivative of this is equal to minus 2 c1 times e to the minus 2x. And what's the derivative of this? It's minus 3 c2 times e to the minus 3x. And now we can use our initial condition, y prime at 0. So when x is equal to 0, what's the right-hand side equal? It's minus 2 times c1 and then e to the minus 0, e to the 0, that's just 1. Minus 3 c2, and then once again x is 0, so e to the minus 3 times 0, that's just 1. So it's just 1 times minus 3 c2. And it tells us that when x is equal to 0, what does this whole derivative equal? Well, it equals 3, right? Y prime of 0 is equal to 3. So now we go back into your first year of algebra. We have two equations-- two linear equations with two unknowns-- and we could solve. Let me write them in a form that you're probably more used to. So the first one is c1 plus c2 is equal to 2. And the second one is minus 2 c1 minus 3 c2 is equal to 3. So what can we do? Let's multiply this top equation by 2. There's a ton of ways to solve this, but if you multiply the top equation times 2, you'll get-- and I'll do this is a different color, just so that it's changed-- I'm just multiplying the top one by 2, you get 2 c1 plus 2 c2 is equal to 4. And now we can add these two equations. Minus 2 c1 plus 2, those cancel out. So minus 3 plus 2, you get minus c2 is equal to 7. Or we could say that c2 is equal to minus 7. And now we can substitute back in here. We have c1 plus c2-- c2 is minus 7-- so minus 7, is equal to 9, or we know that c-- oh sorry, no I'm already confusing myself. My brain was getting ahead of myself. c1 plus c2, that's minus 7, is equal to 2, right? I'm just substituting back into this differential equation-- sorry, to this equation, not a differential it's just a simple linear equation-- and then we get c1 is equal to 9. And now we have our particular solution to the differential equation. So this was our general solution. We can just substitute our c1's and our c2's back in. We have our particular solution for those initial conditions. And I think that warrants a different color. So our particular solution is y of x is equal to c1, which we figured out is 9e to the minus 2x, plus c2-- well, c2 is minus 7-- minus 7e to the minus 3x. That is the particular solution to our original differential equation. And it might be a good exercise for you to actually test it out. This particular solution to this differential equation. I'll do another example in the next video. I'll see you soon.