Main content

### Course: Differential equations > Unit 1

Lesson 7: Exact equations and integrating factors# Integrating factors 2

Now that we've made the equation exact, let's solve it! Created by Sal Khan.

## Want to join the conversation?

- This was completely new to me. What I expected to see was a final step "undoing" the factor of integration. The original differential equation was altered so it was a different problem, wasn't it? How come the solution to this different problem is also a solution to the original problem?(39 votes)
- Consider the equation y=3x. If you multiply both sides by 5, you have 5y=15x. Now plug in 2 for x into both equations, what is your answer? You get y=6 in both equations since from algebra we can see that multiplying both sides of the equation by a number doesn't change it! =D(75 votes)

- In0:29, mu is used. Why mu? Isn't mu used for an arithmetic mean in statistics?(0 votes)
- There aren't enough letters in either the Latin or Greek alphabets for mathematicians, so when there is no fear of being misunderstood we'll use letters that are "already used". If you think it's weird now, just wait until you take a course in abstract algebra where pi is often used as a variable for an arbitrary permutation. :)

Honestly, I don't know why mu is chosen, but it's the way they go in every ODE book I've ever read. I suppose it was the choice the original mathematician used in the original paper on the subject ("mu for multiplication factor"?) and it's as good a letter as any so no one has changed it.(30 votes)

- Is it possible for there not to be an integrating factor?(5 votes)
- Yes, in that case it is either an integrating factor of 1, so you can leave it out, or if no integrating factor exists, it is not solvable through the exact equation method.(7 votes)

- i m nt able to solve (x^3y^3+)dx + x^4y^2dy = 0 using this method(2 votes)
- This equation is separable so you don't need this method(8 votes)

- Can EVERY non-exact differential equation be transformed to an exact one, by multiplying it with some integration factor?(4 votes)
- According to the video, does Sal means there is no absolute integrating factor? For example it could be a function of x or y.(3 votes)
- There can be many integrating factors that cause the equation to be exact, but some are easier to find than others(1 vote)

- AT4:30what happened to the y' how come it did not come down into the new equations, specifically to the right of the equals(2 votes)
- Because in the method to solving Exact Equations, you consider what is multiplying your
`y'`

as your function`N(x,y)`

and the rest as your function`M(x,y)`

. The original`y'`

is used just to separate those 2 parts, it no longer has any involvement in the rest of the solution.(4 votes)

- At0:44, he said it would have been a function of y that is integrating factor. i tried u(y) instead of u(x) but I can't solve for u(y). I just curious that is it possible to use u(y) for this question too? And how do we know which one would we use? u(x) or u(y), judging for what or trial and error?(3 votes)
- I have not tried to solve for the integrating factor of u(y) but i do know that there may or may not be an integrating factor for u(y). Like you said it is kind of trial and error. All of these exact equations that need an integrating factor COULD have a u(x), u(y), u(x,y) or any combination of them but it will be up to you to figure out which one it has.(2 votes)

- My class is currently covering "mixing problems," where the amount of a solute in a tank is being measured as the tank is draining and fresh solution is coming in. The problems always involve an integrating factor if the inflow and outflow rates are different. Can anyone recommend some good resources relating to such application problems? Khan's DE playlist seems to focus mostly on the techniques.(2 votes)
- Can someone explain why do we equal Psi to C to find a solution? I am not sure how to interpret that(2 votes)

## Video transcript

And, in the last video, we had
this differential equation. And it at least looked like
it could be exact. But when we took the partial
derivative of this expression, which we could call M with
respect to y, it was different than the partial derivative of
this expression, which is N in the exact differential
equations world. It was different than
N with respect to x. And we said, oh boy,
it's not exact. But we said, what if we could
multiply both sides of this equation by some function that
would make it exact? And we called that mu. And in the last video, we
actually solved for mu. We said, well, if we multiply
both sides of this equation by mu of x is equal to x, it should
make this into an exact differential equation. It's important to note, there
might have been a function of y that if I multiplied by
both sides it would also make it exact. There might have been a function
of x and y that would have done the trick. But our whole goal is just
to make this exact. It doesn't matter which one
we pick, which integrating factor-- this is called the
integrating factor-- which integrating factor we pick. So anyway, let's do it now. Let's solve the problem. Let's multiply both sides of
this equation by mu, and mu of x is just x. We multiply both sides by x. So see, if you multiply this
term by x, you get 3x squared y plus xy squared, we're
multiplying these terms by x now, plus x to the third
plus x squared y, y prime is equal to 0. Well now, first of all, just as
a reality check, let's make sure that this is now
an exact equation. So what's the partial of this
expression, or this kind of sub-function, with
respect to y? Well, it's 3x squared, that's
just kind of a constant coefficient of y, plus 2xy,
that's the partial with respect to y of that
expression. Now let's take the partial of
this with respect to x. So we get 3x squared plus 2xy. And there we have it. The partial of this with respect
to y is equal to the partial of this with
respect to N. So we now have an exact equation
whose solution should be the same as this. All we did is we multiplied
both sides of this equation by x. So it really shouldn't change
the solution of that equation, or that differential equation. So it's exact. Let's solve it. So how do we do that? Well, what we say is, since
we've shown this exact, we know that there's some function
psi where the partial derivative of psi with respect
to x is equal to this expression right here. So it's equal to 3x squared
y plus xy squared. Let's take the antiderivative of
both sides with respect to x, and we'll get psi
is equal to what? x to the third y plus,
we could write, 1/2 x squared y squared. And of course, this psi is a
function of x and y, so when you take the partial with
respect to x, when you go that way, you might have lost some
function that's only a function of y. So instead of a plus c here,
it could've been a whole function of y that we lost. So
we'll add that back when we take the antiderivative. So this is our psi. But we're not completely done
yet, because we have to somehow figure out what
this function of y is. And the way we figure that out
is we use the information that the partial of this
with respect to y should be equal to this. So let's set that up. So what's the partial of this
expression with respect to y? So I could write, the partial
of psi with respect to y is equal to x to the third plus
2 times 1/2, so it's just x squared y plus h prime of y. That's the partial of a function
purely of y with respect to y. And then that has to equal our
new N, or the new expression we got after multiplying by
the integrating factor. So that's going to be equal
to this right here. This is, hopefully, making sense
to you at this point. And that should be equal to x to
the third plus x squared y. And interesting enough,
both of these terms are on this side. So let's subtract both of those
terms from both sides. So x to the third, x to
the third, x squared y, x squared y. And we're left with h prime
of y is equal to 0. Or you could say that h of y
is equal to some constant. So there's really no y, the
extra function of y. There's just some constant
left over. So for our purposes, we
can just say that psi is equal to this. Because this is just a constant,
we're going to take the antiderivative anyway,
and get a constant on the right hand side. And in the previous videos, the constants all merged together. So we'll just assume that
that is our psi. And we know that this
differential equation, up here, can be rewritten as, the
derivative of psi with respect to x, and that just falls out
of the partial derivative chain rule. The derivative of psi with
respect to x is equal to 0. If you took the derivative of
psi with respect to x, it should be equal to this whole
thing, just using the partial derivative chain rule. And we know what psi is. So we can write-- or actually
we don't even have to. We could use this fact to say,
well, if we integrate both sides, that a solution of this
differential equation is that psi is equal to c. I just took the antiderivative
of both sides. So, a solution to the
differential equation is psi is equal to c. So psi is equal to x
to the third y plus 1/2 x squared y squared. And we could have said plus c
here, but we know the solution is that psi is equal to c, so
we'll just write that there. I could have written a plus
c here, but then you have a plus c here. You have another
constant there. And you can just subtract
them from both sides. And they just merge into another
arbitrary constant. But anyway, there we have it. We had a differential equation
that, at least superficially, looked exact. It looked exact, but then, when
we tested the exactness of it, it was not exact. But we multiplied it by
an integrating factor. And in the previous video, we
figured out that a possible integrating factor is that
we could just multiply both sides by x. And when we did that,
we tested it. And true enough, it was exact. And so, given that it was exact,
we knew that a psi would exist where the derivative
of psi with respect to x would be equal to this
entire expression. So we could rewrite
our differential equation like this. And we'd know that a solution
is psi is equal to c. And to solve for psi, we just
say, OK, the partial derivative of psi with
respect to x is going to be this thing. Antiderivative of both sides,
and there's some constant h of y-- not constant, there's some
function of y-- h of y that we might have lost when we took the
partial with respect to x. So to figure that out, we
take this expression. Take the partial with respect
to y, and set that equal to our N expression. And by doing that, we figured
out that that function of y is really just some constant. And we could have written
that here. We could have written
that plus c. We could call that
c1 or something. But we know that the solution
of our original differential equation is psi is equal to c. So the solution of our
differential equation is psi x to the third y plus
1/2 x squared y squared is equal to c. We could have had this
plus c1 here, then subtracted both sides. But I think I've said it
so many times that you understand, why if h of
y is just a c, you can kind just ignore it. Anyway, that's all for
now, and I will see you in the next video. You now know a little bit about
integrating factors. See you soon.