Chapter 2 · Analytic Functions and Complex Integration

2.1 Analytic Functions and the Cauchy–Riemann Equations

What it means for a function of a complex variable to have a derivative, the Cauchy–Riemann equations that characterise it, and the harmonic functions that come with it — together with the counterexamples that show exactly which hypotheses matter.

A function $f:\mathbb{C}\to\mathbb{C}$ is, from one point of view, just a map of the plane to itself, $(x,y)\mapsto(u(x,y),v(x,y))$, and real analysis already tells us what it means for such a map to be differentiable. Complex analysis asks for much more. We require the difference quotient $\dfrac{f(z_0+h)-f(z_0)}{h}$ — a quotient of two complex numbers — to have a limit as $h\to0$ from every direction at once. That single demand forces the two real functions $u$ and $v$ to be tied together by a pair of partial differential equations, the Cauchy–Riemann equations $u_x=v_y$, $u_y=-v_x$, and it has astonishing consequences: a complex-differentiable function is automatically infinitely differentiable (§2.2), equal to its Taylor series (Chapter 3), and determined everywhere by its values on a tiny segment (§2.3). Nothing like this is true for real functions.

This section builds the theory from the definition: limits and continuity, the complex derivative, the Cauchy–Riemann equations as a necessary condition and — with continuity of the partial derivatives — a sufficient one, their polar form, and the rigidity results ("if $|f|$ is constant then $f$ is constant"). The real and imaginary parts of an analytic function turn out to be harmonic, and we learn to reverse the process: given a harmonic $u$, find $v$ (a harmonic conjugate) and the analytic $f=u+iv$, by integrating the Cauchy–Riemann equations or by the Milne–Thomson substitution. CSIR NET tests this material constantly: "at which points is $f$ differentiable?", "find $f$ given $\operatorname{Re}f$", "which of the following functions are harmonic?", and Part C statements whose wrong options are the classical counterexamples collected in the ⚠️ box below.

Limits, Continuity and Domains

We write $z=x+iy$ and, for a function $f$ of $z$, $f=u+iv$ with $u=\operatorname{Re}f$ and $v=\operatorname{Im}f$ regarded as real functions of the two real variables $(x,y)$. The open disc of centre $a$ and radius $r$ is $D(a,r)=\{z:|z-a|\lt r\}$, and $D'(a,r)=D(a,r)\setminus\{a\}$ is the punctured disc.

📘 Definition 2.1 — Open sets, domains

A set $U\subseteq\mathbb{C}$ is open if every point $a\in U$ has a disc $D(a,r)\subseteq U$. An open set $U$ is connected if it is not the union of two disjoint nonempty open sets; for open subsets of $\mathbb{C}$ this is equivalent to being polygonally connected: any two points of $U$ can be joined by a polygonal path (finitely many line segments) lying in $U$, and the segments may even be taken horizontal and vertical.

A domain (or region) is a nonempty connected open set. Discs, half-planes, annuli $\{r\lt|z-a|\lt R\}$, the punctured plane $\mathbb{C}\setminus\{0\}$ and the cut plane $\mathbb{C}\setminus(-\infty,0]$ are domains; the union of two disjoint discs is open but not a domain.

📘 Definition 2.2 — Limits and continuity

Let $f$ be defined on a set $S$ and let $z_0$ be a limit point of $S$. We write $\lim_{z\to z_0}f(z)=L$ if for every $\varepsilon\gt0$ there is $\delta\gt0$ such that $|f(z)-L|\lt\varepsilon$ whenever $z\in S$ and $0\lt|z-z_0|\lt\delta$. The function $f$ is continuous at $z_0\in S$ if $\lim_{z\to z_0}f(z)=f(z_0)$ (or $z_0$ is an isolated point of $S$), and continuous on $S$ if it is continuous at every point of $S$.

Limits involving $\infty$ are defined through the substitution $z=1/w$: $\lim_{z\to\infty}f(z)=L$ means $\lim_{w\to0}f(1/w)=L$, and $\lim_{z\to z_0}f(z)=\infty$ means $\lim_{z\to z_0}1/f(z)=0$.

The crucial point is that $z$ may approach $z_0$ in any manner — along any line, spiral or sequence of points. A limit exists only if all these approaches give the same answer.

📐 Theorem 2.1 — Rules for limits and continuity
  1. If $f=u+iv$ and $L=a+ib$, then $\lim_{z\to z_0}f(z)=L$ iff $u(x,y)\to a$ and $v(x,y)\to b$ as $(x,y)\to(x_0,y_0)$.
  2. If $\lim f=L$ and $\lim g=M$, then $\lim(f\pm g)=L\pm M$, $\lim fg=LM$, and $\lim f/g=L/M$ provided $M\ne0$.
  3. Sums, products, quotients (where the denominator is nonzero) and compositions of continuous functions are continuous. Polynomials, $e^z$, $\sin z$, $\cos z$ are continuous on $\mathbb{C}$; if $f$ is continuous, so are $\bar f$, $|f|$, $\operatorname{Re}f$ and $\operatorname{Im}f$.
  4. If $z_0$ is approached along two paths in $S$ on which $f$ has different limits, then $\lim_{z\to z_0}f(z)$ does not exist.

Proof. (1) follows from $$\max(|\operatorname{Re}w|,|\operatorname{Im}w|)\le|w|\le|\operatorname{Re}w|+|\operatorname{Im}w|$$ with $w=f(z)-L$. (2) For the product, $$|fg-LM|=|(f-L)g+L(g-M)|\le|f-L|\,|g|+|L|\,|g-M|;$$ near $z_0$, $|g|\le|M|+1$, and both terms become small. For the quotient it suffices to treat $1/g$: near $z_0$, $|g|\ge|M|/2$, so $\left|\frac1g-\frac1M\right|=\frac{|g-M|}{|g|\,|M|}\le\frac{2|g-M|}{|M|^2}$. Sums are immediate. (3) The algebraic statements follow from (2). For a composition $g\circ f$ with $f$ continuous at $z_0$ and $g$ continuous at $f(z_0)$: given $\varepsilon$, choose $\eta$ with $|g(w)-g(f(z_0))|\lt\varepsilon$ for $|w-f(z_0)|\lt\eta$, then $\delta$ with $|f(z)-f(z_0)|\lt\eta$ for $|z-z_0|\lt\delta$. Power series are continuous inside their disc of convergence because they are differentiable there (Theorem 1.23, together with Theorem 2.2(2) below). Finally $|\bar f(z)-\bar f(z_0)|=|f(z)-f(z_0)|$ and $\big||f(z)|-|f(z_0)|\big|\le|f(z)-f(z_0)|$. (4) If the limit $L$ existed, every path would give $L$. ∎

✏️ Example 1 — Limits that exist and limits that do not
Evaluate, or show that the limit does not exist: (a) $\displaystyle\lim_{z\to0}\frac{\bar z}{z}$; (b) $\displaystyle\lim_{z\to0}\frac{\bar z^{\,2}}{z}$; (c) $\displaystyle\lim_{z\to i}\frac{z^2+1}{z-i}$; (d) $\displaystyle\lim_{z\to\infty}\frac{2z^2+i}{(1-i)z^2+3z}$; (e) $\displaystyle\lim_{z\to0}\frac{\sin z}{z}$.
(a) Does not exist Along the ray $z=te^{i\theta}$ ($t\gt0$), $\bar z/z=e^{-2i\theta}$: the value is $1$ on the real axis and $-1$ on the imaginary axis. By Theorem 2.1(4) there is no limit.
(b) $0$ $\left|\bar z^{\,2}/z\right|=|z|^2/|z|=|z|\to0$. A modulus estimate settles all directions at once.
(c) $2i$ $z^2+1=(z-i)(z+i)$, so the quotient equals $z+i$ for $z\ne i$, and $z+i\to2i$.
(d) $1+i$ Put $z=1/w$: the quotient is $\dfrac{2+iw^2}{(1-i)+3w}\to\dfrac2{1-i}=\dfrac{2(1+i)}{2}=1+i$ as $w\to0$.
(e) $1$ From the series (Definition 1.10), $\dfrac{\sin z}{z}=1-\dfrac{z^2}{3!}+\dfrac{z^4}{5!}-\cdots$ for $z\ne0$; the right side is a power series with radius $\infty$, continuous at $0$, with value $1$ there.

The Complex Derivative

📘 Definition 2.3 — Complex differentiability
Let $f$ be defined on an open set $U$ and let $z_0\in U$. Then $f$ is (complex) differentiable at $z_0$ if the limit $$f'(z_0)=\lim_{h\to0}\frac{f(z_0+h)-f(z_0)}{h}$$ exists in $\mathbb{C}$, where $h$ tends to $0$ through complex values (with $z_0+h\in U$). The number $f'(z_0)$ is the derivative of $f$ at $z_0$.

Formally this is the definition from real calculus. The difference is that $h$ ranges over a disc, not an interval, and this makes complex differentiability a far stronger property.

📐 Theorem 2.2 — Rules of differentiation
  1. Linear approximation. $f$ is differentiable at $z_0$ iff there is a function $\varphi$ on $U$, continuous at $z_0$, with $f(z)-f(z_0)=\varphi(z)(z-z_0)$ for all $z\in U$; then $f'(z_0)=\varphi(z_0)$. Equivalently, $f(z_0+h)=f(z_0)+f'(z_0)h+o(|h|)$.
  2. If $f$ is differentiable at $z_0$, it is continuous at $z_0$.
  3. If $f,g$ are differentiable at $z_0$, so are $f\pm g$, $fg$ and (if $g(z_0)\ne0$) $f/g$, with the usual formulas $(fg)'=f'g+fg'$, $(f/g)'=(f'g-fg')/g^2$.
  4. Chain rule. If $f$ is differentiable at $z_0$ and $g$ is differentiable at $f(z_0)$, then $g\circ f$ is differentiable at $z_0$ and $(g\circ f)'(z_0)=g'(f(z_0))\,f'(z_0)$.
  5. $(z^n)'=nz^{n-1}$ for $n\in\mathbb{Z}$ ($z\ne0$ if $n\lt0$). Polynomials are differentiable on $\mathbb{C}$, rational functions at every point where the denominator is nonzero, and power series inside their disc of convergence (Theorem 1.23).

Proof. (1) If $f'(z_0)$ exists, put $\varphi(z)=\frac{f(z)-f(z_0)}{z-z_0}$ for $z\ne z_0$ and $\varphi(z_0)=f'(z_0)$; continuity of $\varphi$ at $z_0$ is exactly the existence of the limit. Conversely, such a $\varphi$ gives $\frac{f(z)-f(z_0)}{z-z_0}=\varphi(z)\to\varphi(z_0)$. (2) $f(z)-f(z_0)=\varphi(z)(z-z_0)\to\varphi(z_0)\cdot0=0$.

(3) Write $f(z)-f(z_0)=\varphi(z)(z-z_0)$ and $g(z)-g(z_0)=\psi(z)(z-z_0)$. Then $$f(z)g(z)-f(z_0)g(z_0)=\big[\varphi(z)g(z)+f(z_0)\psi(z)\big](z-z_0),$$ and the bracket is continuous at $z_0$ with value $f'(z_0)g(z_0)+f(z_0)g'(z_0)$. Similarly $\frac1{g(z)}-\frac1{g(z_0)}=\frac{-\psi(z)}{g(z)g(z_0)}(z-z_0)$ near $z_0$ (where $g\ne0$ by continuity). This is the rule for the derivative of $1/g$, namely $-g'/g^2$; the quotient rule follows from the product rule.

(4) Write $g(w)-g(w_0)=\chi(w)(w-w_0)$ with $w_0=f(z_0)$ and $\chi$ continuous at $w_0$. Then $$g(f(z))-g(f(z_0))=\chi(f(z))\,\varphi(z)\,(z-z_0),$$ and $\chi\circ f$ is continuous at $z_0$ by (2) and Theorem 2.1(3). So $(g\circ f)'(z_0)=\chi(w_0)\varphi(z_0)=g'(w_0)f'(z_0)$. (Writing $\varphi$ instead of the difference quotient avoids the usual problem of dividing by $f(z)-f(z_0)$, which may vanish.)

(5) For $n\ge1$, $$z^n-z_0^n=(z^{n-1}+z^{n-2}z_0+\cdots+z_0^{n-1})(z-z_0),$$ and the bracket tends to $nz_0^{n-1}$. For $n\lt0$ use the quotient rule on $1/z^{|n|}$. The rest follows from (3). ∎

✏️ Example 2 — Three functions that are smooth in $\mathbb{R}^2$ but (almost) never complex differentiable
Using only Definition 2.3, show that (a) $f(z)=\bar z$ is differentiable nowhere; (b) $f(z)=\operatorname{Re}z$ is differentiable nowhere; (c) $f(z)=|z|^2$ is differentiable at $z_0=0$ and at no other point.
(a) $\dfrac{\overline{z_0+h}-\bar z_0}{h}=\dfrac{\bar h}{h}$, which equals $e^{-2i\theta}$ for $h=te^{i\theta}$: it is $1$ for real $h$ and $-1$ for imaginary $h$. No limit, at any $z_0$.
(b) $\dfrac{\operatorname{Re}(z_0+h)-\operatorname{Re}z_0}{h}=\dfrac{\operatorname{Re}h}{h}$: $1$ for real $h$, $0$ for imaginary $h$. No limit.
(c) Expand $|z_0+h|^2-|z_0|^2=(z_0+h)(\bar z_0+\bar h)-z_0\bar z_0=\bar z_0h+z_0\bar h+h\bar h$, so $$\frac{|z_0+h|^2-|z_0|^2}{h}=\bar z_0+\bar h+z_0\,\frac{\bar h}{h}.$$
(c) Decide At $z_0=0$ the quotient is $\bar h\to0$: $f'(0)=0$. At $z_0\ne0$ the first two terms tend to $\bar z_0$, while $z_0\bar h/h$ equals $z_0$ for real $h$ and $-z_0$ for imaginary $h$; the two directional limits $\bar z_0\pm z_0$ differ by $2z_0\ne0$. So $f$ is not differentiable at $z_0\ne0$.
Lesson All three are polynomials in $x$ and $y$ — infinitely differentiable as maps $\mathbb{R}^2\to\mathbb{R}^2$. Complex differentiability is not a smoothness condition; it is a condition on how the map distorts small discs (it must act on them like multiplication by one complex number).

The Cauchy–Riemann Equations

Approach $z_0$ along the two coordinate directions. Along real $h$ the difference quotient becomes the partial derivative $f_x=u_x+iv_x$; along imaginary $h=it$ it becomes $\frac{1}{i}f_y$. If $f'(z_0)$ exists these must agree.

📐 Theorem 2.3 — The Cauchy–Riemann equations are necessary
Let $f=u+iv$ be defined on an open set $U$ and differentiable at $z_0=x_0+iy_0\in U$. Then the four partial derivatives $u_x,u_y,v_x,v_y$ exist at $(x_0,y_0)$ and satisfy the Cauchy–Riemann (CR) equations $$u_x=v_y,\qquad u_y=-v_x\qquad\text{at }(x_0,y_0).$$ Moreover $f'(z_0)=u_x+iv_x=v_y-iu_y$, and the Jacobian of $(x,y)\mapsto(u,v)$ at $(x_0,y_0)$ is $u_xv_y-u_yv_x=|f'(z_0)|^2$.

Proof. Take $h=t$ real: $\dfrac{f(z_0+t)-f(z_0)}{t}\to f'(z_0)$, so the partial derivative $f_x(z_0)=u_x+iv_x$ exists and equals $f'(z_0)$ (real and imaginary parts converge separately, Theorem 2.1(1)). Take $h=it$: $\dfrac{f(z_0+it)-f(z_0)}{it}\to f'(z_0)$, so $f_y(z_0)=u_y+iv_y$ exists and equals $if'(z_0)$. Hence $f_y=if_x$, that is, $$u_y+iv_y=i(u_x+iv_x)=-v_x+iu_x.$$ Comparing real and imaginary parts gives $u_y=-v_x$ and $v_y=u_x$. Then $f'(z_0)=u_x+iv_x$, and also $f'=-if_y=v_y-iu_y$. Finally $u_xv_y-u_yv_x=u_x^2+v_x^2=|f'(z_0)|^2$. ∎

The complex form. Define the Wirtinger derivatives $$\frac{\partial f}{\partial z}=\frac12\left(f_x-if_y\right),\qquad\frac{\partial f}{\partial\bar z}=\frac12\left(f_x+if_y\right).$$ Since $f_x+if_y=(u_x-v_y)+i(v_x+u_y)$, the CR equations say exactly $\dfrac{\partial f}{\partial\bar z}=0$, and then $f'=\dfrac{\partial f}{\partial z}$. One checks $\frac{\partial z}{\partial\bar z}=0$, $\frac{\partial\bar z}{\partial\bar z}=1$, and the usual product and chain rules hold for these operators. This gives a fast practical test: substitute $x=\frac{z+\bar z}2$, $y=\frac{z-\bar z}{2i}$ to write $f$ as an expression in $z$ and $\bar z$, and differentiate formally with respect to $\bar z$, treating $z$ as a constant. For instance $|z|^2=z\bar z$ has $\partial/\partial\bar z=z$, which vanishes only at $0$ — the answer of Example 2(c).

The CR equations are necessary; they are not sufficient on their own (Example 3 below). What is missing is the real differentiability of $u$ and $v$.

📐 Theorem 2.4 — When the Cauchy–Riemann equations are sufficient
Let $f=u+iv$ be defined on an open set $U$ and $z_0=x_0+iy_0\in U$.
  1. $f$ is complex differentiable at $z_0$ if and only if $u$ and $v$ are differentiable at $(x_0,y_0)$ as functions of two real variables (that is, with $h=s+it$, $$u(x_0+s,y_0+t)-u(x_0,y_0)=u_xs+u_yt+o(|h|),$$ and likewise for $v$) and the CR equations hold at $(x_0,y_0)$.
  2. In particular, if the partial derivatives $u_x,u_y,v_x,v_y$ exist in a neighbourhood of $z_0$, are continuous at $z_0$, and satisfy the CR equations at $z_0$, then $f$ is differentiable at $z_0$, with $f'(z_0)=u_x+iv_x$.
  3. If $u,v$ have continuous first partial derivatives on $U$ and satisfy the CR equations at every point of $U$, then $f$ is differentiable at every point of $U$.

Proof. (1, ⇒) Let $f'(z_0)=a+ib$ and $h=s+it$. By Theorem 2.2(1), $$f(z_0+h)-f(z_0)=(a+ib)(s+it)+o(|h|)$$ $$=(as-bt)+i(bs+at)+o(|h|).$$ Taking real and imaginary parts, $$u(x_0+s,y_0+t)-u(x_0,y_0)=as-bt+o(|h|),\qquad v(x_0+s,y_0+t)-v(x_0,y_0)=bs+at+o(|h|).$$ So $u$ and $v$ are real-differentiable with $(u_x,u_y)=(a,-b)$ and $(v_x,v_y)=(b,a)$, which satisfy the CR equations.

(1, ⇐) Put $a=u_x=v_y$ and $b=v_x=-u_y$ at $(x_0,y_0)$. Real differentiability gives $$f(z_0+h)-f(z_0)=(as-bt)+i(bs+at)+o(|h|)=(a+ib)h+o(|h|),$$ so $$\frac{f(z_0+h)-f(z_0)}{h}=(a+ib)+\frac{o(|h|)}{h}\to a+ib.$$

(2) It suffices to show that continuity of the partials at the point gives real differentiability. For $u$, split the increment and apply the one-variable mean value theorem twice: $$u(x_0+s,y_0+t)-u(x_0,y_0)=u_x(x_0+\theta_1s,\,y_0+t)\,s+u_y(x_0,\,y_0+\theta_2t)\,t$$ with $\theta_1,\theta_2\in(0,1)$. By continuity at $(x_0,y_0)$, $u_x(x_0+\theta_1s,y_0+t)=u_x(x_0,y_0)+\varepsilon_1$ and $u_y(x_0,y_0+\theta_2t)=u_y(x_0,y_0)+\varepsilon_2$ with $\varepsilon_1,\varepsilon_2\to0$ as $h\to0$, and $|\varepsilon_1s+\varepsilon_2t|\le(|\varepsilon_1|+|\varepsilon_2|)|h|=o(|h|)$. The same for $v$; now apply (1). (3) Apply (2) at each point. ∎

✏️ Example 3 — Prove: the CR equations at a point do not imply differentiability
(a) Let $f(z)=\sqrt{|xy|}$ (a real-valued function). Show that the CR equations hold at $0$ but $f$ is not differentiable at $0$.
(b) Let $f(z)=\dfrac{x^3+iy^3}{x^2+y^2}$ for $z\ne0$ and $f(0)=0$. Show that $f$ is continuous, satisfies the CR equations at $0$, and is not differentiable at $0$.
(a) CR hold $u=\sqrt{|xy|}$, $v=0$. On the axes $u=0$, so $u_x(0,0)=\lim_{s\to0}\frac{u(s,0)-0}{s}=0$ and likewise $u_y(0,0)=0$; also $v_x=v_y=0$. Both CR equations read $0=0$.
(a) Not differentiable Along the diagonal $h=t(1+i)$, $t\gt0$: $\dfrac{f(h)-f(0)}{h}=\dfrac{|t|}{t(1+i)}=\dfrac{1-i}{2}$, while along the real axis the quotient is $0$. Two directions, two limits. (In fact $u$ is not real-differentiable at $0$, which is what Theorem 2.4 needs.)
(b) Continuity and CR For $z\ne0$, $|f(z)|\le\frac{|x|^3+|y|^3}{x^2+y^2}\le\frac{(|x|+|y|)(x^2+y^2)}{x^2+y^2}\le2|z|$, so $f(z)\to0=f(0)$. On the real axis $f(s)=s^3/s^2=s$, so $u_x(0)=1$, $v_x(0)=0$; on the imaginary axis $f(it)=it^3/t^2=it$, so $u_y(0)=0$, $v_y(0)=1$. Hence $u_x=v_y=1$ and $u_y=-v_x=0$ at $0$.
(b) Not differentiable Along $h=t(1+i)$: $f(h)=\dfrac{t^3(1+i)}{2t^2}=\dfrac{t(1+i)}2$, so $\dfrac{f(h)}{h}=\dfrac12$. Along the real axis the quotient is $1$. No limit. (Here all four partial derivatives exist everywhere, but they are not continuous at $0$.)
Moral To prove differentiability from the CR equations you must also check real differentiability — in practice, continuity of the partial derivatives (Theorem 2.4(2)). To disprove differentiability it suffices to find two directions with different limits, or a point where CR fail.
Interactive 1 — The Difference Quotient from Every Direction

Left: the point $z_0$ and the increments $h=\rho e^{i\varphi}$ on a small circle (the red arrow is the current $h$). Right: the value of the difference quotient $Q(h)=\dfrac{f(z_0+h)-f(z_0)}{h}$ for every direction $\varphi$ — a closed blue curve. The green dot is $f_x$ (the real direction) and the purple ring is $-if_y$ (the imaginary direction): the CR equations say exactly that these coincide. $f'(z_0)$ exists only if the blue curve shrinks to a single point as $\rho\to0$. Press Play to sweep $\varphi$; make $\rho$ small.

—
Q(h) now—
spread of Q (diameter)—
fₓ vs −i f_y—
CR residuals—
✏️ Example 4 — Where is it differentiable? Where is it analytic?
Find all points where each function is complex differentiable, and the derivative there: (a) $f=x^2+iy^2$; (b) $f(z)=z\operatorname{Re}z$; (c) $f=e^{-y}(\cos x+i\sin x)$; (d) $f=x^2-y^2-2y+i(2xy+2x)$ — and express (d) in terms of $z$.
Method All four have partial derivatives that are continuous on $\mathbb{R}^2$, so by Theorems 2.3 and 2.4(2), $f$ is differentiable at a point exactly when the CR equations hold there.
(a) The line $y=x$ $u_x=2x$, $v_y=2y$, $u_y=0=-v_x$. CR $\iff x=y$. So $f$ is differentiable at the points $t+it$, with $f'=u_x+iv_x=2t$, and at no other point.
(b) Only at $0$ $f=(x+iy)x=x^2+ixy$: $u_x=2x$, $v_y=x$, $u_y=0$, $v_x=y$. CR: $2x=x$ and $0=-y$, so only $z=0$, where $f'(0)=u_x+iv_x=0$. (Wirtinger check: $f=z\cdot\frac{z+\bar z}2$, $\partial f/\partial\bar z=z/2$.)
(c) Everywhere $u=e^{-y}\cos x$, $v=e^{-y}\sin x$: $u_x=-e^{-y}\sin x=v_y$ and $u_y=-e^{-y}\cos x=-v_x$. So $f$ is differentiable on $\mathbb{C}$ with $f'=u_x+iv_x=-e^{-y}\sin x+ie^{-y}\cos x=if$. Indeed $f=e^{-y+ix}=e^{iz}$ and $(e^{iz})'=ie^{iz}$.
(d) Everywhere $u_x=2x=v_y$ and $u_y=-2y-2=-(2y+2)=-v_x$: CR hold everywhere and $f'=2x+i(2y+2)=2z+2i$. Integrating, $f=z^2+2iz+c$, and $f(0)=0$ gives $c=0$. Check: $z^2+2iz=(x^2-y^2+2ixy)+(2ix-2y)$, which is the given function.
Analytic? (a) and (b) are differentiable on sets with empty interior (a line, a point), so they are analytic nowhere (Definition 2.4 below); (c) and (d) are entire.

In polar coordinates $z=re^{i\theta}$ ($r\gt0$) it is often more natural to write $f(re^{i\theta})=u(r,\theta)+iv(r,\theta)$, for instance for logarithms and powers.

📐 Theorem 2.5 — The Cauchy–Riemann equations in polar form
Let $U$ be an open set not containing $0$ on which $\theta$ is a continuous choice of argument (for example a sector or a cut plane), and let $f(re^{i\theta})=u(r,\theta)+iv(r,\theta)$ where $u,v$ have continuous first partial derivatives with respect to $r$ and $\theta$. Then $f$ is differentiable at every point of $U$ if and only if $$u_r=\frac1r\,v_\theta,\qquad v_r=-\frac1r\,u_\theta,$$ and then $f'(z)=e^{-i\theta}\left(u_r+iv_r\right)$.

Proof. With $x=r\cos\theta$, $y=r\sin\theta$, the chain rule gives $$u_r=u_x\cos\theta+u_y\sin\theta,\qquad u_\theta=-ru_x\sin\theta+ru_y\cos\theta,$$ and the same for $v$. Since the Jacobian $r$ of $(r,\theta)\mapsto(x,y)$ is nonzero, these can be inverted: $u_x=\cos\theta\,u_r-\frac{\sin\theta}{r}u_\theta$, $u_y=\sin\theta\,u_r+\frac{\cos\theta}{r}u_\theta$, and similarly for $v$; in particular the Cartesian partials are continuous. If the Cartesian CR equations hold, then $$v_\theta=-rv_x\sin\theta+rv_y\cos\theta=ru_y\sin\theta+ru_x\cos\theta=ru_r,$$ $$v_r=v_x\cos\theta+v_y\sin\theta=-u_y\cos\theta+u_x\sin\theta=-\tfrac1r u_\theta.$$ Conversely, if the polar equations hold, substitute $v_\theta=ru_r$ and $v_r=-u_\theta/r$ into the inverted formulas: $$v_y=\sin\theta\,v_r+\tfrac{\cos\theta}{r}v_\theta=-\tfrac{\sin\theta}{r}u_\theta+\cos\theta\,u_r=u_x,$$ $$v_x=\cos\theta\,v_r-\tfrac{\sin\theta}r v_\theta=-\tfrac{\cos\theta}{r}u_\theta-\sin\theta\,u_r=-u_y.$$ Theorem 2.4(3) now applies. For the derivative, $$f'=u_x+iv_x=\cos\theta\,(u_r+iv_r)-\tfrac{\sin\theta}{r}(u_\theta+iv_\theta),$$ and the polar equations give $u_\theta+iv_\theta=-rv_r+iru_r=ir(u_r+iv_r)$. Hence $$f'=(\cos\theta-i\sin\theta)(u_r+iv_r)=e^{-i\theta}(u_r+iv_r).$$ ∎

Applications. (i) On the cut plane $\mathbb{C}\setminus(-\infty,0]$, $\operatorname{Log}z=\ln r+i\theta$ with $-\pi\lt\theta\lt\pi$: $u_r=\frac1r=\frac1rv_\theta$ and $v_r=0=-\frac1ru_\theta$, so $\operatorname{Log}$ is analytic with $(\operatorname{Log}z)'=e^{-i\theta}\cdot\frac1r=\frac1z$ — a second proof of Theorem 1.27(2). (ii) For real $\alpha$, the principal power $z^\alpha=r^\alpha e^{i\alpha\theta}$ has $u=r^\alpha\cos\alpha\theta$, $v=r^\alpha\sin\alpha\theta$; then $u_r=\alpha r^{\alpha-1}\cos\alpha\theta=\frac1rv_\theta$ and $v_r=\alpha r^{\alpha-1}\sin\alpha\theta=-\frac1ru_\theta$, so $z^\alpha$ is analytic on the cut plane with derivative $e^{-i\theta}\alpha r^{\alpha-1}e^{i\alpha\theta}=\alpha z^{\alpha}/z$. (iii) For $\bar z=re^{-i\theta}$: $u_r=\cos\theta$ but $\frac1rv_\theta=-\cos\theta$, and $v_r=-\sin\theta$ but $-\frac1ru_\theta=\sin\theta$; the two equations would need $\cos\theta=\sin\theta=0$, so $\bar z$ is differentiable nowhere — as in Example 2.

Analytic Functions and Their Rigidity

📘 Definition 2.4 — Analytic, holomorphic and entire functions

A function $f$ is analytic at $z_0$ if it is complex differentiable at every point of some disc $D(z_0,r)$, $r\gt0$. It is analytic on an open set $U$ if it is differentiable at every point of $U$ (equivalently, analytic at every point of $U$). Holomorphic is a synonym for analytic. A function analytic on all of $\mathbb{C}$ is entire.

A point $z_0$ at which $f$ is not analytic, but such that every disc $D(z_0,r)$ contains points where $f$ is analytic, is a singular point (singularity) of $f$. For example $0$ is a singular point of $1/z$, and every point of $(-\infty,0]$ is a singular point of $\operatorname{Log}z$.

"Analytic at a point" is a condition on a whole neighbourhood. So $|z|^2$, differentiable at $0$ only, is analytic nowhere; $x^2+iy^2$, differentiable on a line, is analytic nowhere. Polynomials, $e^z$, $\sin z$, $\cos z$, $\sinh z$, $\cosh z$ are entire; rational functions are analytic off the zeros of the denominator; $\operatorname{Log}z$ and $z^\alpha$ are analytic on the cut plane. (The name "analytic" — locally a sum of a power series — is justified in Chapter 3, where we prove that every function differentiable on a disc is the sum of its Taylor series there.)

The CR equations make analytic functions remarkably rigid: the real part alone, or the modulus alone, cannot vary without the whole function varying in a prescribed way.

📐 Theorem 2.6 — Rigidity of analytic functions
Let $f=u+iv$ be analytic on a domain $D$.
  1. If $f'(z)=0$ for all $z\in D$, then $f$ is constant on $D$.
  2. If any one of the following holds on $D$, then $f$ is constant: (i) $\operatorname{Re}f$ is constant; (ii) $\operatorname{Im}f$ is constant; (iii) $|f|$ is constant; (iv) $f(D)$ is contained in a straight line; (v) $\bar f$ is also analytic on $D$.

Proof. (1) By Theorem 2.3, $0=f'=u_x+iv_x=v_y-iu_y$, so all four partial derivatives of $u$ and $v$ vanish on $D$. On any horizontal segment in $D$, $u$ and $v$ are functions of $x$ alone with zero derivative, hence constant (one-variable mean value theorem); likewise on vertical segments. Since $D$ is a domain, any two points of $D$ are joined by a path in $D$ made of horizontal and vertical segments (Definition 2.1), so $u$ and $v$ take the same values at both points.

(2)(i) If $u$ is constant then $u_x=u_y=0$, and by CR $v_y=u_x=0$, $v_x=-u_y=0$. So $f'=u_x+iv_x=0$ and (1) applies. (ii) is the same with the roles exchanged. (iii) If $|f|=0$ we are done. Otherwise $u^2+v^2=c^2$ with $c\gt0$; differentiating, $uu_x+vv_x=0$ and $uu_y+vv_y=0$. Substitute the CR equations $u_y=-v_x$, $v_y=u_x$ into the second: $$uu_x+vv_x=0,\qquad vu_x-uv_x=0.$$ This is a linear system for $(u_x,v_x)$ with determinant $-u^2-v^2=-c^2\ne0$, so $u_x=v_x=0$, $f'=0$, and (1) applies. (iv) A line is a set $\{w:\operatorname{Re}(\beta w)=c\}$ with $\beta\ne0$ and $c$ real; then $g=\beta f$ is analytic with constant real part, so $g$ and hence $f$ is constant by (i). (v) If $\bar f$ is analytic, so is $f+\bar f=2u$, an analytic function with imaginary part $0$; by (ii) it is constant, so $u$ is constant and (i) applies. ∎

✏️ Example 5 — Prove or disprove: rigidity statements
(a) Prove: if $f=u+iv$ is analytic on a domain $D$ and $v=u^2$ on $D$, then $f$ is constant.
(b) Prove: if $f$ is analytic on a domain $D$ and $f(D)$ lies on the circle $|w-1|=2$, then $f$ is constant.
(c) Disprove: "if $f$ is analytic on an open set $U$ and $|f|$ is constant on $U$, then $f$ is constant."
(a) Differentiate $v_x=2uu_x$ and $v_y=2uu_y$. By CR, $u_x=v_y=2uu_y$ and $u_y=-v_x=-2uu_x$.
(a) Eliminate Substituting the second into the first: $u_x=2u(-2uu_x)=-4u^2u_x$, so $u_x(1+4u^2)=0$ and $u_x=0$ (since $1+4u^2\gt0$). Then $u_y=-2uu_x=0$, so $u$ is constant and $f$ is constant by Theorem 2.6(2)(i).
(b) $g=f-1$ is analytic on $D$ with $|g|=2$ constant, so $g$ is constant by Theorem 2.6(2)(iii), and so is $f$.
(c) False — connectedness matters Let $U=D(0,1)\cup D(3,1)$ and $f=1$ on $D(0,1)$, $f=-1$ on $D(3,1)$. Then $f$ is analytic on $U$ ($f'=0$), $|f|=1$, but $f$ is not constant. Theorem 2.6 gives only that $f$ is constant on each connected component — "locally constant".

Harmonic Functions and Harmonic Conjugates

📘 Definition 2.5 — Harmonic functions and harmonic conjugates
A real function $u$ on an open set $U\subseteq\mathbb{R}^2$ is harmonic if it has continuous second partial derivatives and satisfies Laplace's equation $$\Delta u=u_{xx}+u_{yy}=0\quad\text{on }U.$$ If $u$ and $v$ are harmonic on $U$ and $f=u+iv$ is analytic on $U$ (that is, $u,v$ satisfy the CR equations), then $v$ is called a harmonic conjugate of $u$ on $U$.
📐 Theorem 2.7 — Real and imaginary parts of analytic functions are harmonic
Let $f=u+iv$ be analytic on an open set $U$. Then:
  1. $u$ and $v$ are harmonic on $U$; $v$ is a harmonic conjugate of $u$, and $-u$ is a harmonic conjugate of $v$.
  2. $\nabla u\cdot\nabla v=0$ and $|\nabla u|=|\nabla v|=|f'|$ at every point. Hence at a point where $f'\ne0$, the level curves $u=c_1$ and $v=c_2$ through that point cross at right angles.

Proof. We use a fact proved in §2.2 (Theorem 2.18): the derivative of an analytic function is again analytic. Applying it repeatedly, $f$ has derivatives of all orders, so $u$ and $v$ have continuous partial derivatives of all orders (by Theorem 2.3 applied to $f',f'',\dots$, e.g. $f'=u_x+iv_x$ and $f''=u_{xx}+iv_{xx}$). In particular mixed partials commute. Then, by CR, $$u_{xx}=(v_y)_x=(v_x)_y=(-u_y)_y=-u_{yy},$$ so $\Delta u=0$; similarly $v_{xx}=(-u_y)_x=-(u_x)_y=-(v_y)_y=-v_{yy}$. Since $-if=v-iu$ is analytic, $-u$ is a harmonic conjugate of $v$. For (2): $\nabla u\cdot\nabla v=u_xv_x+u_yv_y=u_xv_x-v_xu_x=0$, and $|\nabla v|^2=v_x^2+v_y^2=u_y^2+u_x^2=|\nabla u|^2=|f'|^2$. The gradients are normal to the level curves, so when they are nonzero and perpendicular, the level curves are perpendicular. ∎

Note the asymmetry: if $v$ is a harmonic conjugate of $u$, then $u$ is a harmonic conjugate of $v$ only when both are constant — the correct statement is that $-u$ is a conjugate of $v$. (If $u+iv$ and $v+iu$ were both analytic, so would be their difference $(u-v)(1-i)$, which has constant argument, hence is constant by Theorem 2.6.)

Interactive 2 — Level Curves of $u$ and $v$ Meet at Right Angles

The red curves are level curves $u=c$ of $u=\operatorname{Re}f$, the blue ones level curves $v=c$ of $v=\operatorname{Im}f$. A probe point travels round a loop (press Play, or drag the slider); at the probe the arrows show $\nabla u$ (red) and $\nabla v$ (blue). For an analytic $f$ the arrows are always perpendicular and of equal length $|f'|$ — the CR equations in pictures — except where $f'=0$. The last option is not analytic: compare.

probe z—
|∇u|—
|∇v|—
angle between ∇u, ∇v—

Conversely, given a harmonic $u$, can we find $v$? Locally always; globally only if the domain has no holes.

📐 Theorem 2.8 — Existence and uniqueness of harmonic conjugates
  1. If $u$ is harmonic on a disc $D$ (or on all of $\mathbb{C}$), then $u$ has a harmonic conjugate on $D$. The same holds on every simply connected domain (proved in §2.2, after Theorem 2.15).
  2. On a domain, any two harmonic conjugates of $u$ differ by a real constant.
  3. On a domain that is not simply connected a harmonic conjugate need not exist: $u=\ln|z|$ is harmonic on $\mathbb{C}\setminus\{0\}$ but has no harmonic conjugate there.

Proof. (1) Let $(x_0,y_0)$ be the centre of $D$. For $(x,y)\in D$ the path from $(x_0,y_0)$ horizontally to $(x,y_0)$ and then vertically to $(x,y)$ stays in $D$ (each point of it is at least as close to the centre as $(x,y)$). Define $$v(x,y)=\int_{y_0}^{y}u_x(x,s)\,ds-\int_{x_0}^{x}u_y(t,y_0)\,dt.$$ By the fundamental theorem of calculus, $v_y(x,y)=u_x(x,y)$. Differentiating under the integral sign (legitimate because $u_{xx}$ is continuous), $$v_x(x,y)=\int_{y_0}^{y}u_{xx}(x,s)\,ds-u_y(x,y_0)=-\int_{y_0}^{y}u_{yy}(x,s)\,ds-u_y(x,y_0)=-u_y(x,y).$$ So $u,v$ have continuous first partials satisfying CR, $f=u+iv$ is analytic by Theorem 2.4(3), and $v$ is harmonic by Theorem 2.7. On $\mathbb{C}$ the same formula works for every $(x,y)$.

(2) If $v_1,v_2$ are harmonic conjugates of $u$, then $(u+iv_1)-(u+iv_2)=i(v_1-v_2)$ is analytic with real part $0$, hence constant (Theorem 2.6).

(3) $\ln|z|=\frac12\ln(x^2+y^2)$ is harmonic (it is $\operatorname{Re}\operatorname{Log}z$ near each point off the cut, and a direct computation works everywhere: $u_{xx}=\frac{y^2-x^2}{(x^2+y^2)^2}=-u_{yy}$). Suppose $v$ were a harmonic conjugate on $\mathbb{C}\setminus\{0\}$. On the cut plane, $\operatorname{Arg}z$ is also a harmonic conjugate of $\ln|z|$, so by (2), $v=\operatorname{Arg}z+c$ there. Then as $z$ approaches a point $x\lt0$ from above, $v\to\pi+c$, and from below $v\to-\pi+c$, contradicting the continuity of $v$ at $x$. ∎

🧭 Problem-solving strategy — from $u$ to $f$
  1. Check first that $u$ is harmonic. If $\Delta u\ne0$, no analytic $f$ has real part $u$ — whatever the problem seems to suggest.
  2. Recognise. Many harmonic functions are real parts of familiar functions: $x^2-y^2=\operatorname{Re}z^2$, $xy=\operatorname{Re}\left(-\tfrac i2z^2\right)$, $e^x\cos y=\operatorname{Re}e^z$, $\sin x\cosh y=\operatorname{Re}\sin z$, $\frac{x}{x^2+y^2}=\operatorname{Re}\frac1z$, $\ln|z|=\operatorname{Re}\operatorname{Log}z$.
  3. Integrate the CR equations. $v_y=u_x$ gives $v=\int u_x\,dy+\varphi(x)$; then $v_x=-u_y$ determines $\varphi'(x)$, and $\varphi$ up to a constant.
  4. Milne–Thomson (Theorem 2.9): $f'(z)=u_x(z,0)-iu_y(z,0)$, then integrate in $z$. Fastest when $u$ is a polynomial or built from $e^x$, $\sin$, $\cos$.
  5. Given $u-v$ or $u+v$: $(1+i)f=(u-v)+i(u+v)$, so $u-v$ is the real part and $u+v$ the imaginary part of the analytic function $(1+i)f$. Find it, then divide by $1+i$.
  6. Fix the constant from the given value (such as $f(0)$); a real part determines $f$ only up to an added imaginary constant $iC$.
📐 Theorem 2.9 — The Milne–Thomson method
Let $f=u+iv$ be analytic on a domain $D$ that contains a segment of the real axis, and suppose that $u_x$ and $u_y$ are given by expressions in $x,y$ (polynomials, exponentials, trigonometric functions, quotients of these…) that remain meaningful, and analytic in $z$, when $x$ is replaced by a complex variable $z$ and $y$ by $0$. Then $$f'(z)=u_x(z,0)-i\,u_y(z,0),\qquad\text{so}\qquad f(z)=\int\big[u_x(z,0)-iu_y(z,0)\big]\,dz+iC\quad(C\in\mathbb{R}).$$ Likewise, from the imaginary part: $f'(z)=v_y(z,0)+i\,v_x(z,0)$.

Proof. For real $x$ in the segment, Theorem 2.3 and the CR equations give $$f'(x)=u_x(x,0)+iv_x(x,0)=u_x(x,0)-iu_y(x,0).$$ So the analytic functions $f'(z)$ and $g(z)=u_x(z,0)-iu_y(z,0)$ agree on a segment of the real axis, and by the identity theorem (§2.3: two analytic functions on a domain that agree on a set with a limit point in the domain agree everywhere) they agree on $D$. The formula with $v$ follows from $f'=v_y+iv_x$ (Theorem 2.3). Integrating gives $f$ up to a constant, which must be purely imaginary since $\operatorname{Re}f=u$ is fixed. ∎

✏️ Example 6 — Prove or disprove: which functions are real parts of analytic functions?
Decide whether each $u$ is the real part of an analytic function on the stated domain: (a) $u=x^2-y^2+x$ on $\mathbb{C}$; (b) $u=x^2+y^2$ on $\mathbb{C}$; (c) $u=\ln(x^2+y^2)$ on $\mathbb{C}\setminus\{0\}$, and on $\mathbb{C}\setminus(-\infty,0]$; (d) $u=e^{x^2-y^2}\cos2xy$ on $\mathbb{C}$; (e) $u^2$, where $u$ is a nonconstant harmonic function.
(a) Yes $u=\operatorname{Re}(z^2+z)$; $f=z^2+z+iC$.
(b) No $\Delta u=2+2=4\ne0$: not harmonic, so not the real part of any analytic function (Theorem 2.7).
(c) No, then yes $u=2\ln|z|$ is harmonic on $\mathbb{C}\setminus\{0\}$ but has no harmonic conjugate there (Theorem 2.8(3)). On the cut plane it is $\operatorname{Re}(2\operatorname{Log}z)$. The answer depends on the domain.
(d) Yes $e^{z^2}=e^{x^2-y^2}e^{2ixy}$, so $u=\operatorname{Re}e^{z^2}$.
(e) No $\Delta(u^2)=2u\,\Delta u+2|\nabla u|^2=2|\nabla u|^2$. If $u^2$ were harmonic, $\nabla u=0$ on the domain and $u$ would be constant. (Products of harmonic functions are not harmonic in general — in contrast with analytic functions.)
✏️ Example 7 — Harmonic conjugates by integration and by Milne–Thomson
(a) Show that $u=e^x(x\cos y-y\sin y)$ is harmonic on $\mathbb{C}$, find a harmonic conjugate by integrating the CR equations, and identify $f=u+iv$; then repeat with Milne–Thomson.
(b) Find the analytic function $f=u+iv$ with $u-v=x^3-3x^2y-3xy^2+y^3-2x-2y$ and $f(0)=0$.
(a) Harmonic $u_x=e^x(x\cos y-y\sin y+\cos y)$, $u_{xx}=e^x(x\cos y-y\sin y+2\cos y)$; $u_y=e^x(-x\sin y-\sin y-y\cos y)$, $u_{yy}=e^x(-x\cos y-2\cos y+y\sin y)$. The sum is $0$.
(a) Integrate $v_y=u_x$ $v=\displaystyle\int e^x(x\cos y-y\sin y+\cos y)\,dy=e^x\big(x\sin y+(y\cos y-\sin y)+\sin y\big)+\varphi(x)=e^x(x\sin y+y\cos y)+\varphi(x)$.
(a) Use $v_x=-u_y$ $v_x=e^x(x\sin y+y\cos y+\sin y)+\varphi'(x)$ and $-u_y=e^x(x\sin y+\sin y+y\cos y)$, so $\varphi'=0$: $$v=e^x(x\sin y+y\cos y)+C,\qquad f=u+iv=ze^z+iC,$$ since $ze^z=(x+iy)e^x(\cos y+i\sin y)$ has exactly these real and imaginary parts.
(a) Milne–Thomson $u_x(z,0)=e^z(z+1)$, $u_y(z,0)=e^z(-0-0-0)=0$. So $f'(z)=(z+1)e^z$ and $f=ze^z+iC$ — two lines instead of six.
(b) Rotate $F=(1+i)f=(u-v)+i(u+v)$ is analytic with real part $U=x^3-3x^2y-3xy^2+y^3-2x-2y$. Milne–Thomson: $U_x=3x^2-6xy-3y^2-2$ and $U_y=-3x^2-6xy+3y^2-2$, so $$F'(z)=U_x(z,0)-iU_y(z,0)=(3z^2-2)-i(-3z^2-2)=(1+i)(3z^2)+(-2+2i).$$
(b) Integrate and divide $F=(1+i)z^3+(-2+2i)z+c$, and $F(0)=(1+i)f(0)=0$ gives $c=0$. Since $\frac{-2+2i}{1+i}=\frac{(-2+2i)(1-i)}{2}=2i$, $$f(z)=z^3+2iz.$$
Check $z^3+2iz$ has $u=x^3-3xy^2-2y$ and $v=3x^2y-y^3+2x$, and $u-v=x^3-3x^2y-3xy^2+y^3-2x-2y$. ✓
⚠️ Counterexamples and pitfalls
  1. CR at a point do not give differentiability. $\sqrt{|xy|}$ and $\frac{x^3+iy^3}{x^2+y^2}$ satisfy CR at $0$ but are not differentiable there (Example 3). You also need real differentiability — e.g. continuous partials (Theorem 2.4).
  2. Even CR everywhere is not enough without some regularity. $f(z)=e^{-1/z^4}$, $f(0)=0$, is analytic on $\mathbb{C}\setminus\{0\}$ and satisfies CR at $0$ too (on both axes $f=e^{-1/t^4}$, so all partials at $0$ are $0$), yet it is not even continuous at $0$: on the line $z=te^{i\pi/4}$, $z^4=-t^4$ and $|f|=e^{1/t^4}\to\infty$. (The Looman–Menchoff theorem: a continuous $f$ whose partials exist and satisfy CR everywhere on $U$ is analytic on $U$.)
  3. Differentiable at a point $\ne$ analytic at the point. $|z|^2$ is differentiable only at $0$ and is analytic nowhere; $x^2+iy^2$ is differentiable exactly on the line $y=x$ and analytic nowhere.
  4. Smooth in $\mathbb{R}^2$ does not mean complex differentiable. $\bar z$, $\operatorname{Re}z$, $|z|^2$, $e^{\bar z}$ are $C^\infty$ maps of the plane; the first, second and fourth are differentiable nowhere. In particular $\bar z$ is continuous everywhere and differentiable nowhere — no Weierstrass-type construction needed.
  5. A real-valued function can be differentiable only where its derivative is $0$ (its derivative along the imaginary direction would be imaginary). So a nonconstant real-valued function is never analytic on a domain.
  6. Rigidity needs a domain. On a disconnected open set, $|f|$ or $\operatorname{Re}f$ constant gives only "constant on each component" (Example 5(c)).
  7. Harmonic conjugates are not symmetric. If $v$ is a conjugate of $u$, then $-u$ (not $u$) is a conjugate of $v$. $u=x^2-y^2$ has conjugate $2xy$, but $x^2-y^2$ is not a conjugate of $2xy$.
  8. Harmonic conjugates can fail to exist globally: $\ln|z|$ on $\mathbb{C}\setminus\{0\}$ (Theorem 2.8(3)). On a disc or any simply connected domain they always exist.
  9. Harmonic functions do not form a ring: $x$ is harmonic but $x^2$ is not; $u^2$ is harmonic only if $u$ is constant. (Sums and real multiples of harmonic functions are harmonic.)
  10. Not every function of $x,y$ that "looks complex" is analytic. Before using $f'=u_x+iv_x$ or Milne–Thomson, confirm the CR equations; e.g. $x^2-y^2+i(2xy+x)$ is not analytic.
  11. The polar CR equations need $r\ne0$, and $u,v$ there are functions of $(r,\theta)$ on a set where $\theta$ is a continuous function of $z$ (a cut plane, a sector).

Exercises

I
Limits and complex differentiability.
  • 1 Evaluate or show that the limit does not exist: (a) $\displaystyle\lim_{z\to0}\frac{(\operatorname{Re}z)^2}{|z|^2}$; (b) $\displaystyle\lim_{z\to1+i}\frac{z^2-2i}{z-1-i}$; (c) $\displaystyle\lim_{z\to\infty}\frac{z^2+1}{2iz^2-z}$.
  • 2 Prove from Definition 2.3 that $(z^2)'=2z$ and $\left(\frac1z\right)'=-\frac1{z^2}$ for $z\ne0$.
  • 3 Show from the definition that $f(z)=\operatorname{Im}z$ is differentiable nowhere.
  • 4 Show that $f(z)=\bar z^{\,2}$ is differentiable at $0$ and nowhere else.
  • 5 Use the Wirtinger derivative to find where $f(z)=z|z|^2$ is differentiable, and find $f'$ there.
  • 6 Show that if $f$ is differentiable at $z_0$, then $g(z)=\overline{f(\bar z)}$ is differentiable at $\bar z_0$ with $g'(\bar z_0)=\overline{f'(z_0)}$.
  • 7 Prove that if a real-valued function $f$ is differentiable at $z_0$, then $f'(z_0)=0$.
  • 8 Find all points where $f(z)=\left(|z|^2-1\right)^2$ is differentiable.
1 (a) Along $z=te^{i\theta}$ the quotient is $\cos^2\theta$: $1$ on the real axis, $0$ on the imaginary axis — no limit. (b) $(1+i)^2=2i$, so $z^2-2i=(z-1-i)(z+1+i)$ and the limit is $2+2i$. (c) With $z=1/w$: $\frac{1+w^2}{2i-w}\to\frac1{2i}=-\frac i2$.
2 $\frac{(z+h)^2-z^2}{h}=2z+h\to2z$. $\frac{1}{h}\left(\frac1{z+h}-\frac1z\right)=\frac{-1}{z(z+h)}\to-\frac1{z^2}$ (for $|h|\lt|z|$, $z+h\ne0$).
3 $\frac{\operatorname{Im}(z+h)-\operatorname{Im}z}{h}=\frac{\operatorname{Im}h}{h}$: $0$ for real $h$ and $\frac{t}{it}=-i$ for $h=it$. No limit.
4 $\frac{(\bar z_0+\bar h)^2-\bar z_0^{\,2}}{h}=2\bar z_0\frac{\bar h}{h}+\frac{\bar h^2}{h}$. The last term has modulus $|h|\to0$. At $z_0=0$ the limit is $0$; for $z_0\ne0$ the first term is $\pm2\bar z_0$ along real/imaginary $h$, so no limit.
5 $f=z^2\bar z$, $\partial f/\partial\bar z=z^2$, which vanishes only at $z=0$. The partials are continuous, so $f$ is differentiable exactly at $0$, with $f'(0)=\partial f/\partial z\,(0)=2z\bar z\big|_{0}=0$.
6 $\dfrac{g(\bar z_0+k)-g(\bar z_0)}{k}=\overline{\left(\dfrac{f(z_0+\bar k)-f(z_0)}{\bar k}\right)}$, and as $k\to0$, $\bar k\to0$, so the quotient tends to $\overline{f'(z_0)}$.
7 Along real $h$ the quotient is real, so $f'(z_0)\in\mathbb{R}$; along $h=it$ it is $\frac{\text{real}}{it}\in i\mathbb{R}$, so $f'(z_0)\in i\mathbb{R}$. Hence $f'(z_0)=0$. (Equivalently: $v=0$, so CR give $u_x=u_y=0$.)
8 $f=(z\bar z-1)^2$ has continuous partials and $\partial f/\partial\bar z=2(z\bar z-1)z$, which vanishes iff $z=0$ or $|z|=1$. So $f$ is differentiable exactly at $0$ and on the unit circle (with $f'=0$ there, as Part 7 predicts), and analytic nowhere.
II
The Cauchy–Riemann equations.
  • 1 Verify the CR equations for $f(z)=z^3$ and for $f(z)=\cos z$, and compute $f'$ from $f'=u_x+iv_x$.
  • 2 Find all points where $f=x^3+3iy$ is differentiable. Is it analytic anywhere?
  • 3 Find real constants $a,b,c,d$ such that $f=x^2+axy+by^2+i(cx^2+dxy+y^2)$ is entire, and express $f$ in terms of $z$.
  • 4 Use the polar CR equations to show that $f(re^{i\theta})=r^n(\cos n\theta+i\sin n\theta)$, $n\in\mathbb{Z}$, is analytic on $\mathbb{C}\setminus\{0\}$, and find $f'$.
  • 5 Show that $f(z)=e^{\bar z}$ is differentiable nowhere.
  • 6 Where is $f(z)=|z|^2+2z$ differentiable? Find the derivative there.
  • 7 Let $f(z)=\dfrac{x^3+2y^3+i(y^3-2x^3)}{x^2+y^2}$ for $z\ne0$, $f(0)=0$. Show that $f$ satisfies the CR equations at $0$ but is not differentiable at $0$.
  • 8 For $f(z)=e^{-1/z^4}$ ($z\ne0$), $f(0)=0$ (pitfall 2), show that $f$ satisfies the CR equations at every point of $\mathbb{C}$, and explain why this does not contradict Theorem 2.4.
  • 9 Let $u=\frac{x}{x^2+y^2}$, $v=\frac{-y}{x^2+y^2}$ on $\mathbb{C}\setminus\{0\}$. Verify CR, compute $f'=u_x+iv_x$, and identify $f$.
1 $z^3$: $u=x^3-3xy^2$, $v=3x^2y-y^3$; $u_x=3x^2-3y^2=v_y$, $u_y=-6xy=-v_x$; $f'=3x^2-3y^2+6ixy=3z^2$. $\cos z=\cos x\cosh y-i\sin x\sinh y$: $u_x=-\sin x\cosh y=v_y$, $u_y=\cos x\sinh y=-v_x$; $f'=-\sin x\cosh y-i\cos x\sinh y=-\sin z$.
2 $u_x=3x^2$, $v_y=3$, $u_y=0=-v_x$. CR $\iff x=\pm1$; partials are continuous, so $f$ is differentiable exactly on the lines $x=1$ and $x=-1$, with $f'=3$. These lines have no interior: analytic nowhere.
3 $u_x=2x+ay=v_y=dx+2y$ forces $d=2$, $a=2$; $u_y=ax+2by=-v_x=-2cx-dy$ forces $a=-2c$, $2b=-d$. So $a=2$, $b=-1$, $c=-1$, $d=2$, and $f=x^2+2xy-y^2+i(-x^2+2xy+y^2)=(1-i)z^2$.
4 $u=r^n\cos n\theta$, $v=r^n\sin n\theta$: $u_r=nr^{n-1}\cos n\theta=\frac1rv_\theta$ and $v_r=nr^{n-1}\sin n\theta=-\frac1ru_\theta$. $f'=e^{-i\theta}nr^{n-1}e^{in\theta}=nz^{n-1}$. (Here $f(z)=z^n$, which needs no cut since $n\in\mathbb{Z}$.)
5 $e^{\bar z}=e^x\cos y-ie^x\sin y$: $u_x=e^x\cos y$, $v_y=-e^x\cos y$, so CR need $\cos y=0$; $u_y=-e^x\sin y$, $-v_x=e^x\sin y$, so CR need $\sin y=0$. Both cannot hold. (Wirtinger: $\partial e^{\bar z}/\partial\bar z=e^{\bar z}\ne0$.)
6 $\partial f/\partial\bar z=z$, zero only at $0$; partials continuous, so differentiable only at $0$, with $f'(0)=\partial f/\partial z(0)=(\bar z+2)\big|_0=2$.
7 On the real axis ($y=0$) $f=\frac{x^3-2ix^3}{x^2}=x(1-2i)$: $u_x=1$, $v_x=-2$. On the imaginary axis ($x=0$) $f=\frac{2y^3+iy^3}{y^2}=y(2+i)$: $u_y=2$, $v_y=1$. So $u_x=v_y=1$ and $u_y=-v_x=2$: CR hold at $0$. Along $h=t(1+i)$ ($x=y=t$): $f(h)=\frac{3t^3-it^3}{2t^2}=\frac{t(3-i)}2$ and $\frac{f(h)}{h}=\frac{3-i}{2(1+i)}=\frac{1-2i}{2}$, while along the real axis the quotient is $1-2i$. Not differentiable at $0$.
8 Off $0$, $f$ is analytic (composition of analytic functions), so CR hold there. At $0$: $f(t)=f(it)=e^{-1/t^4}$ for real $t\ne0$, and $e^{-1/t^4}/t\to0$, so all partials at $0$ are $0$ and CR hold. No contradiction: Theorem 2.4 also requires real differentiability (e.g. continuity of the partials) at $0$, and $f$ is not even continuous there.
9 $u_x=\frac{y^2-x^2}{(x^2+y^2)^2}=v_y$ and $u_y=\frac{-2xy}{(x^2+y^2)^2}=-v_x$ (with $v_x=\frac{2xy}{(x^2+y^2)^2}$). $f'=\frac{y^2-x^2+2ixy}{(x^2+y^2)^2}=\frac{-\bar z^{\,2}}{|z|^4}=-\frac1{z^2}$. And $u+iv=\frac{x-iy}{x^2+y^2}=\frac{\bar z}{|z|^2}=\frac1z$.
III
Harmonic functions, conjugates and Milne–Thomson.
  • 1 Show that $u=x^3-3xy^2+3x^2-3y^2+1$ is harmonic, find a harmonic conjugate $v$, and find $f=u+iv$.
  • 2 Find the analytic $f$ with $\operatorname{Re}f=\sin x\cosh y$ and $f(0)=0$.
  • 3 Find a harmonic conjugate of $u=\dfrac{x}{x^2+y^2}$ on $\mathbb{C}\setminus\{0\}$.
  • 4 Find the real constant $a$ for which $u=x^3+axy^2$ is harmonic, and then a harmonic conjugate.
  • 5 Find the analytic $f$ with $\operatorname{Im}f=e^{-y}\sin x$ and $f(0)=1$.
  • 6 Find the analytic $f=u+iv$ with $u+v=x^2-y^2+2xy+x+y$ and $f(0)=0$.
  • 7 Show that if $u$ is harmonic on $U$ then $g=u_x-iu_y$ is analytic on $U$ (use only that $u$ has continuous second partials).
  • 8 Show that if $u$ and $u^2$ are both harmonic on a domain, then $u$ is constant.
  • 9 Describe the level curves of $u=x^2-y^2$ and $v=2xy$. Show that they are orthogonal at every point except $0$, and find the angle between the curves $u=0$ and $v=0$ at $0$.
1 $u_{xx}=6x+6$, $u_{yy}=-6x-6$: harmonic. Milne–Thomson: $u_x(z,0)=3z^2+6z$, $u_y(z,0)=0$, so $f'=3z^2+6z$ and $f=z^3+3z^2+1+iC$ (the constant $1$ matches $u(0,0)=1$). Then $v=\operatorname{Im}f=3x^2y-y^3+6xy+C$.
2 $f'(z)=u_x(z,0)-iu_y(z,0)=\cos z-i\cdot0$, so $f=\sin z+iC$; $f(0)=0$ gives $C=0$: $f=\sin z$ (and $v=\cos x\sinh y$).
3 $u=\operatorname{Re}\frac1z$ (Exercise II.9), so $v=-\frac{y}{x^2+y^2}+C$. (Here the domain is not simply connected, yet a conjugate exists — Theorem 2.8(3) says only that it may fail.)
4 $\Delta u=6x+2ax=0$ for all $x$ iff $a=-3$. Then $u=\operatorname{Re}z^3$ and $v=3x^2y-y^3+C$.
5 $f'(z)=v_y(z,0)+iv_x(z,0)=-\sin z+i\cos z=i(\cos z+i\sin z)=ie^{iz}$, so $f=e^{iz}+C$ with $C$ real; $f(0)=1+C=1$ gives $f=e^{iz}$. Check: $e^{iz}=e^{-y}(\cos x+i\sin x)$.
6 $F=(1+i)f$ has $\operatorname{Im}F=V=u+v$. $V_y=-2y+2x+1$, $V_x=2x+2y+1$, so $F'(z)=V_y(z,0)+iV_x(z,0)=(1+i)(2z+1)$, $F=(1+i)(z^2+z)+c$, and $f=z^2+z+c'$ with $f(0)=0$: $f=z^2+z$. Check: $u=x^2-y^2+x$, $v=2xy+y$.
7 With $U=u_x$, $V=-u_y$: $U_x=u_{xx}$ and $V_y=-u_{yy}=u_{xx}$; $U_y=u_{xy}$ and $-V_x=u_{yx}=u_{xy}$. The partials of $U,V$ are continuous and satisfy CR, so $g$ is analytic (Theorem 2.4(3)).
8 $\Delta(u^2)=2u\Delta u+2(u_x^2+u_y^2)=2|\nabla u|^2$. If this is $0$, then $u_x=u_y=0$ on the domain and $u$ is constant (as in Theorem 2.6(1)).
9 $u=c$: hyperbolas with asymptotes $y=\pm x$ (for $c\ne0$); $v=c$: hyperbolas with the axes as asymptotes. $f=z^2$, $f'=2z\ne0$ off $0$, so they are orthogonal there (Theorem 2.7). At $0$, $u=0$ is the pair of lines $y=\pm x$ and $v=0$ is the pair of axes: they meet at $45^\circ$. At a zero of $f'$ of order $1$ angles are halved — see Interactive 2 with $z^2$ and Chapter 4.
IV
Proofs.
  • 1 Let $f=u+iv$ be analytic on a domain $D$ and suppose $au+bv=c$ on $D$ for real constants $a,b,c$ with $(a,b)\ne(0,0)$. Prove that $f$ is constant.
  • 2 Prove the operator identity $\Delta=4\dfrac{\partial^2}{\partial z\,\partial\bar z}$ (on $C^2$ functions), and deduce that $\Delta|f|^2=4|f'|^2$ for $f$ analytic (using that $f'$ is analytic, §2.2).
  • 3 Let $f$ and $g$ be analytic on a domain $D$ with $|f|^2+|g|^2$ constant. Prove that $f$ and $g$ are constant.
  • 4 Let $f$ be analytic on a domain $D$ that is symmetric about the real axis. Prove that $g(z)=\overline{f(\bar z)}$ is analytic on $D$.
  • 5 Let $f=u+iv$ be analytic on $\mathbb{C}$ with $u(x,y)=\varphi(x)$ depending on $x$ only. Prove that $f(z)=az+b$ with $a$ real.
  • 6 Let $f$ be analytic and nowhere zero on an open set $U$. Prove that $\ln|f|$ is harmonic on $U$.
1 $au+bv=\operatorname{Re}\big((a-ib)(u+iv)\big)$. So $g=(a-ib)f$ is analytic with constant real part, hence constant (Theorem 2.6), and $a-ib\ne0$ gives $f$ constant. (Equivalently: $f(D)$ lies on a line.)
2 $4\partial_z\partial_{\bar z}=(\partial_x-i\partial_y)(\partial_x+i\partial_y)=\partial_x^2+\partial_y^2$ (mixed terms cancel since $\partial_x\partial_y=\partial_y\partial_x$ on $C^2$ functions). For analytic $f$: $\partial_{\bar z}(f\bar f)=f\,\partial_{\bar z}\bar f=f\,\overline{f'}$ (because $\partial_{\bar z}f=0$ and $\partial_{\bar z}\bar f=\overline{\partial_zf}=\overline{f'}$); then $\partial_z(f\overline{f'})=f'\overline{f'}$, since $\partial_z\overline{f'}=\overline{\partial_{\bar z}f'}=0$. So $\Delta|f|^2=4|f'|^2$.
3 By Part 2, $0=\Delta(|f|^2+|g|^2)=4(|f'|^2+|g'|^2)$, so $f'=g'=0$ on $D$ and both are constant (Theorem 2.6(1)).
4 For $z_0\in D$, $\bar z_0\in D$ and $\frac{g(z_0+h)-g(z_0)}{h}=\overline{\left(\frac{f(\bar z_0+\bar h)-f(\bar z_0)}{\bar h}\right)}\to\overline{f'(\bar z_0)}$ (Exercise I.6). So $g$ is differentiable on the open set $D$.
5 $u$ is harmonic, so $\varphi''(x)=0$ and $\varphi(x)=ax+c$. Then $az+c$ is an analytic function with the same real part, so $f-(az+c)$ has real part $0$ and is a constant $id$ (Theorem 2.6). Hence $f=az+b$ with $b=c+id$ and $a\in\mathbb{R}$.
6 $\ln|f|=\frac12\ln(f\bar f)$. Then $\partial_{\bar z}\ln(f\bar f)=\frac{f\overline{f'}}{f\bar f}=\overline{\left(\frac{f'}{f}\right)}$, and $\partial_z$ of the conjugate of the analytic function $f'/f$ is $0$. By Part 2, $\Delta\ln|f|=2\partial_z\partial_{\bar z}\ln(f\bar f)=0$. (Locally, $\ln|f|=\operatorname{Re}\log f$ for an analytic branch of $\log f$; but no global logarithm is needed.)
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B Let $f(x+iy)=x^3+i(1-y)^3$. Then $f$ is complex differentiable (A) nowhere; (B) only at the point $z=i$; (C) at every point of the line $\operatorname{Im}z=1$; (D) everywhere.

Idea Continuous partials, so differentiable exactly where CR hold (Theorem 2.4).
Compute $u_x=3x^2$, $v_y=-3(1-y)^2$, $u_y=0=-v_x$. CR: $3x^2=-3(1-y)^2$, a sum of squares $=0$: $x=0$, $y=1$. On the line $y=1$, CR still needs $x=0$, so (C) fails.
Answer (B).

E2. CSIR Part B GATE MA For a real constant $k$, let $u(x,y)=2x-x^3+kxy^2$ be harmonic on $\mathbb{R}^2$. A harmonic conjugate of $u$ is (A) $2y-3x^2y+y^3$; (B) $2y+3x^2y-y^3$; (C) $-2y+3x^2y-y^3$; (D) $3x^2y-y^3$.

$k$ $\Delta u=-6x+2kx=0$ for all $x$ forces $k=3$, so $u=2x-x^3+3xy^2=\operatorname{Re}(2z-z^3)$.
Conjugate $v=\operatorname{Im}(2z-z^3)=2y-(3x^2y-y^3)=2y-3x^2y+y^3$. Check one CR equation: $u_x=2-3x^2+3y^2=v_y$. ✓ (C) is $-v$, a conjugate of $-u$; (B) and (D) fail $u_x=v_y$.
Answer (A).

E3. CSIR Part B Let $f=u+iv$ be entire with $u(x,y)=e^x\cos y+x$ and $f(0)=1$. Then $f(i\pi)$ equals (A) $-1+i\pi$; (B) $1+i\pi$; (C) $-1-i\pi$; (D) $i\pi$.

Find $f$ $u=\operatorname{Re}(e^z+z)$, so $f=e^z+z+iC$; $f(0)=1+iC=1$ gives $C=0$.
Evaluate $f(i\pi)=e^{i\pi}+i\pi=-1+i\pi$.
Answer (A).

E4. CSIR Part C Which of the following statements are true? (A) If $f=u+iv$ satisfies the Cauchy–Riemann equations at $z_0$, then $f$ is differentiable at $z_0$. (B) The function $f(z)=z\operatorname{Re}z$ is complex differentiable at exactly one point. (C) If $u,v$ have continuous first partial derivatives on $\mathbb{C}$ and satisfy the Cauchy–Riemann equations everywhere, then $u+iv$ is entire. (D) The function $e^x(\cos y-i\sin y)$ is entire.

(A) False $\sqrt{|xy|}$ satisfies CR at $0$ but is not differentiable there (Example 3).
(B) True CR hold only at $0$ and the partials are continuous (Example 4(b)).
(C) True Theorem 2.4(3).
(D) False It is $e^{\bar z}$, which is differentiable nowhere (Exercise II.5).
Answer (B) and (C).

E5. CSIR Part C GATE MA Which of the following are true? (A) $x^2-y^2+2xy$ is the real part of an entire function. (B) $\ln(x^2+y^2)$ is the real part of a function analytic on $\mathbb{C}\setminus\{0\}$. (C) $xy$ is harmonic on $\mathbb{R}^2$. (D) If $u$ is harmonic on $\mathbb{R}^2$, then so is $u^2$.

(A) True $(1-i)z^2=(x^2-y^2+2xy)+i(-x^2+2xy+y^2)$.
(B) False It would need a harmonic conjugate of $2\ln|z|$ on the punctured plane, which does not exist (Theorem 2.8(3)); a conjugate would be $2\operatorname{Arg}z+c$ off the cut, which jumps by $4\pi$.
(C) True $\Delta(xy)=0$; indeed $xy=\operatorname{Re}\left(-\tfrac i2z^2\right)$.
(D) False $u=x$: $u^2=x^2$ has $\Delta=2$ (Example 6(e)).
Answer (A) and (C).

E6. CSIR Part C Let $f=u+iv$ be analytic on the unit disc $\mathbb{D}=\{|z|\lt1\}$. Which of the following conditions force $f$ to be constant on $\mathbb{D}$? (A) $\operatorname{Re}\big(f(z)^2\big)$ is constant on $\mathbb{D}$. (B) $\overline{f}$ is analytic on $\mathbb{D}$. (C) $u$ is constant on the segment $(-\tfrac12,\tfrac12)$ of the real axis. (D) $|f'|$ is constant on $\mathbb{D}$.

(A) Yes $g=f^2$ is analytic with constant real part, so $g=c$ is constant (Theorem 2.6). If $c=0$, $f\equiv0$. Otherwise $f(z)\in\{s,-s\}$ where $s^2=c$; the sets where $f=s$ and $f=-s$ are disjoint, open (by continuity) and cover the connected set $\mathbb{D}$, so one is empty.
(B) Yes Theorem 2.6(2)(v).
(C) No $f(z)=iz$ has $u=-y$, which is $0$ on the whole real axis, but $f$ is not constant. Constancy of $u$ on a segment is far weaker than on an open set.
(D) No $f(z)=z$ has $|f'|=1$.
Answer (A) and (B).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. The derivative. Definitions 2.1–2.3 and Theorem 2.1 briskly (they repeat real analysis), Example 1(a) to show that direction matters. Theorem 2.2 with the Carathéodory form — it makes the chain rule painless. Example 2 on the board: let the class guess where $|z|^2$ is differentiable before computing. Project Interactive 1 with $\bar z$ and $|z|^2$ at $z_0=1+i$, then at $z_0=0$.
  2. The Cauchy–Riemann equations. Theorem 2.3 with proof; the Wirtinger form as a computational shortcut. Theorem 2.4 with the full proof of (1) and the mean-value argument for (2). Example 3 — return to Interactive 1 with the function $(x^3+iy^3)/(x^2+y^2)$ at $0$: the green dot and purple ring coincide (CR hold) yet the curve refuses to shrink. Example 4, then Theorem 2.5 and the three applications.
  3. Rigidity and harmonic functions. Theorem 2.6 (prove (iii) carefully), Example 5. Definition 2.5, Theorem 2.7 (flag the forward reference to §2.2), Interactive 2. Theorem 2.8 with the explicit integral formula; the $\ln|z|$ counterexample. The strategy box and Milne–Thomson; Examples 6 and 7. Finish with Exam corner E4–E6 as a class quiz.

Discussion questions. (1) $\bar z$ is the simplest possible non-analytic function — it is just a reflection. Why does a reflection fail to be complex differentiable while a rotation succeeds? (2) A real function can be differentiable once but not twice; why is that impossible for a complex function on an open set, and what part of the theory is needed to prove it? (3) If you know $\operatorname{Re}f$ on a disc, how much of $f$ do you know? What if you know only $|f|$?

Misconceptions to watch for. "CR at a point ⇒ differentiable"; confusing "differentiable at $z_0$" with "analytic at $z_0$"; using $f'=u_x+iv_x$ for a function that is not analytic; writing $u$ (instead of $-u$) as the conjugate of $v$; applying Milne–Thomson to a non-harmonic $u$; forgetting that $f$ is determined by $\operatorname{Re}f$ only up to $iC$; thinking that a conjugate always exists on any domain.

Suggested homework. I(1, 4, 5, 7), II(2, 3, 6, 7), III(1, 2, 5, 6, 8), IV(1, 3, 5); Exam corner E1, E2, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. Harmonic functions describe steady temperatures in a metal plate, electrostatic potentials and the pressure field of groundwater. Engineers rarely have a formula — they have boundary measurements and a computer. How well does the simplest numerical method recover a harmonic function from its boundary values, and does the computed solution show the properties proved in this section?

Why it matters. Laplace's equation $\Delta u=0$ is solved millions of times a day: heat-sink design for electronics, seepage under dams, potential flow past aircraft wings, and image-processing tools that "inpaint" missing pixels by harmonic interpolation. The analytic function $f=u+iv$ is also practical: in fluid mechanics $u$ is a velocity potential and $v$ the stream function, whose level curves are the streamlines — orthogonal to the equipotentials, exactly as in Interactive 2.

What to do.

  1. On the unit square, impose the boundary values of $u=e^x\cos y=\operatorname{Re}e^z$. On an $n\times n$ grid ($n=11,21,41$ points per side) replace every interior value by the average of its four neighbours, repeatedly (Jacobi iteration), until the values change by less than $10^{-10}$.
  2. Record the number of iterations and the maximum error against the exact $u$. How does the error change when the grid spacing is halved? How does the iteration count change?
  3. Check the mean value property numerically: average the exact $u$ over a circle of radius $0.4$ about $(0.5,0.5)$ and compare with $u(0.5,0.5)$. (It is proved in §2.2.)
  4. Repeat step 1 with boundary values $x^2-y^2$. Explain why the error is now at the level of the stopping tolerance, whatever the grid.
  5. Compute a discrete harmonic conjugate by integrating $v_y=u_x$, $v_x=-u_y$ with finite differences along the staircase path of Theorem 2.8, and plot level curves of both.

Tools: Python with NumPy and Matplotlib (contour), or any spreadsheet for $n=11$.

Hand in: A table (grid size, iterations, maximum error), the mean-value check, a level-curve picture of $u$ and your discrete $v$, and a paragraph explaining the observed rates.

Going further. Read about successive over-relaxation (SOR), which cuts the iteration count from about $n^2$ to about $n$; about multigrid methods; and about the Kutta–Joukowski theory of lift, where the analytic function $f=u+iv$ of a flow around a wing profile gives the lift force through a contour integral (§2.2).

Instructor note: with tolerance $10^{-10}$ the Jacobi iteration needs about $416$, $1574$ and $5862$ sweeps for $n=11,21,41$ (roughly $\times4$ per halving of the spacing), and the maximum errors are about $1.8\times10^{-4}$, $4.5\times10^{-5}$ and $1.1\times10^{-5}$ — second order, $O(h^2)$. At the centre, $u(0.5,0.5)=e^{0.5}\cos0.5\approx1.446889$, and the circle average agrees to all printed digits. For $x^2-y^2$ the five-point average is exact on quadratics, so only the iteration error remains.

🧪 Self-check quiz

0/5 correct

Q1. The function $f(z)=|z|^2$ is

Q2. If $f=u+iv$ is differentiable at $z_0$, then $f'(z_0)$ equals

Q3. A harmonic conjugate of $u=2xy$ on $\mathbb{R}^2$ is

Q4. Let $f$ be analytic on a domain $D$. Which condition does not force $f$ to be constant?

Q5. The function $u=\ln(x^2+y^2)$ on $\mathbb{C}\setminus\{0\}$ is