Partial derivative of integral of multi variable function This is the problem I am working on.

Here, I find it hard to calculate $\nabla{\times}\mathbf{H}$. For example, to calculate $(\frac{\partial H_z}{\partial y}-\frac{\partial H_y}{\partial z})\mathbf{i}$, I am not sure how to continue after $$\frac{\partial H_y}{\partial z}=\frac{\partial} {\partial z}\left({\int_{x_0}^x \! G_z(x’, y, z) \, \mathrm{d}x’}\right)$$. 
I think the core problem here is that $x$ is taken as variable in the integral while $z$ was taken as variable in the partial derivative.
What should I do to solve it? Thanks.
 A: $\textbf{Hints:}$ Check out the Leibniz Integral Rule to handle cases where you're differentiating with respect to a variable different than the one being integrated and apply the Fundamental Theorem of Calculus to cases where you're differentiating with respect to the same variable that is being integrated.
A: Since $H_x = 0, \nabla \times \pmb{\mathrm{H}} = \hat{i}\left(\frac{\partial H_z}{\partial y}-\frac{\partial H_y}{\partial z}\right)-\hat{j}\left(\frac{\partial H_z}{\partial x}\right)+\hat{k}\left(\frac{\partial H_y}{\partial x}\right).$
$$\frac{\partial H_z}{\partial y} = \frac{\partial}{\partial y}\left[-\int_{x_0}^{x}G_y(x',y,z)dx' + \int_{y_0}^{y}G_x(x_0,y',z)dy'\right]$$
$$ = -\int_{x_0}^{x}\frac{\partial}{\partial y}G_y(x',y,z)dx'+G_x(x_0,y,z)$$ where we have used the Leibniz rule for the second integral. 
$$\frac{\partial H_y}{\partial z} = \frac{\partial}{\partial z}\int_{x_0}^{x}G_z(x',y,z)dx'=\int_{x_0}^{x}\frac{\partial}{\partial z}G_z(x',y,z)dx'.$$ and
$$\frac{\partial H_z}{\partial x} = \frac{\partial}{\partial x}\left[-\int_{x_0}^{x}G_y(x',y,z)dx' + \int_{y_0}^{y}G_x(x_0,y',z)dy'\right] = -G_y(x,y,z)$$ where we have again used Leibniz rule for the first integral. Finally
$$\frac{\partial H_y}{\partial x} = \frac{\partial}{\partial x}\int_{x_0}^{x}G_z(x',y,z)dx' = G_z(x,y,z)$$ using the Leibniz rule.
Therefore $\nabla \times \pmb{\mathrm{H}}$ equals 
$$ \hat{j} G_y + \hat{k} G_z + \hat{i}\left[G_x(x_0,y,z) - \int_{x_0}^{x}\left(\frac{\partial}{\partial y}G_y(x',y,z)+\frac{\partial}{\partial z}G_z(x',y,z)\right)dx'\right].$$
Now since $\nabla \cdot \pmb{\mathrm{G}} = 0$, we have $\frac{\partial G_x}{\partial x} = -\frac{\partial G_y}{\partial y} - \frac{\partial G_z}{\partial z}.$ Therefore, 
$$\nabla \times \pmb{\mathrm{H}} =  \hat{j}G_y(x,y,z) + \hat{k}G_z(x,y,z) + \hat{i}\left[G_x(x_0,y,z) + \int_{x_0}^{x}\frac{\partial}{\partial x'}G_x(x',y,z)dx'\right].$$
Using the Fundamental theorem of Calculus on the integral, we get
$$ \nabla \times \pmb{\mathrm{H}} = \hat{j}G_y(x,y,z) + \hat{k}G_z(x,y,z) + \hat{i}(G_x(x_0,y,z)+G_x(x,y,z)-G_x(x_0,y,z)) = \hat{j}G_y + \hat{k}G_z + \hat{i}G_x =  \pmb{\mathrm{G}}.$$ 
