Can there exist a $C^2$ function $f: \mathbb R^3 \to \mathbb R$ with $f_x = 3x - 2y + 4z, f_y = -2x+3y +z $ and $f_z = 3x + y - 5z$. Explain your answer.
$\int f_udu = \frac{3}{2}x^2 - 2xy + 4zu + f(y, z) = f(x, y, z)$
$\int f_y dy = -2xy + zy + \frac{3}{2}y^2 + f(x, z) = f(x, y, z)$
$\int f_z dz = 3xz + yz - \frac{5z^2}{2} + f(x, y) = f(x, y, z)$
since $\frac{d}{dz} (\int f_u du) \neq f_z$ hence does not exist any for which the partial derivatives are given
is this correct?
There's a few different approaches. Yours is fine.
Hans Engler has a really good one. Here's a third, somewhere in between.
You can make a vector $\vec{v}=<f_x,f_y,f_z>$
Then if $\nabla \times \vec{v}=0$ then such a function exists.
$\nabla \times \vec{v}\implies v_i=\sum_{j=1}^3\sum_{k=1}^3 \epsilon_{ijk}\frac{\partial}{\partial x^j}\frac{\partial f}{\partial x_k}$
Where $\epsilon_{ijk}$ is the Levi-Civita symbol. $x_1=x, x_2=y, x_3=z.$
You recover Mr. Engler's with perhaps a bit more of work.
Through abuse of notation you can find $\nabla \times \vec{v}$, the curl of $\vec{v}$ with a matrix.