Using the Frobenius theorem, how can one show that does not exist a non-constant smooth function defined in a open and connected subset of $\mathbb R^4$ satisfying: $$ \frac{\partial f}{\partial x} = 0, \quad \frac{\partial f}{\partial y} + x \frac{\partial f}{\partial z} + \frac{x^2}{2}\frac{\partial f}{\partial w} = 0, \quad \frac{\partial f}{\partial z} + x \frac{\partial f}{\partial w} = 0 \quad (I). $$
Some effort:
Let $f: \Omega \to \mathbb R$ be a smooth function defined in a connected and open subset of $\mathbb R^4$ satisfying $(I)$. Take the vector fields $$ X = \frac{\partial}{\partial x}, \quad Y = \frac{\partial }{\partial y} + x \frac{\partial }{\partial z} + \frac{x^2}{2}\frac{\partial }{\partial w}, \quad Z = \frac{\partial }{\partial z} + x \frac{\partial }{\partial w}. $$
Computing their Lie brackets follows that
$$ [X,Y] = \frac{\partial}{\partial z} + x \frac{\partial}{\partial w} = Z \quad \text{ and } \quad [Y,Z] = 0, $$ however $[Z,X] = - \frac{\partial}{\partial w}$ which is not spanned by $X,Y, Z$, with this I can conclude that the distribution $\mathcal D$ spanned by $X,Y,Z$ is not involutive and by Frobenius theorem it can't be integrable. I'm stucked in what to do whith that , so I can conclude that $f$ must be constant.
Help?
On a basic level, $Xf=0$ and $Zf=0$ implies $[X,Z]f=0$, i.e. $\frac{\partial f}{\partial w}=0$. Then from the original equations $(I)$ we deduce that $\frac{\partial f}{\partial x}=\frac{\partial f}{\partial z}=\frac{\partial f}{\partial y}=0$, implying $f$ is constant.
More geometrically, you could say that $\mathcal{E}:=\operatorname{span}\lbrace X, Y, Z,[X,Z]\rbrace$ defines an involutive distribution, which is easily shown to have rank 4. Therefore the integral manifold of $\mathcal{E}$ through any point must be an open subset of $\mathbb{R}^4$, and $f$ will be constant on this set.