Show that if $\nabla \cdot F = 0$, then $F = \nabla \times G$ Let $F: \mathbb{R}^3 \to \mathbb{R}^3$ such that $F$ is differenciable and  $\nabla \cdot F = 0, \forall \bar{x}\in \mathbb{R}^3$.
Show that $F = \nabla \times G$, for $G: \mathbb{R}^3 \to \mathbb{R}^3$ defined as $G=(G_1, G_2, G_3)$, where $G_1(x, y, z) = \int_0^z F_2(x, y, t) dt - \int_0^y F_3(x, t, 0) dt$, $G_2(x, y, z) = -\int_0^z F_1(x, y, t) dt$ and $G_3(x,y,z) = 0$.
I've tried a proof but I'm not sure if I'm doing things well:
(Second try):
\begin{alignat*}{2}
    \nabla \times G & = \Big(\frac{\partial}{\partial y} G_3 - \frac{\partial}{\partial z} G_2, \frac{\partial}{\partial z} G_1 - \frac{\partial}{\partial x} G_3, \frac{\partial}{\partial x} G_2 - \frac{\partial}{\partial y} G_1 \Big)\\
& = \Big(\frac{\partial}{\partial z} \Big( \int_0^z F_1(x, y, t) dt \Big), \frac{\partial}{\partial z} \Big( \int_0^z F_2(x, y, t) dt - \int_0^y F_2(x, t, 0) dt \Big), \frac{\partial}{\partial x} \Big( -\int_0^z F_1(x, y, t) dt \Big) - \frac{\partial}{\partial y} \Big( \int_0^z F_2(x, y, t) dt - \int_0^y F_3(x, t, 0) dt \Big) \Big)\\
& = \Big(\frac{\partial}{\partial z} \Big( F_1(x, y, z^2/2) - F_1(x, y, 0) \Big), \frac{\partial}{\partial z} \Big( F_2(x, y, z^2/2) - F_2(x, y, 0) - F_2(x, y^2/2, 0) + F_2(x, 0, 0) \Big), \frac{\partial}{\partial x} \Big( -F_1(x, y, z^2/2)+F_1(x, y, 0) \Big) - \frac{\partial}{\partial y} \Big( F_2(x, y, z^2/2)-F_2(x, y, 0) - F_3(x, y^2/2, 0) + F_3(x, 0, 0) \Big) \Big)\\
& = \Big( F_1(x, y, z), F_2(x, y, z), -F_1(1, y, z^2/2)+F_1(1, y, 0) - F_2(x, 1, z^2/2)+F_2(x, 1, 0) + F_3(x, y, 0) \Big)\\
\end{alignat*}
Related articles:
Existence of $G$ for $\nabla \times G=F$?
How do I solve $F = \nabla\times G$ for $G$?
 A: So we've defined $G$ to be
$$ \begin{cases}
 G_1 & = \displaystyle \int_0^z F_2(x,y,t)\,\mathrm{d}t - \int_0^y F_3(x,t,0)\,\mathrm{d}t \\[5pt]
 G_2 & = \displaystyle -\int_0^z F_1(x,y,t)\,\mathrm{d}t \\[5pt]
 G_3 & = 0
\end{cases} $$
And $\nabla\times G=\displaystyle\Big(\frac{\partial G_3}{\partial y}-\frac{\partial G_2}{\partial z}\,,\,\frac{\partial G_1}{\partial z}-\frac{\partial G_3}{\partial x}\,,\,\frac{\partial G_2}{\partial x}-\frac{\partial G_1}{\partial y}\Big)$. The first component is
$$ \frac{\partial G_3}{\partial y}-\frac{\partial G_2}{\partial z} \,=\, 0+\frac{\partial}{\partial z}\int_0^z F_1(x,y,t)\,\mathrm{d}t \,=\, F_1(x,y,z),  $$
by the fundamental theorem of calculus. The second component is
$$ \frac{\partial G_1}{\partial z}-\frac{\partial G_3}{\partial x} \,=\, \frac{\partial}{\partial z}\left(\int_0^z F_2(x,y,t)\,\mathrm{d}t - \int_0^y F_3(x,t,0)\,\mathrm{d}t\right)-\frac{\partial }{\partial x}(0) $$
$$ =\, \big(F_2(x,y,z)-0\big)-0 ~=~ F_2(x,y,z), $$
again using the fundamental theorem. The third component is more tricky:
$$ \frac{\partial G_2}{\partial x}-\frac{\partial G_1}{\partial y} ~=$$
$$\frac{\partial}{\partial x}\left(-\int_0^z F_1(x,y,t)\,\mathrm{d}t\right) -
\frac{\partial}{\partial y}\left(\int_0^z F_2(x,y,t)\,\mathrm{d}t - \int_0^y F_3(x,t,0)\,\mathrm{d}t\right) $$
$$ \int_0^z -\left(\frac{\partial F_1}{\partial x}(x,y,t)+\frac{\partial F_2}{\partial y}(x,y,t)\right)\,\mathrm{d}t +F_3(x,y,0), $$
which follows from combining the first two integrals and using the fundamental theorem of calculus on the third. We are given that $\nabla\cdot F=0$, which means we can solve for $\partial F_3/\partial z$ from
$$ \frac{\partial F_1}{\partial x}+\frac{\partial F_2}{\partial y}+\frac{\partial F_3}{\partial z}=0 $$
and substitute it in for our first integrand. So the third component of $\nabla\times G$ becomes
$$ \int_0^z \frac{\partial F_3}{\partial z}(x,y,t)\,\mathrm{d}t+F_3(x,y,0) = \big(F_3(x,y,z)-F_3(x,y,0)\big)+F_3(x,y,0) $$
$$ = F_3(x,y,z) $$
and we are done.
