For $P,Q,R:\mathbb{R}^3\rightarrow \mathbb{R}$ be three smooth variable functions.
Consider the partial differential equation system $$\begin{cases}R_y-Q_z=y\\P_z-R_x=x\\Q_x-P_y=f(x,y,z)\end{cases}$$ where $$R_y:=\frac{\partial R}{\partial y}$$
For what smooth functions $f(x,y,z)$, the above equation system has solutions?
Moreover, the solution is unique or not (up to a field of zero curl)?
My attempt:
From the first two equation, we have $$Q=\int_0^z R_y ~dt -yz+r(x,y)$$ and $$P=\int_0^z R_x ~dt +xz+s(x,y)$$ Hence we have $$Q_x-P_y=r_x-s_y+\frac{\partial}{\partial x}\int_0^z R_y ~dt -\frac{\partial}{\partial y}\int_0^z R_x ~dt=r_x-s_y.$$
So what all I obtain is that $f$ should be in the form $r_x-s_y$ for some $r$ and $s$.