Solution (source code)

= Solution

Evaluate the <line integral> along the three coordinate segments, treating coordinates not changing along a segment as constants. On the first segment, $y=z=0$, so $F_x=0$ and the contribution is zero. On the second segment,
$$
\int_0^yF_y(x,\eta,0)\,d\eta=\int_0^y(x^2-2\eta)\,d\eta=x^2y-y^2.
$$
On the final segment,
$$
\int_0^zF_z(x,y,\zeta)\,d\zeta
=\int_0^z(-3x\zeta^2-1)\,d\zeta=-xz^3-z.
$$
The <fundamental theorem for line integrals> therefore gives
$$
\boxed{\Phi(x,y,z)=x^2y-y^2-xz^3-z+C}.
$$
Taking its <gradient> verifies each component of the field. The constant is $C=\Phi(0,0,0)$; the field specifies only potential differences because the <gradient> of every constant is zero.