Proof for exact differential equations shortcut?

Solution 1:

I do not think this is a trick because it is a way to solve exact differential equations. Suppose we are given an exact differential equation $$M(x, y)dx + N(x, y)dy = 0$$ whose solution is the family $f(x, y) = \text{const.}$ You probably know that if $f(x, y)$ has continuous second partials, then $$\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x}.$$ Now, if $$\frac{\partial f}{\partial x} = M$$ and $$\frac{\partial f}{\partial y} = N,$$ then $$\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}.$$ This allows us to test exactness. One way to find $f(x, y)$ is to integrate $M$ w.r.t. $x$ and $N$ w.r.t. $y$. Then we need to add an arbitrary function of $y$ to the first integral and an arbitrary function of $x$ to the second. Then we can "merge" the equations as you mentioned. For example, suppose $$\int M(x, y)dx = x - x^2 y + Y(y)$$ and $$\int N(x, y)dy = y^4 - x^2 y + X(x).$$ We see that $\partial f/\partial x = M$ and $\partial f/\partial y = N$, and $$f(x, y) = x - x^2 y + y^4.$$ As a result, $$x - x^2 y + y^4 = \text{const.}$$ Hope this helps.

Solution 2:

We can see what's going on if we write things out in full. Because the differential form is exact, we know

$$(x^2 + y^2)dx + (2xy + \cos{y})dy = df(x,y)$$

for some function $f(x,y)$, and our plan is to obtain $f(x,y)$ through anti-differentiation from our knowledge of its partial derivatives. The two integrals you calculated:

$$\int (x^2 + y^2) \, dx = \frac{1}{3} x^3 + x y^2$$ $$\int 2xy + \cos y \, dx = x y^2 + \sin y $$

gave specific anti-derivatives, but not the complete solution spaces to this anti-differentiation problem. If we obtain the complete solution by remembering to include the constant of integration (which is an arbitrary function of the other variable):

$$\int (x^2 + y^2) \, dx = \frac{1}{3} x^3 + x y^2 + C_1(y)$$ $$\int 2xy + \cos y \, dx = x y^2 + \sin y + C_2(x)$$

things become more clear. We know that $f(x,y)$ must be in both solution spaces, and that is what the process of "merging" solutions is doing: it is finding the class of functions that match both forms.

The complete candidate solution space for $f$ is

$$ f(x,y) = \frac{1}{3} x^3 + x y^2 + \sin y + C_3$$

In fact, the solution method doesn't introduce spurious solutions, so every candidate solution really is a solution.

Solution 3:

There is something wrong because if we use implicit differentiation we optain the differential equation $$\frac{1}{3} + xy^2 + \sin{y} = c$$ this no happen.

$$\frac{d}{dx}\frac{1}{3} + xy^2 + \sin{y} = \frac{d}{dx}c$$
$$y^2 + x2y\frac{dy}{dx}+ \frac{dy}{dx}\cos{y} = 0$$
$$y^2 + (2xy+ \cos{y)\frac{dy}{dx}} = 0$$

Which is different of your equation, then you write with error the answer or the method don't work.

Solution 4:

There is an alternative method applied here using the idea of the integrating factor. If you regroup the terms like this

$$\left(x^2dx+\cos y dy\right)+\left(y^2dx+2xydy\right)=0$$ Then the first bracket has integrating factor $1$ leading to solution $\frac{1}{3}x^3+\sin y=C$ and for reasons explained in the referenced post the most general integrating factor for this part is $\phi\left(\frac{1}{3}x^3+\sin y\right)$ where $\phi$ is an arbitrary function. The second part has integrating factor $\frac{1}{xy^2}$ which incidentally leads leads to solution $xy^2=C$. Therefore, the most general form will be $\frac{1}{xy^2}\psi\left(xy^2\right)$. Hence, letting $\phi(t)=t$, $\psi(t)=1$ we make both factors equal and since they are equal to $1$ the equation is exact and the general solution is consequently the sum of the two partial results.

Solution 5:

Note that, if $f(x,y)=c$, then the total differntial is

$$ df = \frac{\partial{f}}{\partial x}dx + \frac{\partial{f}}{\partial y}dy=0 \implies M(x,y)dx + N(x,y)dy = 0 \rightarrow (1). $$

Now, if you are given the differential equation $(1)$, then you are looking for a solution of the form $f(x,y)=c$. Getting $f(x,y)=c$ is kind of working backward. Once you prove the differential equation is exact, you advance to find the solution by considering

$$ M(x,y)=\frac{\partial{f}}{\partial x} = (x^2 + y^2)\,\,\mathrm{or}\, N(x,y) =\frac{\partial{f}}{\partial y}=(2xy + \cos{y}) $$

$$ \implies f = \frac{1}{3}x^3+xy^2+g(y)\,\,\,\mathrm{or}\,\,\, f= xy^2+\sin(y)+h(x)\rightarrow (2)\,. $$

If you equate the two equations in $(2)$, you can figure out what the unknown functions , $g(y)$ and $h(x)$, are

$$\frac{1}{3}x^3+g(y)=\sin(y)+h(x)\,. $$

To find $g(y)$ and $h(x)$ formally, differentiate $(2)$ w.r.t $y$ and $x$ respectively and use $N$ and $M$,

$$ f_y=N=2xy+\cos(y)= 2xy+g'(y)\,\,\,\mathrm{or}\,\,\, f_x=M=x^2+y^2= y^2+h'(x)\,, $$

$$ \implies g(y)=\sin(y) \quad \mathrm{and} \quad h(x)=\frac{x^3}{3} \,.$$

Substituting back in $(2)$ gives the desired solution

$$ f = \frac{1}{3}x^3+xy^2+\sin(y)=c\,\,\,\mathrm{or}\,\,\, f= xy^2+\sin(y)+\frac{x^3}{3}=c\rightarrow (2)\,.$$

Note that, in practice, once the exactness is being proved, you consider only one of the following equations

$$ \frac{\partial{f}}{\partial x}=M(x,y) \quad or \quad \frac{\partial{f}}{\partial y}=N(x,y) \, $$

to find the solution since both of them lead to the same solution.