# Eksakte ligninger eksempel 3

## Video transcript

Welcome back. I'm just trying to show you as many examples as possible of solving exact differential equations. One, trying to figure out whether the equations are exact. And then if you know they're exact, how do you figure out the psi and figure out the solution of the differential equation? So the next one in my book is 3x squared minus 2xy plus 2 times dx, plus 6y squared minus x squared plus 3 times dy is equal to 0. So just the way it was written, this isn't superficially in that form that we want, right? What's the form that we want? We want some function of x and y plus another function of x and y, times y prime, or dy dx, is equal to 0. We're close. How could we get this equation into this form? We just divide both sides of this equation by dx, right? And then we get 3x squared minus 2xy plus 2. We're dividing by dx, so that dx just becomes a 1. Plus 6y squared minus x squared plus 3. And then we're dividing by dx, so that becomes dy dx, is equal to-- what's 0 divided by dx? Well it's just 0. And there we have it. We have written this in the form that we need, in this form. And now we need to prove to ourselves that this is an exact equation. So let's do that. So what's the partial of M? This is the M function, right? This was a plus here. What's the partial of this with respect to y? This would be 0. This would be minus 2x, and then just a 2. So the partial of this with respect to y is minus 2x. What's the partial of N with respect to x? This would be 0, this would be minus 2x. So there you have it. The partial of M with respect to y is equal to the partial of N with respect to x. My is equal to Nx. So we are dealing with an exact equation. So now we have to find psi. The partial of psi with respect to x is equal to M, which is equal to 3x squared minus 2xy plus 2. Take the anti-derivative with respect to x on both sides, and you get psi is equal to x to the third minus x squared y-- because y is just a constant-- plus 2x, plus some function of y. Right? Because we know psi is a function of x and y. So when you take a derivative, when you take a partial with respect to just x, a pure function of just y would get lost. So it's like the constant, when we first learned taking anti-derivatives. And now, to figure out psi, we just have to solve for h of y. And how do we do that? Well let's take the partial of psi with respect to y. That's going to be equal to this right here. So The partial of psi with respect to y, this is 0, this is minus x squared. So it's minus x squared-- this is o-- plus h prime of y, is going to be able to what? That's going to be equal to our n of x, y. It's going to be able to this. And then we can solve for this. So that's going to be equal to 6y squared minus x squared plus 3. You can add x squared to both sides to get rid of this and this. And then we're left with h prime of y is equal to 6y squared plus 3. Anti-derivative-- so h of y is equal to what is this-- 2y cubed plus 3y. And you could put a plus c there, but the plus c merges later on when we solve the differential equation, so you don't have to worry about it too much. So what is our function psi? I'll write it in a new color. Our function psi as a function of x and y is equal to x to the third minus x squared y plus 2x. Plus h of y, which we just solved for. So h of y is plus 2y to the third plus 3y. And then they're could be a plus c there, but you'll see that it doesn't matter much. Actually I want to do something a little bit different. I'm not just going to chug through the problem. I want to kind of go back to the intuition. Because I don't want this to be completely mechanical. Let me just show you what the derivative-- using what we knew before you even learned anything about the partial derivative chain rule-- what is the derivative of psi with respect to x. What is the derivative of psi with respect to x? Here we just use our implicit differentiation skills. So the derivative of this-- I'll do it in a new color-- 3x squared minus-- now we're going to have to use the chain rule here-- so the derivative of the first expression with respect to x is-- well, let me just put the minus sign and I could put like that-- so it's 2x times y plus the first function, x squared times the derivative of the second function with respect to x. Well that's just y prime, right? It's the derivative of y with respect to y is 1, times the derivative of y with respect to x, which is just y prime. Fair enough. Plus the derivative of this with respect to x is easy, 2. Plus the derivative of this with respect to x. Well let's take the derivative of this with respect to y first. We're just doing implicit differentiation of the chain rule. So this is plus 6y squared. And then we're using the chain rule, so we took the derivative with respect to y. And then you have to multiply that times the derivative of y with respect x, which is just y prime. Plus the derivative of this with respect to why is 3 times-- we're just doing the chain rule-- the derivative of y with respect to x. So that's y prime. Let's try to see if we can simplify this. So we get this is equal to 3x squared minus 2xy plus 2. So that's this term, this term, and this term. Plus-- let's just put the y prime outside-- y prime times-- let's see, you have a negative sign out here-- minus x squared plus 6y squared plus 3. So this is the derivative of our psi as we solved it. Look at this closely and notice that that is the same-- hopefully it's the same-- as our original problem. What was our original problem that we started working with? The original problem was 3x squared minus 2xy plus 2, plus 6y squared minus x square plus 3, times y prime, is equal to 0. So this was our original problem. And notice that the derivative of psi with respect to x just using implicit differentiation is exactly this. So hopefully this gives you a little intuition of why we can just rewrite this equation as the derivative with respect x of psi, which is a function of x and y, is equal to 0. Because this is the derivative of psi with respect to x. I wrote out here. It's the same thing-- this right here-- right? So that equals 0. So if we take the anti-derivative of both sides, we know that the solution of this differential equation is that psi of x and y is equal to c as the solution. And we know what psi is, so we just set that equal to c, and we have the implicit-- we have a solution to the differential equation, I'll just define implicitly. So the solution-- you don't have to do this every time. This step right here you wouldn't have to do if you're taking a test, unless the teacher explicitly asked for it. I just wanted kind of make sure that you know what you're doing, that you're not just doing things completely mechanically. That you really see that the derivative of psi really does give you-- we solved for psi. And I just wanted to show you that the derivative of psi with respect to x, just using implicit differentiation and our standard chain rule, actually gives you the left hand side of the differential equation, which was our version of problem. And then that's how we know that that the derivative of psi with respect x is equal to 0, because our original differential equation was equal to 0. You take the anti-derivative of both sides of this, you get psi is equal to C, is the solution of the differential equation. Or if you wanted to write it out, psi is this thing. Our solution to the differential equation is x to the third, minus x squared y, plus 2x, plus 2y to the third, plus 3y, is equal to c, is the implicitly defined solution of our original differential equation. Anyway I've run out of time again. I will see you in the next video.