Main content

## Differential equations

### Course: Differential equations > Unit 1

Lesson 7: Exact equations and integrating factors# Exact equations example 3

One more exact equation example. Created by Sal Khan.

## Want to join the conversation?

- In the final part why does he differentiate the y values if he is implicitly differentiating with respect to x ?(10 votes)
- y is a function of x. If you notice, he is differentiating everything according to x, (the total derivative, not the partial). He is basically applying the chain rule.

`d/dx f(y) = f'(y)dy/dx`

when y is a function of x.(8 votes)

- At5:29, isn't he using the product rule rather then the stated chain rule?(5 votes)
- Well, he's using the product rule to differentiate x^2y as well as the chain rule to differentiate
**y**which is a function of x.(6 votes)

- At1:04, Sal divides the differential equation by dx. But, I thought that derivatives such as dy/dx are not supposed to represent fractions? Are we actually dividing dy by dx to get dy/dx or is there a more subtle meaning and Sal is using an abuse of notation?(7 votes)
- dy/dx is a fraction. dx is just an infinitesimal change in x, while dy is an infinitesimal change in y. dy/dx is just the same thing as Δy/Δx, as Δx approaches 0. There is no abuse of notation. This is actually what the derivative means.(0 votes)

- Can't you just separate the equation at0:33?(3 votes)
- Yes you can but here Khan is just trying to show how to use the Exact Equation approach.(3 votes)

- at5:38why are we even using the product rule? when I put d/dx(x^2*y) into Wolfram Alpha it gives me 2xy as the answer. This is very confusing to me.(2 votes)
- Why is y a function of x at5:30and not just another variable? Shouldn't the partial derivative of Psi with respect to x hold y as a constant?(3 votes)
- lets say we have a equation such as (2x+y) - (x+6y)y' = 0. Would this equation be exact? How does the minus in M(x,y) "-" N(x,y)y' = 0 affect the question?(1 vote)
- you can distribute the "-" inside and get (2x+y) + (-x-6y)y' = 0 which if you take partial respect to y for M you will get 1 and partial respect to x for N is -1 so they are not equal to eachother therefore it is not an exact equation.(3 votes)

- Do I have to take My first and then Nx or can I also take Mx first and then Ny and look if it's equal?(1 vote)
- Yes you can. The coefficient of dy/dx is always the Psi(y) term or N and the other is the Psi(x) or M term. As long as you take Nx and My, you will get Psi yx= Psi xy and can prove its exact. Hope this helps(3 votes)

- At6:00, the partial derivative of psi with respect to x of x^2/y is just 2xy, not the extra plus x^2*y'. Partial derivative means to take the derivative of one variable in a multivariable situation, holding the other variables constant. I'm not sure why there is the extra x^2*y' part. Thanks(1 vote)
- He's not taking the partial derivative. He's just doing regular differentiation (using the chain rule) and treating y as a function of x.

Hope that helps.(2 votes)

- When we say that Psi is equal to a constant C, that means that it is a contour line right? as C could take any value, we could just say the solution is a scalar valued function right? without having to equate it to a constant..(1 vote)

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