# Are the Cauchy-Riemann equations and the continuity of partials enough for analyticity?

I know that if the partial derivative of real and imaginary parts of a complex function satisfy the cauchy-riemann equations and the partial derivatives are continuous at a point then the function analytic at the point, but I have an example which contradicts to this if I don't have a mistake;

Assume $f(z)=1$ if $z$ is on the $x$-axis and $y$-axis $0$ otherwise. The limit $\lim \frac{f(z)-f(0)}{z}$ doesn't exist where $z\rightarrow 0$ so it is not analytic at $0$ but the partials are continuous and satisfy Cauchy-Riemann equations at $0$. There should be some mistake but I couldn't able to see it.

Don't you need continuity of $f$? As far as I know the theorem is as follows: A continuous function $f$ is analytic if the partial derivatives are continuous and satisfy the Cauchy-Riemann equations.
The partial derivatives of your function are not continuous at the origin---indeed they don't even exist away from the origin which they would need to in order to speak about them being continuous at the origin. If in fact they were continuous at the origin, then your function viewed as a map $\mathbb R^2 \to \mathbb R^2$ would be differentiable in the real sense, and so would have to be continuous, which it is not.
• The partials don't exist at the origin: along the positive reals you get $+\infty$, along the negative reals you get $-\infty$, and along the imaginary axis you get $0$. But the more important problem is just that there is no continuous way to assemble such a function, since for every $\delta > 0$ it is $1$ at $\delta$ but $0$ at $i \delta$. – Ian Sep 9 '14 at 22:19
• @Ian, the function is the constant $1$ along the $x$-axis and along the $y$-axis, so all partials are zero at the origin. – Santiago Canez Sep 10 '14 at 0:28