Main content

## Differential equations

### Course: Differential equations > Unit 1

Lesson 1: Intro to differential equations# 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?

- How do you know the solution is a linear function?(29 votes)
- Unfortunately, for most differential equations, is a mixture of practice and experience that gives you an idea of what kind of equation might be the solution. There is not a set method in order to find what family of function would make a good solution for a particular differential equation.(31 votes)

- Hello, thanks for all the help:

In this procedure: m=(3m-2)x+3b-5 to be true for all X values, the coefficient before the x value has to be 0.

Can we corroborate this plug in some numbers? I still don't see it.(9 votes)- With numbers, you could think of this equation as
`ax + 5 = 5`

, where you control the variable`a`

, but the variable`x`

is outside your control, and can be any number whatsoever. The only way you can make this equation true is by making the variable`a`

(the one you control), equal to`0`

, that way the variable that is outside your control stops messing the equation.(48 votes)

- This is the last video before the exercises start. I understand everything up until this video, but I can't answer the questions. I suggest you add more videos to prepare us for the exercises.(17 votes)
- at @6:18sal asks us to verify it , can anyone explain how to do so ?(8 votes)
- Yes. You can take the solution:

y = 2/3 x + 17/9

and plug it back into the original equation.

From the solution then

dy/dx = 2/3

plugging back into the original:

2/3 = -2x + 3(2/3 x + 17/9) - 5

2/3 = 17/3 - 5

2/3 = 17/3 - 15/3

2/3 = 2/3

So you verified the solution(17 votes)

- At the beginning of the video you said that if some gave a clue which indicated that the solution to this Diff Eq is a linear (y=mx+b). My question is, what if you didnt have any clue and you had to solve this diff qe problem? how would you do it?(6 votes)
- Watch a couple of the later videos on general cases.(8 votes)

- The starting point in solving this problem was knowing that the solution would be linear, of the form y=mx+b (0:20in the video). How do we know that the (or one) solution would be linear, i.e. why is a linear solution assumed?(8 votes)
- A linear solution is assumed because that is how Sal set out the question, perhaps to make it easier to solve.(2 votes)

- I don't get why m has to equal 3b-5 and therefore the coefficient of x has to be zero. Why can't m>3b-5 for example, resulting in a need for an actual value of x to balance the equation?(5 votes)
- We want to solve for
`m`

, the**only assumption**we can make that**we know is true**is that if the**coefficient on**. Therefore`x`

is zero, the`x`

term disappears`m = 3b - 1`

.(6 votes)

- why does that whole equation needs to be equal to "m"(4 votes)
- Because originally the whole equation was equal to
`dy/dx`

, and turns out that`dy/dx = m`

.(6 votes)

- Is this y = 2/3x +17/9 the only solution, or will there be other solutions which don't follow the form of y = mx +b?(4 votes)
- It is not the only solution. The general solution to this problem is

y = 2x/3 + 17/9 + Ce^(3x), where C ∈ ℝ.

(You might want to check my other answer above.)

Note: If C = 0, we get y = 2x/3 + 17/9.(5 votes)

- Hey just a quick question

Wouldn't

y = -x^2 + 3yx - 5x

Also be a solution to that differential equation. As taking the derivative of that function would be equal to dy/dx = -2x + 3y - 5?(3 votes)- Like Sal mentioned, there are multiple solutions to differential equations, so that should be right. I got the same answer as you after taking the integral of the given differential equation on both sides.(1 vote)

## 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.