worked conservative question. Can someone double check? Can you please check this question for me because my answer is different to my friends and they say it's wrong...
Given the equation: $G = (x^3 -3xy^2)\vec{i} +(y^3-3x^2y)\vec{j} +2\vec{k}$ is conservative, find the potential function for the fields that are conservative.
My answer
$f: \nabla f=F \\
fx=x^3-3xy^2 \\
fy=y^3-3x^2y \\
fz=z$
$\int(x^3-3xy^2)dx
=x^4/4-3x^2y^2/2 +h(y, z) \\
fy \text{ or } f'y= -3x^2 y +hy(y, z) \\
fy=y^3-3x^2y= -3x^2y+hy(y, z) \\
hy(y,z)=y^3$
$\int y^3 dy = y^4/4 +gz$
$fz=0$ because no $z$ term ^
$\int 0dz =c$
$F= x^4/4-3x^2y^2/2 +y^4/4+c$ <-potential function
my other friend solution was $F=x^4/4 -3x^2y^2/2 +z^2/2+y^4/4$.

If we accept that the vector field $F = (x^3 -3xy^2)\vec{i} +(y^3-3x^2y)\vec{j} +2\vec{k}$ is conservative, so there is a function, say $f$ such that, $\nabla f=F$. So  $$f_x=x^3-3xy^2,~~f_y=y^3-3x^2y,~~f_z=z$$ Assume that $f_x=x^3-3xy^2$, so $$f(x,y,z)=\frac{x^4}4-\frac{3}2x^2y^2+h(y,z)$$ Then $f_y=-3x^2y+h_y(y,z)$ but $f_y=y^3-3x^2y$, so we get $$-3x^2y+h_y(y,z)=y^3-3x^2y\Longrightarrow h_y(y,z)=y^3\to h(y,z)=\frac{y^4}4+g(z)$$ Therefore, we have up to now: $$f(x,y,z)=\frac{x^4}4-\frac{3}2x^2y^2+\frac{y^4}4+g(z)$$ Now take a differentiation with respect to $z$, we have: $$f_z=g'(z)$$ but $f_z=z$, so $g'(z)=z$ and then $g(z)=\frac{z^2}2$. Hence $$f(x,y,z)=\frac{x^4}4-\frac{3}2x^2y^2+\frac{y^4}4+\frac{z^2}2$$
