\phi(x, y, z) = \int Rdz + g(x, y) + h(y) \implies\\
\phi(x, y, z) = x^2y + lnz(y + 2)