Problem in proving a theorem regarding exactness of a differential equation. Theorem :
Let $\phi (x,y)$ and $\psi (x,y)$ be defined and continuous on an open region $B$ of the $xy$-plane and let $\frac {\partial \phi} {\partial y}$, $\frac {\partial \psi} {\partial x}$ exist and be continuous on $B$.
The necessary and sufficient condition that
$$\phi (x,y)\ dx + \psi (x,y)\ dy$$
should be an exact differential on any closed rectangle $C$ in $B$ is that $\phi_{y} = \psi_{x}$ in $C$. 
Proof : Necessary Part :
Let $C = \{(x,y)\ |\ a \leq x \leq b , c \leq y \leq d \}$ be a closed rectangle in $B$.
Suppose there exists a function $f(x,y)$ with continuous second order partial derivatives such that $df = \phi (x,y)\ dx + \psi (x,y)\ dy$.
Since $f$ is differentiable in $C$ so, $df = f_{x}\ dx + f_{y}\ dy$ in $C$.As $dx$, $dy$ are independent, we have $f_{x} = \phi$ and  $f_{y} = \psi$.
Again since $f$ possesses continuous second order partial derivatives both of $f_{x}$ and $f_{y}$ are differentiable in $C$ by the sufficient condition for differentiability.So, by Young's theorem it follows that $f_{xy} = f_{yx}$ in $C$ i.e. $\phi_{y} = \psi_{x}$ in $C$.Which proves the necessity.
But I find difficulty in proving sufficiency of the theorem and I dont find any rigorous proof of this yet.So any help in proving this theorem will be appreciated.
EDIT :
I have found a proof of the sufficient part just now though I find difficulty to understand it properly.Here's this :
Sufficient Part :
Consider the expression
$g (x,y) = \int_{a}^{x} \phi (t,y)\ dt$ ; $a \leq x \leq b$, $c \leq y \leq d$.
Now $\frac {\partial} {\partial x} (\psi - \frac {\partial g} {\partial y}) = \frac {\partial \psi} {\partial x} - \frac {\partial^2 g} {{\partial x}{\partial  y}} = \frac {\partial \psi} {\partial x} - \frac {\partial^2 g} {{\partial y}{\partial x}} = \frac {\partial \psi} {\partial x} - \frac {\partial} {\partial y} (\frac {\partial g} {\partial x}) = \psi_{x} - \phi_{y} = 0$.
$\implies$ $\psi (x,y) - \frac {\partial g} {\partial y}$ is a function of $y$ alone, $h(y)$ say.
We define $f(x,y)$ as follows :
$f (x,y) = g (x,y) + \int_{c}^{y} h (t)\ dt$, $c \leq y \leq d$.
Then $df = f_{x}\ dx + f_{y}\ dy$ and $f_{x} = g_{x} + 0 = \phi (x,y)$ and $f_{y} = g_{y} + h(y) = g(y) + \psi -g_{y} = \psi$.
So, $df = \phi (x,y)\ dx + \psi (x,y)\ dy$.
This completes the proof.
But I dont understand why $g_{xy} = g_{yx}$?Also how $f$ become differentiable and how $f_{x} = g_{x}$ and $f_{y} = g_{y} + h(y)$?Please help me in understanding these things.
Thank you in advance.
 A: *

*Consider $f (x,y) = g (x,y) + \int_{c}^{y} h (t)\ dt$ Now

$$\frac{\partial f}{\partial x} = \frac{\partial g}{\partial x} + \frac{\partial }{\partial x}\int_{c}^{y} h (t)\ dt$$
The last term is zero because you are taking the partial over $x$ of a function of $y$ alone, then $f_x=g_x$

*

*To understand why $f$ is differentiable, trace its definition back:

It's the sum of $g$ that is the integral of a function, $\psi$, that is continuous by hypothesis so it's differentiable, and another integral, this time of $h$, too continuous because it's the difference of two continuous functions, $\psi$ and the partial wrt $y$ of $g$. The trick is to be aware the proof derives and integrates again and again continous functions: the integral of a continuous function is differentiable.

*

*$f_{y} = g_{y} + h(y)$
Consider $f (x,y) = g (x,y) + \int_{c}^{y} h (t)\ dt$ Now,
$$\frac{\partial f}{\partial y} = \frac{\partial g}{\partial y} + \frac{\partial }{\partial y}\int_{c}^{y} h (t)\ dt$$
By the fundamental theorem of caculus $\dfrac{\partial }{\partial y}\int_{c}^{y} h (t)\ dt=h(y)$ and $f_{y} = g_{y} + h(y)$

*

*I don't see where $g_{xy} = g_{yx}$ appears. You have $f_{xy} = f_{yx}$, that is the point the theorem proves! Anyway, consider $f_{y} = g_{y} + h(y)$, so $f_{yx} = g_{yx}$, Consider too $f_{x} = g_{x}$, so, $f_{xy} = g_{xy}$
