I have run into trouble with a foundational proof regarding the exactness of closed forms which are $C^1$-differentiable. I have seen other proofs utilizing integration factors and I see why the closed forms are exact, however, I am confused as to the rationale in a certain step. I previously learned a way to prove that ${\partial F}/{\partial y} = {\partial G}/{\partial x}$
If $F(x,y)dx+G(x,y)dy$ is a closed form on $\mathbb{R}^2$, set \begin{equation}f(x,y) = \int_C Fdx +Gdy\end{equation} where the curve is defined piecewise by $C=C_1 + C_2$ with $C_1=[0,x]$ and $C_2=[x,y]$ (A square curve starting at $(0,0)$ going to $(x,0)$ and ending at $(x,y)$). Parametrizing the line segments separately (for $C_1$ $x=t,y=0$, $C_2$ $x=x, y=t$) we obtain the following \begin{equation}f(x,y)=\int_{0}^{x}F(t,0)dt + \int_{0}^{y}G(x,t)dt \end{equation}
I have to prove that $df=Fdx+Gdy$ which is done in the following way, differentiating under the integral:
First: \begin{equation}\frac{\partial f}{\partial y}=\frac{\partial }{\partial y}\int_{0}^{x}F(t,0)dt + \frac{\partial }{\partial y}\int_{0}^{y}G(x,t)dt = \int_{0}^{y}\frac{\partial G(x,t)}{\partial y}dt = G(x,y)\end{equation}
The the partial derivative w.r.t. x is more difficult for me, and the proof given by the author confuses me.
I have: \begin{equation} \frac{\partial f}{\partial x}=\frac{\partial }{\partial x}\int_{0}^{x}F(t,0)dt + \frac{\partial }{\partial x}\int_{0}^{y}G(x,t)dt \end{equation}
\begin{equation} =\int_{0}^{x} \frac{\partial F(t,0)}{\partial x}dt + \color{red}{\int_{0}^{y} \frac{\partial G(x,t)}{\partial x}dt} \end{equation}
\begin{equation} = F(x,0) + \color{red}{\int_{0}^{y} \frac{\partial F(x,t)}{\partial t}dt} \end{equation}
\begin{equation} = F(x,0) + F(x,y) - F(x,0) \end{equation}
I have highlighted the confusing portion in red. I am unsure as to why the switch has been made and would be delighted if someone can explain this to me. I'm sure it is glaringly obvious, but I would like to know the reasoning behind:
\begin{equation} \int_{0}^{y} \frac{\partial G(x,t)}{\color{red}{\partial x}}dt = \int_{0}^{y} \frac{\partial F(x,t)}{\color{red}{\partial t}}dt \end{equation}
I get that it is a necessary step because the math works out, I just need a more in-depth explanation of it. Thanks!