# Exact Differential Equations

I was revising differential equations and came across the topic of exact differential equations. I have a doubt concerning it. Suppose the differential equation $M(x,y)dx + N(x,y)dy=0$ is exact. Then the solution is given by: $\int Mdx +\int (N-\frac{\partial}{\partial y}\int Mdx)dy = c$. I understand that the integrand in the second term is a function of y alone and also understand the derivation of this solution. What I don't understand is the following paragraph:

My book then says "Since all the terms of the solution that contain x must appear in $\int Mdx$, its derivative w.r.t. y must have all the terms of N that contain x. Hence the general rule to be followed is: Integrate $\int Mdx$ as if y were constant. Also integrate the terms of N that do not contain x w.r.t. y. Equate the sum of these integrals to a constant."

I don't understand the justification that is provided for the general rule. Can someone please explain this?

• "Exact differential equations" is not a "method". It is true that many physical problems lead to a differential equation between the variables $x$ and $y$ in the form $M(x,y)dx+N(x,y)dy=0$, and sometimes such an equation is "exact". If it is not exact treat it as the standard equation $y'=-M(x,y)/N(x,y)$ and forget about finding an "integrating factor". In particular strike the sentence "Since all the terms . . . to a constant" from your textbook. It's sheer bullshit. – Christian Blatter Jul 14 '11 at 18:35
• I know $Mdx + Ndy =0$ isnt always exact. The sentence I have written is "Given the exact differential equation $Mdx +Ndy=0$ ...". It is implicit in the sentence that the given ODE is exact. Let me edit it so that it becomes clear. – Shahab Jul 14 '11 at 18:41
• Actually the word rule may be a better substitute for the word method. – Shahab Jul 15 '11 at 1:48

There seemed to be a misunderstanding as people tried to explain to me why $\int Mdx +\int (N-\frac{\partial}{\partial y}\int Mdx)dy = c$ is the solution of the exact ODE, something which I had already understood perfectly. My problem was with the next statement in the book which gave a working rule that essentially said that the solution could be expressed as $\int M dx$ (y constant) $+ \int N' dy = c$ (N' are the terms of N not containing x) is the solution. After some online searches I have hence discovered the solution. The book is wrong. The rule it quotes works so often in practice that people adopt it but there are cases when it fails and we have to take recourse to $\int Mdx +\int (N-\frac{\partial}{\partial y}\int Mdx)dy = c$ to write the solution. For example the ODE $\frac{dx}{\sqrt{x^2+y^2}} +(\frac{1}{y}-\frac{x}{y\sqrt{x^2+y^2}})dy=0$ would give a wrong answer on applying the working rule and we have to take recourse to directly computing $\int Mdx +\int (N-\frac{\partial}{\partial y}\int Mdx)dy = c$.

• In this example $\int M dx= \int \frac{dx}{\sqrt{x^2+y^2}} = \sinh ^{-1} \frac{x}{y}$, so $\frac{\partial}{\partial y} \int M dx= - \frac{x}{y\sqrt{x^2+y^2}}$. The working rule seems to apply to it. You just mistook the example? – GotchaP Dec 21 '16 at 15:24

I think that this is why the method to solve the exact ODE works. Your equation is exact. To solve, you want to find $F(x,y)$ such that $$\frac{\partial}{\partial x}F(x,y)=M(x,y),\; \& \frac{\partial}{\partial y}F(x,y)=N(x,y).$$ Then integrating the first equation w.r.t. $x$ we get $$F(x,y)=\int M(x,y)dx + f(y),$$ here $f(y)$ plays the role of the constant of integration. We need to verify that in effect this is true. I mean, we need to verify that we can choose the constant of integration as a function of $y$. But since your equation is exact, this is the case. This is as follows: we want that \begin{align*}\frac{\partial}{\partial y}F(x,y)&=N(x,y)\\ \frac{\partial}{\partial y}\int M(x,y)dx + \frac{\partial}{\partial y}f(y)&=N(x,y)\\ \frac{\partial}{\partial y}f(y)&= N(x,y)-\frac{\partial}{\partial y}\int M(x,y)dx.\end{align*} Now, \begin{align*} \frac{\partial}{\partial x}\left(N(x,y)-\frac{\partial}{\partial y}\int M(x,y)dx\right)&= \frac{\partial}{\partial x}N(x,y) - \frac{\partial}{\partial x}\frac{\partial}{\partial y}\int M(x,y)dx\\ &= \frac{\partial}{\partial x}N(x,y) - \frac{\partial}{\partial y}\frac{\partial}{\partial x}\int M(x,y)dx\\ &=\frac{\partial}{\partial x}N(x,y) - \frac{\partial}{\partial y}M(x,y)\\ &= 0, \end{align*} since your EDO is exact. In other words $\frac{\partial}{\partial y}f(y)$ is constant w.r.t $x$ and (by integration w.r.t. $y$) $f$ depends only of $y$. Therefore the solution is given as you say. I think that the explanation that you quote is equivalent to the explanation of why $f$ depends only of $y$ or, rather, who is $f$.

• Thanks but this is the derivation of the solution which I already understand. My problem was with the next statement in the book which stated, ""Since all the terms of the solution that contain x must appear in ∫Mdx, its derivative w.r.t. y must have all the terms of N that contain x. Hence the general rule to be followed is: Integrate ∫Mdx as if y were constant. Also integrate the terms of N that do not contain x w.r.t. y. Equate the sum of these integrals to a constant." – Shahab Jul 17 '11 at 11:02
• Sorry @Sahab. Yes, I told you where it comes from the solution. But I did it because I thought that it explain your doubts, as I say in the last part of the answer. – leo Jul 17 '11 at 17:37

I believe that with exact differential equation you mean that there is some function $U$ such that $$dU(x,y) = M(x,y)dx+N(x,y)dy,$$ or e.g. the case when $M_y = N_x$ in the simply connected domain of $\mathbb R^2$, which is sufficient for $U$ to exist. Then all solutions clearly are described as $U(x,y) = c$ and the only question is how to find $U$.

Using the theory of curve integrals, $$U(x,y) = U(x_0,y_0)+\int\limits_\gamma M(x,y)dx+N(x,y)dy$$ where $\gamma$ is any (piecewise-smooth) path from $(x_0,y_0)$ to $(x,y)$. The most simple one is to take $\gamma = AB\cup BC$ where $A = (x_0,y_0), B = (x,y_0)$ and $C = (x,y)$. Then your integral is decomposed into two integrals since $dx|_{BC} = 0$ and $dy|_{AB} = 0$. Then the formula you wrote just follows from the theory of curve integrals.

• Thanks, but I dont need any justification for the formula. I have understood its derivation in the book and can use it to solve the ODE. What I wish to understand is the justifications of the sentences used in the second paragraph. – Shahab Jul 14 '11 at 17:15