Suppose $u(x,y),v(x,y)$ are smooth real-valued functions defined on an open connected domain $U \subseteq \mathbb{R}^2$, satisfying $$ (\text{Hess}\, u)_{ij}=\frac{P_i(\cos v, \sin v, v_x,v_y,u_x,u_y)}{Q_j(\cos v, \sin v, v_x,v_y,u_x,u_y)} $$ and $$ (\text{Hess}\, v)_{ij}=\frac{\tilde P_i(\cos v, \sin v, v_x,v_y,u_x,u_y)}{\tilde Q_j(\cos v, \sin v, v_x,v_y,u_x,u_y)}, $$ where $P_i,Q_j,\tilde P_i, \tilde Q_j$ are fixed polynomials, and we assume that the denominators do not vanish on $U$.
How to show that $u,v$ are real-analytic?
The analogous one-dimensional version (ODE) of this problem follows from an analytic version of the Picard-Lindelöf theorem, but here we have a PDE.
Note that we have here a "coupling" between $u,v$; however, I am don't even know how one proves the uncoupled, simpler version given by $$ (\text{Hess}\, v)_{ij}=\frac{P_i(\cos v, \sin v, v_x,v_y)}{Q_j(\cos v, \sin v, v_x,v_y)}. $$
If this question is too hard for elementary solution, suitable references would also be appreciated.
This is not an "artificial" exercise; this problem arises naturally when studying divergence-free vector fields whose flow has constant norm.