# Show that a complex function is not holomorphic

The question given was

Find the set of points at which the function $$f : C => C$$ given by

$$f(x + iy) = x^2 + y^2 + i(y^2-2xy)$$

for $$x, y \in R,$$ is holomorphic.

The Cauchy-Riemann equations give the following

$$\frac{∂v}{∂x}=-2y, \frac{∂u}{∂y}=2y$$

so $$\frac{∂v}{∂x}=-\frac{∂u}{∂y}$$

$$\frac{∂u}{∂x}=2x, \frac{∂v}{∂y}=2y-2x$$

This is where I get confused. I would say that, since $$\frac{∂u}{∂x}=\frac{∂u}{∂y}$$ when y=2x, this is a neighbourhood of points where f is complex differentiable, so it must be holomorphic at some points, even though it isn't everywhere.

However, the generic feedback given for this says "a function is not holomorphic at a point z unless it is differentiable at all points in some open neighbourhood of z. As it turns out, the given function is not holomorphic anywhere, even if the Cauchy–Riemann equations do hold at some points."

So I tried just finding where it was differentiable, and I did the following:

The function f is differentiable is the following exists:

$$\lim_{h\to 0}\frac{f(z+h)-f(z)}{h}$$ $$=\lim_{h\to 0}\frac{((x+h)^2+y^2+i(y^2-2(x+h)y)-(x^2+y^2+i(y^2-2xy))}{h}$$ $$=\lim_{h\to 0}\frac{2xh+h^2+i(-2hy)}{h}$$ $$=\lim_{h\to 0}(2x+h-2yi)=2x-2yi$$

But then that exists, right? So that suggests it is differentiable? I do not understand at all what I've done wrong (though I'm sure I'm being completely stupid) so any help is greatly appreciated.

When you computed $f(z+h)-f(z)$ you didn't correctly parse the given $f$. Note that, by definition, $$f(z):=\bigl({\rm Re}(z)\bigr)^2+\bigl({\rm Im}(z)\bigr)^2+i\left(\bigl({\rm Im}(z)\bigr)^2+2\bigl({\rm Re}(z)\bigr)\bigl({\rm Im}(z)\bigr)\right)\ .$$ Write $h=h'+ih''$ with real $h'$, $h''$, and see what happens!
It is fine if you do not understand the definition of analyticity at first, you will slowly get it. "A function is not holomorphic at a point $z$ unless it is differentiable at all points in some open neighbourhood of $z$."
This is precisely why this function is never holomorphic. Because your function is only complex differentiable on the line $y=2x$. Think of it this way, on this line, let us pick the point $(2,1)$ on the line, the function is differentiable at that point, but does it satisfy the property of differentiable at all points in some open neighborhood of $(2,1)$? Well the answer is no, because you can never have an open neighborhood at any point on a line.
If you do not immediately get my idea, then maybe you should review the definition of open neighborhood around $(2,1)$. Because most likely, you did not understand the definition fully.