Checking every direction of approach sounds hopeless, but two directions are enough when the partial derivatives of $u$ and $v$ are continuous. Comparing the horizontal and the vertical approach in the difference quotient gives two short equations that test differentiability by computation.
🔑 Key idea
Let $f = u + iv$, with $u$ and $v$ having continuous first partial derivatives near $z_0$. Then $f$ is complex differentiable at $z_0$ exactly when the Cauchy–Riemann equations hold there:
$$u_x = v_y, \qquad u_y = -v_x.$$
In that case $f'(z_0) = u_x + iv_x = v_y - iu_y$.
💡 Why it works
Suppose $f'(z_0)$ exists. With $h$ real, the difference quotient is $\frac{f(z_0 + h) - f(z_0)}{h} \to f_x = u_x + iv_x$. With $h = it$, it becomes $\frac{f(z_0 + it) - f(z_0)}{it} \to \frac{1}{i}f_y = -i(u_y + iv_y) = v_y - iu_y$. Both equal $f'(z_0)$, so $u_x + iv_x = v_y - iu_y$; matching real and imaginary parts gives $u_x = v_y$ and $v_x = -u_y$. The converse (equations plus continuous partials imply differentiability) comes from the linear approximation of $u$ and $v$.
$f = x^2 + iy^2$ satisfies the Cauchy–Riemann equations only on the line $y = x$. Put $z_0$ on that line and the little square stays a square; move it off and the square is stretched unevenly.
Worked examples
✏️ Worked example: Checking a function
Show that $f = x^2 - y^2 + 2x + i(2xy + 2y)$ satisfies the Cauchy–Riemann equations everywhere, and find $f'(z)$.
$u = x^2 - y^2 + 2x$, $v = 2xy + 2y$.
$u_x = 2x + 2$ and $v_y = 2x + 2$: equal. $u_y = -2y$ and $v_x = 2y$: so $u_y = -v_x$.
The first equation needs $x = y$. So $f$ is differentiable exactly on the line $y = x$, with $f' = u_x + iv_x = 2x$ there.
Answer: on the line $y = x$
Write $f = u + iv$ and compute the four partials $u_x$, $u_y$, $v_x$, $v_y$.
Find where both $u_x = v_y$ and $u_y = -v_x$ hold. If the partials are continuous, $f$ is complex differentiable exactly there.
At those points, $f' = u_x + iv_x$. If the equations hold on a whole open set, $f$ is analytic there (next lesson).
⚠️ Common mistake
Dropping the minus sign, or trusting a single point. The second equation is $u_y = -v_x$; with $u_y = v_x$ instead, $z^2$ would fail the test and $\overline{z}^2$ would pass, which is backwards. Second trap: the equations holding at one point give differentiability at that point only. $|z|^2 = x^2 + y^2$ satisfies them only at $0$ ($u_x = 2x = 0 = v_y$ and $u_y = 2y = 0 = -v_x$), so it is differentiable at $0$ but analytic nowhere, as the next lesson explains.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.