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

First order homogeneous equations 2

Another example of using substitution to solve a first order homogeneous differential equations. Created by Sal Khan.

Want to join the conversation?

  • starky ultimate style avatar for user blaise.brignac
    At how come we can just drop the absolute value function from the cx term?
    (25 votes)
    Default Khan Academy avatar avatar for user
    • leafers seedling style avatar for user Alexey Tanashkin
      I'm sure Sal just forgot to put an absolute value here. We can not drop it. The reason is that C is an ARBITRARY constant. Arbitrary means that it can be ANYTHING and it should NOT depend on whether x is positive or negative. Let me explain. If we drop the absolute value then the choice of C, positive or negative, puts restrictions on a domain of the function. If C>0 then x must be >0 too, if C<0 then x must be <0. It's a huge problem. Doing so we voluntary deprive yourself from a half of solutions! But if we keep the absolute value then sign of x does not depend on choice of C. Here is an example: suppose a pair (a,b) is a solution to our diff. equation. If we save the absolute value, then pair (-a,b) is also solution, but if we drop the absolute value it's not.
      (8 votes)
  • male robot hal style avatar for user Tommy
    I have been struggling with understanding exactly what we are doing in these videos on diff equations. It si like I see how to do it, but I'm bot sure what I am doing. But is it correct to say that we are presented with some expression containing the derivative of a function, and the solution is an expression with no derivative, only the functions themselves? So once I have reached an expression without any dx/dy, y' etc, I am done?
    (10 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Annalise Trite
      Hey Tommy, you have it right.
      Heres an analogy that may be helpful. In algebra we have algebraic equations, e.g. 2x+5=-1 , the solution of which is a number. In this case x=-3.
      In differential calculus we have differential equations, e.g., y'(x)=y(x), the solution of which is a function.
      The ultimate goal is to write that function in terms of simple operations (+,-,*,/,sin,cos,log,...).
      Sometimes there is no solution. Sometimes there is a solution but it can't be represented in terms of simple operations. In an introductory class you will only get a glimpse of the universe of differential equations.
      (11 votes)
  • piceratops sapling style avatar for user Devin Peterson
    Why don't we solve for Y to complete the problem? I understand we can easily do that and I also understand the final result of this video, but why do we leave it in the form someFunction(x,y) = 0 rather than solving Y explicitly?
    (4 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user wchargin
      It's not as easy to "solve for y" as you may think. The final answer in this video (x^2 + y^2 − cx^3 = 0) is expressed as an implicit function of y. Clearly, we have y^2 = cx^3 − x^2, which is still valid, but not quite "solved for y." You might be tempted to say that y = sqrt(cx^3 − x^2), but that's only the positive square root, so you're losing half the values!

      To demonstrate, I plotted both the explicit form and the not-quite-correct explicit form (https://i.imgur.com/y50vYNL.png). You can see that the curves are the same, but that the explicit form only has the positive values.

      Now, in this example, you could say (hand-wavily) that y = ± sqrt(cx^3 − x^2). This isn't really a function, because there are two y-values for each x-value in the domain. On the other hand, you could say that y_1 = sqrt(cx^3 − x^2) and y_2 = −sqrt(cx^3 − x^2); together, these two functions represent the entire solution set.

      In general, the implicit function theorem (https://en.wikipedia.org/wiki/Implicit_function_theorem) states (loosely speaking) that any implicit function (i.e., f(x,y) = 0) can be expressed as the "combination" of some set of functions {y_1(x), y_2(x), …}. In this case, we only needed two. In other cases, we might need more. For example, the implicit function sin(y) = 0 is true for y = 0, 2π, −2π, 4π, −4π, …, so we would need infinitely many explicit functions: {y_1 = 0, y_2 = 2π, y_3 = −2π, y_4 = 4π, y_5 = −4π, …}.

      Finally, for some applications, you don't need a (set of) explicit function(s). For example, you may just want to test whether a given value is on the curve. In this case, you could easily just evaluate f(x, y) for a given point and test whether it's zero.

      (Bonus: imagine trying to come up with the explicit functions for this graph! https://i.imgur.com/G20kEbR.png)
      (8 votes)
  • blobby green style avatar for user Dan
    At couldn't he have taken everything as a power of e. to cancel the natural log. Or would it have become e^(ln(x) + C) which is the same as e^(ln(x))*e^c which is cx.

    So it would be the same solution, so, nvm. Just figured that in the fly. Was my logic correct?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user silkwormghh
    Do we always substitute v = y/x and write the function in terms of y/x?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • starky seedling style avatar for user Mahmoud Hesham
    where is the homogeneous equations practice ??
    (4 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seedling style avatar for user Mostafa Ebeid
    i'm having trouble defining the proper method to solve this eq: y'-1=e^(x+2y)
    any help would be appreciated
    (3 votes)
    Default Khan Academy avatar avatar for user
  • marcimus pink style avatar for user carbajalkana
    at when putting the xs and vs together why is the equation =1 [2xv v'] / [1+v^2]=1 <<<< where does this 1 come frome if you are just dividing the right side?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user jesuispsreenivas
    define an integrating factor
    (1 vote)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user Michael Jerzy Regdosz
    at , why solve it like that? Shouldn't the solution to this d.e. be y=x* sqrt(cx-1) ?
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Let's do one more homogeneous differential equation, or first order homogeneous differential equation, to differentiate it from the homogeneous linear differential equations we'll do later. But anyway, the problem we have here. It's the derivative of y with respect to x is equal to-- that x looks like a y-- is equal to x squared plus 3y squared. I'm writing it a little bit small, so that I don't run out of space. Divided by 2xy. So in all of these homogeneous equations-- and obviously, we don't know it's homogeneous yet. So we have to try to write it as a function of y divided by x. So it looks like we could do that, if we divide the top and the bottom by x squared. So if we just multiply-- let me do it in a different color-- 1 over x squared, or x to the negative 2, over 1 over x squared. We're essentially just multiplying by 1. And then, that is equal to what? 1 plus 3y squared over x squared divided by 2-- if you divide x, divide by x squared, you just get a 1 over x-- so 2 times y over x. Or we could just rewrite the whole thing, and this is just equal to 1 plus 3y over x squared divided by 2 times y over x. So yes, this is a homogeneous equation. Because we were able to write it as a function of y divided by x. So now, we can do the substitution with v. And hopefully, this is starting to become a little bit of second nature to you. So we can make the substitution that v is equal to y over x, or another way of writing that is that y is equal to xv. And then, of course, the derivative of y with respect to x, or if we take the derivative with respect to x of both sides of this, that's equal to the derivative of x is 1 times v, this is just the product rule, plus x times the derivative of v with respect to x. And now, we can substitute the derivative of y with respect to x is just this. And then the right hand side of the equation is this. But we can substitute v for y over x. So let's do that. And so we get v plus x. Instead of dv [? dv ?] x, I'll write v prime for now, just so that I don't take up too much space. v prime is equal to 1 plus 3v squared, we're making the substitution v is equal to y over x. All of that over 2v. Now, let's see what we can do. This is where we just get our algebra hat on, and try to simplify until it's a separable equation in v. So let's do that. So let's multiply both sides of this equation by 2v. So we'll get 2v squared plus 2xv v prime-- 2v times x, yep, that's 2xv v prime-- is equal to 1 plus 3v squared. Now let's see, let's subtract 2v squared from both sides of this. And we will be left with 2xv v prime is equal to 1 plus-- let's see, we're subtracting 2v squared from both sides. So we're just left with a 1 plus v squared here, right? 3v squared minus 2v squared is just v squared. And let's see, we want it to be separable, so let's put all the v's on the left hand side. So we get 2xv v prime divided by 1 plus v squared is equal to 1. And let's divide both sides by x. So we get the x's on the other side. So then we get 2v-- and I'll now switch back to the other notation. Instead of v prime, I'll write dv dx. 2v times the derivative of v with respect to x divided by 1 plus v squared is equal to-- I'm dividing both sides by x, notice I didn't write the x on this side-- so that is equal to 1 over x. And then, if we just multiply both sides of this times dx, we've separated the two variables and we can integrate both sides. So let's do that. Let's go up here. I'll switch to a different color, so you know I'm working on a different column now. So multiply both sides by dx. I get 2v over 1 plus v squared dv is equal to 1 over x dx. And now we can just integrate both sides of this equation. This is a separable equation in terms of v and x. And what's the integral of this? At first, you might think, oh boy, this is complicated. This is difficult, maybe some type of trig function. But you'll see that it's kind of just the reverse chain rule. We have a function here, 1 plus v squared, an expression here. And we have its derivative sitting right there. So the antiderivative of this, and you can make a substitution if you like. You could say u is equal to 1 plus v squared, then du is equal to 2v dv. And then, well, you would end up saying that the antiderivative is just the natural log of u. Or, in this case, the antiderivative of this is just the natural log of 1 plus v squared. We don't even have to write an absolute value there. Because that's always going to be a positive value. So the natural log of 1 plus v squared. And I hope I didn't confuse you. That's how I think about it. I say, if I have an expression, and I have its derivative multiplied there, then I can just take the antiderivative of the whole expression. And I don't have to worry about what's inside of it. So if this was a 1 over an x, or 1 over u, it's just the natural log of it. So that's how I knew that this was the antiderivative. And if you don't believe me, use the chain rule and take the derivative of this, and you'll get this. And hopefully, it will make a little bit more sense. But anyway, that's the left hand side, and then that equals-- Well, this one's easy. That's the natural log, the absolute value of x. We could say, plus c, but just so that we can simplify it a little bit, an arbitrary constant c, we can really just write that as the natural log of the absolute value of some constant c. I mean, this is still some arbitrary constant c. So we can rewrite this whole equation as the natural log of 1 plus v squared is equal to-- when you add natural logs, you can essentially just multiply the two numbers that you're taking the natural log of-- the natural log of, we could say, the absolute value of cx. And so the natural log of this is equal to the natural log of this. So we could say that 1 plus v squared is equal to cx. And now we can unsubstitute it. So we know v is equal to y over x, so let's do that. So we get 1 plus y over x squared is equal to cx. Let me scroll this down a little bit. Let's multiply both sides of the equation times x squared. We could rewrite this as y squared over x squared. So we multiply both sides times x squared, you get x squared plus y squared is equal to cx to the third. And we're essentially done. If we want to put all of the variable terms on left hand side, we could say that this is equal to x squared plus y squared minus cx to the third is equal to 0. And this implicitly defined function, or curve, or however you want to call it, is the solution to our original homogeneous first order differential equation. So there you go. I will see you in the next video. And now, we're actually going to do something. We're going to start embarking on higher order differential equations. And actually, these are more useful, and in some ways, easier to do than the homogeneous and the exact equations that we've been doing so far. See you in the next video.