Show that there is no function $\phi\in C^2(\mathbb R^3,\mathbb R)$ such that $\nabla \phi=(-y,x,0)^t$ I want to show that there exists no function $\phi\in C^2(\mathbb R^3,\mathbb R)$ such that $\nabla \phi=(-y,x,0)^t$.
I did it this way: I know $\nabla \phi=(\phi_x,\phi_y,\phi_z)^t$. Integrating each component: $\int -y dx=-yx+c_1$ and $\int x dy=xy+c_2$ and $\int 0dz=c_3$ with constants $c_i$. So we get $-yx+c_1=xy+c_2 \Leftrightarrow 2xy=c_1-c_2$ which is a contradiction.
Now my tutor said this is wrong because I didn't used the fact $\phi\in C^2(\mathbb R^3,\mathbb R)$ but he couldn't explain me why my calculation is wrong.
So is he right or can you do it like this? What's the problem about integrating each component? 
I will be happy about any hints or comments.

Edit: I am not interested in a solution. It's easy to see the rotations of the left and right side aren't equal and it follows the statement above.

If $\mathbf A$ is equal to the given vector field, then $\mathbf A$ has non-zero rotational. You can just compute it.
Suppose $\mathbf A=\nabla \phi$; then, for this particular smooth vector field $\phi$, $\nabla \times \nabla \phi\neq 0$  –which is a way to rephrase $\mathrm d^2\neq 0$ in de Rham cohomology. Therefore $\mathbb R^3$ is not contractible.  Contradiction.

