Cauchy-Riemann Equations: Examples and Counterexamples
students, in this lesson you will see how the Cauchy-Riemann equations work in real examples and why they sometimes fail in counterexamples. We will focus on how to test whether a complex-valued function $f(z)$ can be complex differentiable, how to recognize when the equations are satisfied, and why that alone is not always enough. 🌟
What you will learn
By the end of this lesson, students, you should be able to:
- explain what the Cauchy-Riemann equations say in a simple way,
- check examples of complex functions using the equations,
- spot counterexamples where the equations are not enough to guarantee differentiability,
- connect these ideas to harmonic functions and the larger study of complex analysis,
- use evidence from worked examples to justify your conclusions.
The main idea is this: if a complex function $f(z)$ is written as $f(z)=u(x,y)+iv(x,y)$ where $z=x+iy$, then the real part $u$ and imaginary part $v$ must satisfy certain relationships for $f$ to be complex differentiable. Those relationships are the Cauchy-Riemann equations.
A quick reminder of the equations
Let $f(z)=u(x,y)+iv(x,y)$, where $u$ and $v$ are real-valued functions of $x$ and $y$. The Cauchy-Riemann equations are
$$u_x=v_y$$
and
$$u_y=-v_x.$$
Here $u_x$ means the partial derivative of $u$ with respect to $x$, and the other symbols are interpreted similarly.
These equations are very useful, but they have to be used carefully. In many school-level examples, the equations are a fast test. However, to guarantee complex differentiability at a point, extra conditions are often needed, such as the existence and continuity of the partial derivatives in a neighborhood of that point.
That distinction is exactly why examples and counterexamples matter. ✅
Example 1: A polynomial function that works everywhere
Consider the function $f(z)=z^2$.
Write $z=x+iy$. Then
$$f(z)=(x+iy)^2=x^2-y^2+i(2xy).$$
So we have
$$u(x,y)=x^2-y^2$$
and
$$v(x,y)=2xy.$$
Now compute the partial derivatives:
$$u_x=2x, \quad u_y=-2y, \quad v_x=2y, \quad v_y=2x.$$
Check the Cauchy-Riemann equations:
$$u_x=v_y \Rightarrow 2x=2x,$$
$$u_y=-v_x \Rightarrow -2y=-2y.$$
They hold for every point $(x,y)$. So $f(z)=z^2$ is complex differentiable everywhere. In fact, any polynomial in $z$ behaves this way. This is a good example because it shows the equations in action without any trouble.
A practical interpretation is that the real and imaginary parts are perfectly matched. If one part changes in the $x$-direction, the other part changes in the $y$-direction in a coordinated way. That coordination is what makes complex differentiation possible. 🧠
Example 2: The identity function and linear functions
Now consider $f(z)=z$.
Since $z=x+iy$, we have
$$f(z)=x+iy,$$
so
$$u(x,y)=x, \quad v(x,y)=y.$$
Then
$$u_x=1, \quad u_y=0, \quad v_x=0, \quad v_y=1.$$
The equations become
$$u_x=v_y \Rightarrow 1=1,$$
and
$$u_y=-v_x \Rightarrow 0=0.$$
So the equations hold everywhere.
More generally, for a function of the form $f(z)=az+b$ where $a,b\in\mathbb{C}$, the Cauchy-Riemann equations also hold everywhere. These are the complex version of straight-line transformations: stretching, rotating, and shifting the plane. The equations capture that such maps preserve the special structure of complex numbers.
This is one reason complex analysis is powerful. It turns geometric behavior into algebraic conditions. 📐
Example 3: A function that fails the equations
Now look at $f(z)=\overline{z}$, the complex conjugate.
Since $z=x+iy$,
$$\overline{z}=x-iy.$$
Thus
$$u(x,y)=x, \quad v(x,y)=-y.$$
Compute the partial derivatives:
$$u_x=1, \quad u_y=0, \quad v_x=0, \quad v_y=-1.$$
Now test the equations:
$$u_x=v_y \Rightarrow 1=-1,$$
which is false.
So $f(z)=\overline{z}$ does not satisfy the Cauchy-Riemann equations anywhere. That means it is not complex differentiable anywhere.
This is a strong counterexample because the function looks very simple, but it behaves differently from holomorphic functions. It also shows that complex differentiability is much stricter than real differentiability. A function can be perfectly fine as a real function in two variables and still fail to be complex differentiable. 🚫
Counterexample 1: The equations hold at one point, but differentiability fails
A very important lesson, students, is that the Cauchy-Riemann equations at a single point do not automatically guarantee complex differentiability at that point.
Consider the function
$$f(z)=\begin{cases}
$\dfrac{\overline{z}^2}{z}, & z\neq 0,\\$
$0, & z=0.$
$\end{cases}$$$
To analyze the behavior near $0$, write $z=x+iy$ and note that the function is designed to behave differently depending on the direction you approach from. Without going into every algebraic detail, this function has partial derivatives at $0$ that satisfy the Cauchy-Riemann equations there, but $f$ is still not complex differentiable at $0$.
Why? Because the limit
$$\lim_{z\to 0}\frac{f(z)-f(0)}{z}$$
fails to exist.
This is the key counterexample idea: the equations are necessary under the right hypotheses, but by themselves they are not always enough. To confirm differentiability, you need more than just checking one point. You need control of the behavior near the point as well.
A common school-level summary is:
- if $f$ is complex differentiable, then the Cauchy-Riemann equations hold;
- if the Cauchy-Riemann equations hold and the partial derivatives are continuous near the point, then $f$ is complex differentiable there.
That second statement is what saves us from false conclusions. ✅
Example 4: A function that satisfies the equations but is not obviously holomorphic everywhere
Let
$$f(z)=x^2-y^2+i(2xy).$$
This is really the same function as $f(z)=z^2$, but written in terms of $x$ and $y$. It is a helpful example because it shows how a function can be checked directly from its real and imaginary parts.
Suppose you are given $u(x,y)=x^2-y^2$ and $v(x,y)=2xy$ without being told the original complex formula. You can still compute
$$u_x=2x, \quad u_y=-2y, \quad v_x=2y, \quad v_y=2x$$
and conclude that the Cauchy-Riemann equations hold everywhere.
This is important in applications. Often, functions are introduced in real-variable form, and you must decide whether they come from a complex analytic function. The equations give a practical diagnostic tool.
Harmonic functions and why examples matter
The Cauchy-Riemann equations also connect to harmonic functions. If $u$ and $v$ have continuous second partial derivatives and satisfy the Cauchy-Riemann equations, then both $u$ and $v$ are harmonic. That means
$$u_{xx}+u_{yy}=0$$
and
$$v_{xx}+v_{yy}=0.$$
For example, for $f(z)=z^2$, we had
$$u(x,y)=x^2-y^2.$$
Then
$$u_{xx}=2, \quad u_{yy}=-2,$$
so
$$u_{xx}+u_{yy}=0.$$
Similarly,
$$v(x,y)=2xy$$
has
$$v_{xx}=0, \quad v_{yy}=0,$$
so
$$v_{xx}+v_{yy}=0.$$
This shows a deep fact: the real and imaginary parts of a nice complex function are not random. They are tightly linked and satisfy the Laplace equation.
A useful counterexample is $u(x,y)=x^2+y^2$. Then
$$u_{xx}+u_{yy}=2+2=4,$$
so $u$ is not harmonic. That means it cannot be the real part of a holomorphic function on any open region where the needed smoothness assumptions apply.
How to think about examples and counterexamples
When you solve problems, students, a good strategy is:
- Write $f(z)$ as $u(x,y)+iv(x,y)$.
- Compute $u_x$, $u_y$, $v_x$, and $v_y$.
- Check whether
$$u_x=v_y$$
and
$$u_y=-v_x.$$
- Look for the needed regularity, such as continuity of the partial derivatives near the point.
- If the equations fail, conclude that $f$ is not complex differentiable there.
- If the equations hold, do not stop too early. Make sure the hypotheses are strong enough to justify the conclusion.
This careful process is what turns formulas into correct reasoning.
Conclusion
The examples and counterexamples in this topic show the real power of the Cauchy-Riemann equations. Functions like $f(z)=z^2$ and $f(z)=az+b$ satisfy the equations everywhere and are complex differentiable throughout their domains. Functions like $f(z)=\overline{z}$ fail the equations and are not complex differentiable. Other functions can be trickier: they may satisfy the equations at a point but still fail to be complex differentiable if the required conditions are missing.
So, students, the big lesson is this: the Cauchy-Riemann equations are an essential test, but they must be used with care. They help us identify complex analytic behavior, connect to harmonic functions, and avoid misleading conclusions. That is why examples and counterexamples are such an important part of complex analysis. ✨
Study Notes
- The Cauchy-Riemann equations are
$$u_x=v_y$$
and
$$u_y=-v_x.$$
- For $f(z)=u(x,y)+iv(x,y)$, these equations are necessary for complex differentiability.
- If the partial derivatives are continuous near a point and the equations hold there, then $f$ is complex differentiable at that point.
- Example: $f(z)=z^2$ satisfies the equations everywhere.
- Example: $f(z)=az+b$ satisfies the equations everywhere for any constants $a,b\in\mathbb{C}$.
- Counterexample: $f(z)=\overline{z}$ does not satisfy the equations.
- The equations alone at a single point do not always guarantee differentiability.
- If $f$ is holomorphic and smooth enough, then $u$ and $v$ are harmonic:
$$u_{xx}+u_{yy}=0$$
and
$$v_{xx}+v_{yy}=0.$$
- Harmonicity is a useful way to connect Cauchy-Riemann equations to broader complex analysis.
- Always check both the equations and the assumptions before concluding that a function is complex differentiable.
