Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm reading about differential equations. It says that a first order ODE may be written:

M(x,y)dx + N(x,y)dy = 0

Then if there is some function f(x,y) such that df/dx = M and df/dy = N you can write:

( df/dx )dx + ( df/dy ) dy = 0

Then it says "Of course, the only way that such an equation holds is if df/dx = 0 and df/dy = 0. And this entails that the function f be identically constant. f(x,y) =c."

Here is the whole excerpt:enter image description here

I don't see why this is the case. First, I thought df/dy and df/dx were not zero but rather df/dx =M and df/dy =N... also, if two things add to zero they both don't need to be zero, one can be negative the other positive?

I'm confused, please help.

The fact that it says "of course" is making me feel pretty dumb.

This is from the section on "The Method of Exact Equations"


share|cite|improve this question
@tutorscomputer: Could you give the source and/or a complete quote? What would make more sense if it said that $dM/dy = dN/dx$. – Arturo Magidin Jun 8 '11 at 4:09
@tutorscomputer: you added material after the assertion. To provide context, you need to provide material leading up to the assertion. If you could quote the entire paragraph leading up to the assertion, that would help. – Arturo Magidin Jun 8 '11 at 4:20
Could it be that the $dx$ and $dy$ mean that there can be no "formal cancellation"? – Arturo Magidin Jun 8 '11 at 4:29
From the Schaum's Outline of Differential Equations maybe? Or the Schaum's Outline of Partial Differential Equations? – Doug Spoonwood Jun 8 '11 at 5:23
@Doug Spoonwood I thought that it's from Schaum too, but google told me it's from Differential equations demystified By Steven George Krantz… – Martin Sleziak Jun 8 '11 at 6:48
up vote 13 down vote accepted

The equation $$M(x,y) dx + N(x,y) dy = 0$$ means the following: that $x$ and $y$ are related in such a way that if we start at any point $(x,y)$, and then make an infinitesimal change $dx$ in $x$, then the corresponding change in $dy$ is such that the above expression equals zero.

It might be easier to understand if you rewrite this as $$M\bigl(x,y(x)\bigr) + N\bigl(x,y(x)\bigr) \dfrac{dy}{dx} = 0.$$ This means that $y$ is a function of $x$, and the derivative $dy/dx$ satisfies the preceding equation. It has the same meaning as the preceding equation with $dx$ and $dy$ separated.

Now suppose that $M(x,y) = \dfrac{\partial f}{\partial x}(x,y)$ and $N(x,y) = \dfrac{\partial f}{\partial y}(x,y).$

Then we may rewrite the preceding equation as $$\frac{\partial f}{\partial x}\bigl(x,y(x)\bigr) + \frac{\partial f}{\partial y}\bigl(x,y(x)\bigr) \frac{dy}{dx} = 0,$$ which by the chain rule is the same as saying that $$\frac{d f\bigl(x,y(x)\bigr)}{d x} = 0,$$ or equivalently, that $f\bigl(x,y(x)\bigr)$ is constant, as $x$ varies.

Your textbook phrases things slightly differently, because it is using the first version of the differential equation: it writes instead $$\frac{\partial f}{\partial x} (x,y) d x + \frac{\partial f}{\partial y}(x,y) dy = 0.$$ Now this is the total change in $f(x,y)$ when $x$ changes by $dx$ and $y$ changes by $dy$.

So what this equation says is that if $x$ and $y$ are related so that the changes $dx$ and $dy$ are related to each other by the original equation, then the quantity $f(x,y)$ will not change as $x$ (and hence $y$) changes.

So it is not asserting that $f(x,y)$ is constant for any values of $x$ and $y$; rather, that $f(x,y)$ is constant as $x$ and $y$ change according to the constraints of the original equation. In short, $$f(x,y) =c$$ is a solution of the differential equation.

[As far as I can tell, the reasoning, such as there is, in the text that follows the "Of course" is completely bogus; it is arguing as if $dx$ and $dy$ are independent quanities. If they were, i.e. if the change in $f(x,y)$ were zero no matter how we varied $x$ and $y$, then indeed $f(x,y)$ would be constant for all values of $x$ and $y$, but then the differential equation wouldn't be very interesting, since $M$ and $N$ themselves would be the zero functions. Rather, the d.e. asserts that the change in $f(x,y)$ is zero if we vary $x$ and $y$ in some related way, and the conclusion one wants to draw is the one I drew above, namely that $f(x,y)$ is constant when $x$ and $y$ vary according to the particular constraint of the d.e.

Let me give an example: we could take $f(x,y) = xy$, just to choose one of the infinitely many different functions $f(x,y)$ of two variables that you could write down.

Then $M = y$ and $N = x$, and the d.e. is $$ y dx + x dy = 0,$$ or, in the second form that I wrote it, $$y + x \frac{dy}{dx} = 0.$$ Now the solutions is given by $x y = c$, i.e. by $$y = \frac{c}{x},$$ for an arbitrary constant $c$. (Check!)

Note that is certainly not true that the partial derivatives of $f$, i.e. $M$ and $N$, vanish identically!

So one (slightly sarcastic) answer to the question as to why an author writes "of course" is that this is mathematical shorthand for making an unjustified assertion that is quite possibly wrong!]

share|cite|improve this answer

The book is being lazy with this derivation, and the "of course" is meant as a bluff to make you not think very hard about why the next step is true. It should read:

Then if there is some function $f(x,y)$ such that $$ \frac{\partial f}{\partial x} = M\qquad\text{and}\qquad\frac{\partial f}{\partial y} = N\text{,} $$ then we can rewrite the differential equation as $$ \frac{\partial f}{\partial x}dx \,+\, \frac{\partial f}{\partial y}dy \;=\; 0. $$ From the multivariable chain rule, we can recognize the left side of the equation as the total differential $df$ of the function $f$. In particular, the equation states that $df = 0$, i.e. that $f$ is identically constant. In other words, $$ f(x,y) \;\equiv\; c. $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.