All chapters Unit 1 · Complex Analysis

Building analytic functions: harmonic conjugates

Chapter 4 of 15
The hook

Given the real part, find the function

Story

In Chapter 3 you learned to test for analyticity. Given f(z)=u(x,y)+iv(x,y)f(z) = u(x,y) + i\,v(x,y), the Cauchy-Riemann equations decide whether it is analytic, and as a free consequence the real part uu and the imaginary part vv are both harmonic — each one solves Laplace's equation uxx+uyy=0u_{xx} + u_{yy} = 0.

Now flip the question. Suppose somebody hands you only the real part. They write u(x,y)=x2y2u(x, y) = x^2 - y^2 and ask: is there an analytic function whose real part is exactly this? If yes, what is the imaginary part vv? And what is the function f(z)f(z) as an expression in zz?

Three lines of work and the answer is f(z)=z2f(z) = z^2. The imaginary part you needed was v=2xyv = 2xy, and the function you reconstructed is the simplest non-trivial polynomial in zz. This chapter teaches the two recipes that produce that answer — and choose the right one under exam pressure.

Why this matters

The harmonic-conjugate construction has a real-world payoff. Harmonic functions on the plane are the natural model for steady-state heat distribution, ideal fluid flow, and electrostatic potential. The construction in this chapter says: every such physics problem in the plane can be lifted to a problem about an analytic function, where the machinery of complex analysis becomes available. That lift is what conformal mapping (Chapter 5) exploits.

For now, you don't need to chase any of that. You need to learn the construction well enough to do it under exam pressure on five fresh uu's in twenty minutes.

The setup

The contract:

The harmonic-conjugate problem
Given: a harmonic u(x,y).Find: v(x,y) such that f(z)=u+iv is analytic.\text{Given: a harmonic } u(x, y). \qquad \text{Find: } v(x, y) \text{ such that } f(z) = u + iv \text{ is analytic.}

Such a vv is called a harmonic conjugate of uu. Conjugate here does not mean complex conjugate — it means partner under CR. The pair (u,v)(u, v) is conjugate when together they make an analytic function.

Two facts used freely after this beat.

  • Existence. On simply connected domains — the ones you will work with, typically all of R2\mathbb{R}^2 — every harmonic uu admits a conjugate vv.
  • Uniqueness. On any connected domain, vv is unique up to an additive real constant. (Quick proof: if v1v_1 and v2v_2 are both conjugates of uu, the difference v1v2v_1 - v_2 has both partials zero by CR, hence is constant on a connected set.) So every answer ends with a free real parameter that an extra condition like f(0)=0f(0) = 0 pins down.
The symmetric problem

If you are instead given v(x,y)v(x, y) and asked for uu, the same machinery works with CR signs flipped. Milne-Thomson becomes f(z)=vy(z,0)+ivx(z,0)f'(z) = v_y(z, 0) + i\,v_x(z, 0) — same recipe, swapped partials, plus sign instead of minus. The exam translator in Beat 6 walks through this variant.

Intuition before formula

Why harmonicity is exactly the condition

The CR equations from Chapter 3, rearranged with uu known and vv unknown:

CR, read as a system for vv
vx=uy,vy=uxv_x = -u_y, \qquad v_y = u_x

This tells you both partial derivatives of vv in terms of the given function uu. If you know both partials, you can recover vv by integration — provided the two expressions are consistent with each other.

The consistency check is Clairaut's theorem (mixed partials commute). Differentiating the first equation with respect to yy and the second with respect to xx:

y(vx)=uyy,x(vy)=uxx\frac{\partial}{\partial y}(v_x) = -u_{yy}, \qquad \frac{\partial}{\partial x}(v_y) = u_{xx}

For these to agree, uxx+uyy=0u_{xx} + u_{yy} = 0 — exactly Laplace's equation.

Insight

This is genuinely elegant. The Chapter 3 fact "if ff is analytic then uu is harmonic" looked like a free bonus. Now you see it from the other side: harmonicity of uu is not just a consequence of analyticity — it is the condition under which uu can be the real part of an analytic function in the first place.

So whenever a question begins "given a harmonic function u=u = \dots," the harmonicity is not flavour text. It is the green light that says "yes, the conjugate you are about to find exists."

One technical note. Harmonicity is a local condition — it pins down vv up to a constant in any small neighbourhood. Getting from there to a single globally defined vv needs the domain to be simply connected, which is why that hypothesis sits inside the existence statement. For this chapter, every domain you meet is R2\mathbb{R}^2 or an open disc, so the global step is automatic.

The two methods

Direct method, Milne-Thomson, and the orthogonal-families bonus

Method 1 — Direct method

The recipe.

  1. Step 1. Compute uxu_x and uyu_y. Verify uxx+uyy=0u_{xx} + u_{yy} = 0 (harmonic check).
  2. Step 2. From CR: vx=uyv_x = -u_y. Integrate with respect to xx, treating yy as constant: v=(uy)dx+g(y)v = \int (-u_y)\,dx + g(y). The constant of integration is a function g(y)g(y) of yy alone.
  3. Step 3. Differentiate this vv with respect to yy and set the result equal to uxu_x (the second CR equation). Solve for g(y)g'(y). Integrate to get g(y)g(y).
  4. Step 4. Assemble vv, then f(z)=u+ivf(z) = u + iv. Re-express in zz by substituting x=(z+zˉ)/2x = (z + \bar z)/2, y=(zzˉ)/(2i)y = (z - \bar z)/(2i) and watching the zˉ\bar z terms cancel.

Worked example. u=x2y2u = x^2 - y^2. Then ux=2xu_x = 2x, uy=2yu_y = -2y, and uxx+uyy=22=0u_{xx} + u_{yy} = 2 - 2 = 0 ✓. So vx=2yv_x = 2y, giving v=2xy+g(y)v = 2xy + g(y). Then vy=2x+g(y)=ux=2xv_y = 2x + g'(y) = u_x = 2x, so g(y)=0g'(y) = 0 and g=Cg = C with CRC \in \mathbb{R}. Therefore v=2xy+Cv = 2xy + C and

f(z)=(x2y2)+i(2xy+C)=(x+iy)2+iC=z2+iC.f(z) = (x^2 - y^2) + i(2xy + C) = (x + iy)^2 + iC = z^2 + iC.

The free constant is pure imaginary — it lives entirely in vv. Adding a real constant to ff would shift the real part by that real number and stop matching the prescribed uu.

Method 2 — Milne-Thomson

The shortcut. This is the method to use on exams unless the question explicitly asks for v(x,y)v(x, y) without asking for f(z)f(z).

  1. Step 1. Compute φ1(x,y)=ux\varphi_1(x, y) = u_x and φ2(x,y)=uy\varphi_2(x, y) = u_y.
  2. Step 2. Substitute xzx \to z and y0y \to 0 in both: φ1(z,0)\varphi_1(z, 0) and φ2(z,0)\varphi_2(z, 0).
  3. Step 3. Then f(z)=φ1(z,0)iφ2(z,0)f'(z) = \varphi_1(z, 0) - i\,\varphi_2(z, 0).
  4. Step 4. Integrate with respect to zz. The result is f(z)=F(z)+iCf(z) = F(z) + iC with CRC \in \mathbb{R}. An extra condition like f(0)=0f(0) = 0 or f(1)=2+if(1) = 2 + i pins down CC.

Worked example. Same u=x2y2u = x^2 - y^2. Then φ1=2x\varphi_1 = 2x, so φ1(z,0)=2z\varphi_1(z, 0) = 2z. And φ2=2y\varphi_2 = -2y, so φ2(z,0)=0\varphi_2(z, 0) = 0. So f(z)=2zi0=2zf'(z) = 2z - i \cdot 0 = 2z and f(z)=z2+iCf(z) = z^2 + iC. Two lines. Same answer as the direct method.

Where the recipe comes from

If ff is analytic, then f(z)=ux+ivx=uxiuyf'(z) = u_x + i\,v_x = u_x - i\,u_y (the second equality is CR). So f(z)f'(z), viewed as a function of xx and yy, is built entirely from partials of uu. The substitution xz,y0x \to z, y \to 0 then produces an expression in zz alone, which we integrate. Why the substitution is legitimate uses the fact that an analytic function on a connected domain is fully determined by its values on a real interval — a result we will meet in Chapter 9, when we study power-series representations of analytic functions. For this chapter, treat Milne-Thomson as a reliable construction rule and always sanity-check the final f(z)f(z) by computing Re(f(z))\operatorname{Re}(f(z)) and confirming it matches the given uu.

The orthogonal-families picture

Here is a free geometric fact that often shows up on exams. Fix an analytic f=u+ivf = u + iv. Consider the two families of level curves:

u(x,y)=c1(curves on which the real part is constant)u(x, y) = c_1 \quad (\text{curves on which the real part is constant}) v(x,y)=c2(curves on which the imaginary part is constant)v(x, y) = c_2 \quad (\text{curves on which the imaginary part is constant})

These two families cross each other at right angles at every point where f(z)0f'(z) \neq 0.

The reason is one line of vectors. At any point where u0\nabla u \neq 0, the gradient u=(ux,uy)\nabla u = (u_x, u_y) is perpendicular to the level curve u=c1u = c_1 through that point. Similarly v\nabla v is perpendicular to the curve v=c2v = c_2. Now compute the dot product, using CR (vx=uy, vy=uxv_x = -u_y,\ v_y = u_x):

uv=uxvx+uyvy=ux(uy)+uy(ux)=0.\nabla u \cdot \nabla v = u_x v_x + u_y v_y = u_x(-u_y) + u_y(u_x) = 0.

The gradients are perpendicular, and rotating each gradient by 90°90° gives the tangent direction of the corresponding level curve — so the tangents are also perpendicular. Where f(z)=uxiuy=0f'(z) = u_x - i\,u_y = 0, both partials of uu vanish, u=0\nabla u = 0, and the level curve has no well-defined normal direction; orthogonality can fail there.

Insight

For f(z)=z2f(z) = z^2: u=x2y2u = x^2 - y^2 is a family of hyperbolas, and v=2xyv = 2xy is another family of hyperbolas rotated by 45°45°. They cross at right angles everywhere except at the origin, where f(0)=0f'(0) = 0. You will see this in the playground next — and the same orthogonality for three other analytic functions.

This shows up on exams as: "Show that the families u=c1u = c_1 and v=c2v = c_2 cut each other orthogonally." Five marks, three lines of work using CR.

Interactive playground

Pick a uu, watch both methods produce the same f(z)f(z)

Make the speed difference visible. On the same uu, side by side, you will see both methods produce the same f(z)f(z) and one of them takes noticeably fewer steps. The harmonic check is pulled out as Step 0 — it is a property of uu, not of either method, and the two methods are interchangeable downstream. The geometric payoff — orthogonal level curves — appears below both columns once they have finished, attributed to ff itself rather than to either construction route.

Harmonic-conjugate race · Direct vs Milne-Thomson
Step 0 · Harmonic check (one-time, method-independent)
Direct method
Milne-Thomson
The geometric picture of f(z)
u = c₁ v = c₂
Insight

A subtle thing the playground reveals on u3=excosyu_3 = e^x \cos y. Under Milne-Thomson the substitution y=0y = 0 turns excosye^x \cos y into ez1=eze^z \cdot 1 = e^z and exsiny-e^x \sin y into ez0=0-e^z \cdot 0 = 0. The f(z)=ezi0=ezf'(z) = e^z - i \cdot 0 = e^z falls out instantly, and f(z)=ez+iCf(z) = e^z + iC. The direct method on the same uu takes a few extra lines of g(y)g(y) chasing to reach the same answer. The difference is not "Milne-Thomson is shorter" — it is "Milne-Thomson skips integrating in two variables and integrates in one."

Retrieval gauntlet

Test yourself before moving on

Do not peek. Commit to an answer before you reveal anything. Recognising a correct answer once you see it only feels like learning.

Quiz 1 · spot the non-harmonic

Which of the following cannot be the real part of an analytic function on R2\mathbb{R}^2?

Quiz 2 · Milne-Thomson, sign check

Given u=excosyu = e^x \cos y, what is f(z)f'(z) by Milne-Thomson?

Quiz 3 · orthogonal families

For f(z)=z2f(z) = z^2, the curve u=1u = 1 is the hyperbola x2y2=1x^2 - y^2 = 1. The curve v=1v = 1 is the hyperbola 2xy=12xy = 1. At a point where the two hyperbolas cross, the angle between them is:

Reveal 1 — Direct method, scaffolded. Given u=x33xy2u = x^3 - 3xy^2, find the conjugate vv and express f(z)f(z). Work the three sub-steps below; attempt each on paper before revealing it.

Step 1. Check that uu is harmonic, and write down the two CR targets vxv_x and vyv_y in terms of uu.

ux=3x23y2u_x = 3x^2 - 3y^2. uy=6xyu_y = -6xy. uxx=6xu_{xx} = 6x, uyy=6xu_{yy} = -6x. Sum is 00 ✓.

Targets: vx=uy=6xyv_x = -u_y = 6xy; vy=ux=3x23y2v_y = u_x = 3x^2 - 3y^2.

Step 2. Integrate vxv_x with respect to xx to get vv up to a function of yy.

v=6xydx=3x2y+g(y)v = \displaystyle\int 6xy\,dx = 3x^2 y + g(y).

Step 3. Pin down g(y)g(y) using the second CR equation vy=uxv_y = u_x, and write f(z)f(z).

vy=3x2+g(y)v_y = 3x^2 + g'(y). Set equal to 3x23y23x^2 - 3y^2. So g(y)=3y2g'(y) = -3y^2, hence g(y)=y3+Cg(y) = -y^3 + C with CRC \in \mathbb{R}. Therefore v=3x2yy3+Cv = 3x^2 y - y^3 + C and

f(z)=(x33xy2)+i(3x2yy3+C)=(x+iy)3+iC=z3+iC.f(z) = (x^3 - 3xy^2) + i(3x^2 y - y^3 + C) = (x + iy)^3 + iC = z^3 + iC.

The free constant rides on vv; it is pure imaginary in ff.

Reveal 2 — Milne-Thomson and the y=0y = 0 trap. Given u=sinhxcosyu = \sinh x \cos y, find f(z)f(z) by Milne-Thomson.

Step 1. Compute φ1=ux\varphi_1 = u_x and φ2=uy\varphi_2 = u_y.

φ1=coshxcosy\varphi_1 = \cosh x \cos y. φ2=sinhxsiny\varphi_2 = -\sinh x \sin y.

Step 2. Substitute xzx \to z AND y0y \to 0. (This is the step students botch.)

φ1(z,0)=coshzcos0=coshz1=coshz\varphi_1(z, 0) = \cosh z \cdot \cos 0 = \cosh z \cdot 1 = \cosh z.

φ2(z,0)=sinhzsin0=sinhz0=0\varphi_2(z, 0) = -\sinh z \cdot \sin 0 = -\sinh z \cdot 0 = 0.

The trap: writing φ1(z,0)=coshzcosz\varphi_1(z, 0) = \cosh z \cos z — i.e., renaming yy as zz instead of zeroing it out. The y=0y = 0 substitution is what collapses the two-variable function back to a one-variable function of zz. Always write the substitution as a visible step on your page.

Step 3. Assemble f(z)f'(z), integrate, and sanity-check by reading off Re(f)\operatorname{Re}(f).

f(z)=coshzi0=coshzf'(z) = \cosh z - i \cdot 0 = \cosh z. Then f(z)=coshzdz=sinhz+iCf(z) = \displaystyle\int \cosh z\,dz = \sinh z + iC with CRC \in \mathbb{R}.

Check: Re(sinh(x+iy))=sinhxcosy\operatorname{Re}\bigl(\sinh(x + iy)\bigr) = \sinh x \cos y. ✓ Matches the given uu.

Exam translator

How this concept appears on exams

Exam trap

In standard Indian engineering-math exams — VTU 21MAT41, JIIT Maths-II and their cousins — and likely in MCC201A unless your class notes differ, this chapter shows up in three forms.

CO-3 form, main pattern. "Given u(x,y)=u(x, y) = \dots, show that uu is harmonic and find the analytic function f(z)=u+ivf(z) = u + iv. Express your answer in terms of zz." Roughly 6–8 marks, budget 8 minutes. Use Milne-Thomson. Direct integration takes 12–15 minutes on a transcendental uu and increases sign-error risk.

CO-3 form, given the imaginary part. "Given v(x,y)=v(x, y) = \dots, find the analytic function f(z)f(z)." Same machinery, CR signs flipped. From f=ux+ivxf' = u_x + i\,v_x and CR (ux=vy, uy=vxu_x = v_y,\ u_y = -v_x), Milne-Thomson becomes

f(z)=vy(z,0)+ivx(z,0)f'(z) = v_y(z, 0) + i\,v_x(z, 0)

Note the plus sign (not minus) and the swapped partials. Integrate to get f(z)=F(z)+Cf(z) = F(z) + C with CRC \in \mathbb{R}here the free constant is pure real, because vv is fixed and the freedom lives in uu. Mirror image of the uu-given case, where the free constant was pure imaginary.

CO-3 form, orthogonal families variant. "Show that the families of curves u=c1u = c_1 and v=c2v = c_2 cut each other orthogonally." Roughly 4–5 marks, budget 5 minutes. Compute uv\nabla u \cdot \nabla v and use CR; the dot product reduces to zero.

Occasionally the question pins the constant: "Find f(z)f(z) such that f(0)=0f(0) = 0" or similar. Your answer is f(z)=F(z)+iCf(z) = F(z) + iC with CRC \in \mathbb{R}. Plug the given point into this expression and solve for CC. Two marks, ten seconds — often skipped under exam pressure. Don't skip it.

Four patterns that cost marks

  1. Stopping at v(x,y)v(x, y) and not expressing the answer in zz. The single most common mark-loss on these questions. You compute vv correctly, write f(z)=u+ivf(z) = u + iv with xx and yy still in it, and lose 2–3 marks on the "express in terms of zz" step the question demanded. The fix: substitute x=(z+zˉ)/2x = (z + \bar z)/2, y=(zzˉ)/(2i)y = (z - \bar z)/(2i) and watch the zˉ\bar z's cancel — or, with Milne-Thomson, you arrive in zz form directly. If you used the direct method, the last line of working must be f(z)=(something in z)+iCf(z) = \text{(something in } z\text{)} + iC. Never stop earlier.
  2. Forgetting the y=0y = 0 substitution. The biggest Milne-Thomson trap. Write the substitution as a visible step on the page — actually write "let x=zx = z, y=0y = 0" — before evaluating. A second of effort, several marks.
  3. Sign error on the iφ2-i\,\varphi_2 term. The formula has a minus: f(z)=φ1(z,0)iφ2(z,0)f'(z) = \varphi_1(z, 0) - i\,\varphi_2(z, 0). Recall it via the derivation: f=ux+ivx=uxiuyf' = u_x + i\,v_x = u_x - i\,u_y (the second equality uses CR). The minus is not arbitrary — it is the CR minus sign you already memorised. (And for the symmetric vv-given form, the sign flips to plus and the partials swap.)
  4. Skipping the harmonic check on a question that demands it. If the question says "show that uu is harmonic and find …," the marks for the harmonic check are explicitly there. Compute uxx+uyyu_{xx} + u_{yy} and write =0= 0. Two marks for ten seconds of work.

Five things to carry out of this chapter

  1. The harmonic-conjugate problem is the inverse of CR. Given the real part uu of an analytic function, you can recover the imaginary part vv (up to an additive real constant) and hence f(z)=F(z)+iCf(z) = F(z) + iC with CRC \in \mathbb{R}.
  2. Harmonicity of uu is the local condition that makes the construction work. On the simply connected domains you work with, that local condition is enough for global existence.
  3. The direct method. vx=uyv_x = -u_y, integrate in xxv=(piece)+g(y)v = (\text{piece}) + g(y); then vy=uxv_y = u_x pins g(y)g'(y); combine.
  4. Milne-Thomson. φ1=ux\varphi_1 = u_x, φ2=uy\varphi_2 = u_y; substitute xzx \to z and y0y \to 0; then f(z)=φ1(z,0)iφ2(z,0)f'(z) = \varphi_1(z, 0) - i\,\varphi_2(z, 0); integrate. Faster, exam-preferred.
  5. Orthogonal families. The level curves of uu and of vv cross at right angles everywhere f(z)0f'(z) \neq 0. One-line proof via uv=0\nabla u \cdot \nabla v = 0 from CR.
Why this matters next

A note on the syllabus phrase "elementary analytic functions." The MCC201A Unit 1 contents list "elementary analytic functions" as one of its topics. Those functions are ez,sinz,cosz,sinhz,coshze^z, \sin z, \cos z, \sinh z, \cosh z — and you have just used several of them as the worked examples in this chapter. You already know what they look like, decomposed into real and imaginary parts. The logarithm logz\log z is also "elementary," but it carries a branch-cut subtlety that needs its own deliberate treatment; you'll meet it where it does real work, in the contour-integration chapter.

What comes next. Chapter 5, Conformal mapping intuition, takes the analytic functions you have learned to recognise (Chapter 3) and construct (Chapter 4), and asks what they do geometrically. The orthogonal-families picture from Beat 3 is the first hint — analytic functions reshape regions of the plane while preserving angles. The functions z2z^2, eze^z, sinhz\sinh z will reappear immediately as conformal maps with specific geometric effects.

Before you open Chapter 5: solve five fresh "given uu, find f(z)f(z)" problems from Zill, Complex Analysis, Chapter 3 (harmonic-functions section) [verify the exact section number against your copy]. Mix two by direct method, three by Milne-Thomson. Retrieval beats recognition every time.

Same material, another voice

If a different explanation would help, this one is worth your time — free, from MIT OpenCourseWare: