Consider the functions $f(z)=x^2+iy^2$ and $g(z)=x^2+y^2+ixy$. At $z=0$,
(a) $f$ is analytic but not $g$
(b) $g$ is analytic but not $f$
(c) both are analytic
(d) neither $f$ nor $g$ is analytic
My attempt: for $f(z)$: $u_x=2x=2y=v_y$ and $u_y=0=-v_x$, hence $f$ is analytic at $0$, and for $g(z)$ we have: $u_x=2x=x=v_y$ and $u_y=2y=-y=-v_x$, hence $g$ is analytic at $z=0$.
But if we see the general definition, which implies that if $f$ is analytic at a point $z$ then it is analytic in all points of a neighborhood of $z$ then it follows that neither of them is analytic.
Is my approach correct and what should be the final solution to this? Thanks in advance.
CR equations have to hold in a neighborhood of $0$, as you have pointed out. The fact they are satisfied at a single point is meaningless.