Question about determining whether vector field is conservative and about determining a potential function for said vector field. So, I've received this question to solve. Can anyone help me? I do not understand how to show that the vector field is conservative in this case. A detailed solution would help to understand what I've been doing wrong so far. (I seem to get answers that indicate that the vector field in question is not conservative, but it should be.)
The question is listed below:
Show that the vector field
F$(x, y, z) = (2x + y)$i$ + (z\cos(yz) + x)$j$ + y\cos(yz)$k
is conservative and determine a potential function.

If we manage to find a potential function $U$ for $\mathbf{F}$, we are done so let's try to do that. We need:
$$ \frac{\partial U}{\partial x} = 2x + y \implies U(x,y,z) = \int (2x + y) \, dx + G(y,z) = x^2 + yx + G(y,z) $$
for some function $G = G(y,z)$ which depends only on $y,z$. Next,
$$ \frac{\partial U}{\partial y} = z \cos(yz) + x \implies x + \frac{\partial G}{\partial y} = x + z \cos(yz) \implies \\
G(y,z) = \int z \cos(y z) \, dy + H(z) = \sin(yz) + H(z)$$
for some function $H = H(z)$ that depends only on $z$.
Finally,
$$ \frac{\partial U}{\partial z} = y \cos(yz) \implies y \cos(yz) + \frac{\partial H}{\partial z} = y \cos(yz) \implies H \equiv C $$
so a potential for $\mathbf{F}$ is given by
$$ U(x,y,z) = x^2 + yx + \sin(yz) + C $$
where $C \in \mathbb{R}$ is arbitrary.
