Consider the ring $\mathbb{C}[[X,Y]]$ and its subring $\mathbb{C}[[X+iY]]$, where $i=\sqrt{-1}$. One can show that $f(X,Y):=u(X,Y)+iv(X,Y)\in \mathbb{C}[[X,Y]]$ lies in $\mathbb{C}[[X+iY]]$ iff $u$ and $v$ satisfy the CR-equations formally. The necessary condition follows by straightforward formal (algebraic) derivation of the homogeneous parts, whereas the "if" part follows from the fact that the homogeneous parts are holomorphic polynomial functions, hence represented by a (homogeneous) polynomial function in a single complex variable (that part uses analysis since we have to look at the polynomials as polynomial functions).
Nevertheless, I cannot shake the feeling that the usage of a complex analysis argument is an overkill since the whole thing seems to play out in the algebraic realm.
Is there perhaps a formal/algebraic argument that entirely circumvents the analysis part of the argument (Kähler differentials?)?
Apologies if my question is inappropriate for MO, I am looking forward to learning about formal differential operators and equations in the algebraic setting.
Thanks!