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

Worked example: linear solution to differential equation

If a particular solution to a differential equation is linear, y=mx+b, we can set up a system of equations to find m and b. See how it works in this video.

Want to join the conversation?

Video transcript

- So let's get a little bit more comfort in our understanding of what a differential equation even is. So here we have a differential equation. We haven't started exploring how we find the solutions for a differential equations yet. But let's just say you saw this, and someone just walked up to you on the street and says, "Hey, I will give you a clue, "that there's a solution to this differential equation "that is essentially a linear function, "where y is equal to mx plus b, "and you just need to figure out "the m's and the b's, or maybe the m and the b "that makes this linear function "satisfy this differential equation." What I now encourage you to do, is pause the video and see if you can do it. So I'm assuming you have paused it, and had a go at it. So let's think this through together. If we know that this kind of a solution can be described in this way, we need to figure out some m's and b's here. This is telling us that if we were to take the derivative of this with respect to x, if we take the derivative of mx plus b with respect to x, that that should be equal to negative 2 times x plus 3 times y. well, we know y is this thing, minus 5. And that should be true for all x's, in order for this to be a solution to this differential equation. Remember, the solution to a differential equation is not a value or a set of values. It is a function or a set of functions. So in order for this to satisfy this differential equation, it needs to be true for all of these x's here. So let's work through it. Let's figure out first what our dy dx is. So dy dx. We'll just take the derivative here with respect to x dy dx is derivative of mx with respect to x, is just going to be m. And of course derivative of b with respect to x, just a constant, so it's just going to be zero. So dy dx is m. So we could write m is equal to negative 2x, is equal to negative 2x, plus 3 times, and instead of putting y there I could write mx plus b. Remember y is equal to mx plus b. And just as a repeated reminder, this has to be true for all x's. mx plus b, and then of course we have the minus 5. So if you weren't able to solve it the first time, I encourage you to start from here, and now figure out what m and b needs to be in order for this equation right over here, in order for this to be true for all x's. In order for this to be true for all x's. So assuming you have paused again and had a go at it, let's just keep algebraically manipulating this. I'll just switch to one color here. So we have m. m is equal to negative 2x plus, if we distribute this 3 we're going to have 3mx plus 3b, and then of course we're going to have minus 5. And now we can group the x terms. So if we were to group, if we were to group ... Let me find a new color here, maybe this blue. So if we were to take these two and add them together that's going to be negative 2 plus 3m times x, or we could write this as 3m minus 2 times x, and then you have your constant terms, so you have these terms right over here, so plus 3b minus 5, and of course that's all going to be equal to m. That's going to be equal to m. Now remember, this needs to be true, this needs to be true for all x's. So notice, over here I have some coefficient times x on the right-hand side. But on the left-hand side I have no x's. So somehow, this thing must disappear. This is a constant, so it's completely reasonable. It's completely reasonable that this constant could be equal to m. But the only way that I get these x's to disappear so all I'm left with is an m, is if this thing is equal to zero. Let me say that again, because I think it may be a little bit counter-intuitive what I'm about to do. We're saying that m, some constant value, is equal to some coefficient times x, plus some other constant value. Well, in order for a constant value to be equal to a coefficient times x plus some other constant value the coefficient on X must be equal to zero. Another way to think about it is, this should be, you could rewrite the left-hand side here as zero x plus m. So you see, you kind of match the coefficients. So zero must be equal to 3m minus 2, and m is equal to 3b, m is equal to 3b minus 5. m is equal to 3b minus 5. So let's use that knowledge, that information, to solve for m and b. So we could use this first one. So 3m minus 2 must be equal to zero. So let's write that. 3m minus 2 is equal to zero, or 3m is equal to 2, or m is equal to 2/3. So we figured out what m is. Then we could use that information, because we know that, we know that m is equal to, is equal to 3b minus 5. m is 2/3, so we get 2/3 is equal to 3b minus 5. We could add 5 to both sides, which is the same thing as adding 15/3 to both sides. Is that, did I do that right? Yeah, adding 5 to both sides is the same thing as adding 15/3 to both sides. So let's do that. 15/3 plus 15/3, these cancel out. That's just 5 right over there. On the left-hand side we have 17/3 is equal to 3b, or if you divide both sides by 3 you get b is equal to 17, b is equal to 17/9, and we're done. We just found a particular solution for this differential equation. The solution is y is equal to 2/3x plus 17/9. And I encourage you, after watching this video, to verify that this particular solution indeed does satisfy this differential equation for all x's. For all x's.