I am trying to solve Apostol Calculus II problem $10.3.2$, that says the following:
Given a 2 dimensional vector field $$f(x,y) = P(x,y)\mathbf{i} + Q(x,y)\mathbf{j}$$ where the partial derivatives $\partial{P}/\partial{y}$ and $\partial{Q}/\partial{x}$ are continuous on an open set $S$. If $f$ is the gradient of some potential $\phi$, prove that $$\frac{\partial{P}}{\partial{y}} =\frac{\partial{Q}}{\partial{x}} $$ at each point of $S$.
I have sketched a possible solution (as the problem follows the section on the line integral on a closed path of a gradient, I have tried employing that concept in the demostration). But I am not sure whether my solution is rigorous enough (if anyways correct), so here we are.
Let's take the point $(x_0,y_0) \in S$, and consider $P$ and $Q$ partial derivatives at $x_0,y_0$.
I take the line integral of the gradient $(P,Q)$ over the $h \times h$ square
$$[(x_0,y_0),(x_0+h,y_0),(x_0+h,y_0+h),(x_0,y_0+h)]$$
with $h$ small enough so that the full square is included in $S$ (I can always do that as $S$ is open).
Using t as parameter I get the following
$$\int_0^h{P(x_0+t,y_0)}dt+\int_0^h{Q(x_0+h,y_0+t)}dt+\int_h^0{P(x_0+t,y_0+h)}dt+\int_h^0{Q(x_0,y_0+t)}dt = 0$$
getting
$$\int_0^h{[P(x_0+t,y_0+h) - P(x_0+t,y_0)]}dt =\int_0^h{[Q(x_0+h,y_0+t)-Q(x_0,y_0+t)]}dt$$
where the two members contain the integral of something that really reminds me of the two quantities I have to proof equal.
That said, I have tried to make the following consideration:
By mean value theorem, for any $h>0$ I can find $0<t_p<h$ and $0<t_q<h$ such that
$$[P(x_0+t_p,y_0+h) - P(x_0+t_p,y_0)]h = [Q(x_0+h,y_0+t_q)-Q(x_0,y_0+t_q)]h$$ hence $$\frac{P(x_0+t_p,y_0+h) -P(x_0+t_p,y_0)}{h} = \frac{Q(x_0+h,y_0+t_q)-Q(x_0,y_0+t_q)}{h}$$ getting rid of integrals.
Then, for $h\rightarrow0$ and definition of partial derivative I have
$$\frac{\partial{P}}{\partial{y}}|_{(x_0+t_p,y_0)} = \frac{\partial{Q}}{\partial{x}}|_{(x_0,y_0+t_q)}$$
but since $t_p\rightarrow0$ and $t_q\rightarrow0$ as well (as $0<t_p<h$ and $0<t_q<h$) and because $\partial{P}/\partial{y}$ and $\partial{Q}/\partial{x}$ are continuous in $(x_0,y_0)$ I finally get
$$\frac{\partial{P}}{\partial{y}}|{(x_0,y_0)} = \frac{\partial{Q}}{\partial{x}}|{(x_0,y_0)}$$.
Would this work?
Thanks!