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

Integrating factors 2

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

Want to join the conversation?

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.