Complex Variables — Analytic Functions, Cauchy’s Theorems and Residues

This chapter is worth checking your paper for before you study it. Complex variables appears in the Engineering Mathematics section of many papers — Mechanical, Electrical, Electronics, Chemical and others — and is absent from some, including Civil Engineering, whose list runs linear algebra, calculus, differential equations, probability and statistics, and numerical methods with no complex analysis at all. Confirm it against your own paper's syllabus on the current organising institute's portal, because a topic you do not need is the most expensive thing you can study. If it is on your list, the payoff is unusually concentrated. Almost everything here rests on one condition and one theorem. The condition is analyticity: f = u + iv is analytic where the Cauchy–Riemann equations uₓ = v_y and u_y = −vₓ hold and the partials are continuous, and that single test settles the whole first family of questions — f(z) = z̄ fails it everywhere, since uₓ = 1 while v_y = −1, so it is nowhere analytic no matter how smooth it looks. The theorem is the residue theorem, and it is the reason this topic is worth marks out of proportion to its length: a contour integral of a function with isolated poles equals 2πi times the sum of the residues at the poles inside the contour. Everything else — Cauchy's integral theorem, Cauchy's integral formula, Taylor and Laurent expansions — is either a special case of it or the machinery for computing a residue. Two habits follow. First, for any contour integral, locate the singularities and ask which ones lie inside; a pole outside the contour contributes exactly nothing, so ∮dz/(z − 1) is 2πi over |z| = 2 and zero over |z| = 1/2. Second, identify the order of each pole before computing, because a simple pole yields to a one-line limit while a higher-order pole needs a derivative.

Analyticity and the Cauchy–Riemann Test

Write f(z) = u(x, y) + i·v(x, y). The function is analytic at a point if the two Cauchy–Riemann equations hold there and the four partial derivatives are continuous. Both equations are needed — one alone proves nothing — and they are the only test the exam sets.

The test applied to the two functions GATE keeps setting
f(z)u, v and their partialsVerdict
z² = (x² − y²) + i(2xy)uₓ = 2x, v_y = 2x — equal. u_y = −2y, vₓ = 2y — negatives of each other.Both equations hold everywhere, so z² is analytic on the whole plane — an entire function.
z̄ = x − iyuₓ = 1 but v_y = −1.The first equation fails at every point, so the conjugate is nowhere analytic despite being infinitely smooth as a function of x and y.
🎯 Why an analytic function has harmonic parts
Differentiate uₓ = v_y with respect to x and u_y = −vₓ with respect to y, then add: uₓₓ + u_yy = 0. The real part of an analytic function is therefore harmonic, and the same argument gives it for the imaginary part. That is the bridge to vector calculus and to the Laplace equation, and it is also a fast filter: a candidate function whose real part fails ∇²u = 0 cannot be the real part of anything analytic. Given a harmonic u, the conjugate v is recovered by integrating the Cauchy–Riemann equations — from u = x² − y², vₓ = −u_y = 2y and v_y = uₓ = 2x give v = 2xy, and f = z² as expected.

Contour Integrals — Only What Is Inside Matters

  • Cauchy’s integral theorem. If f is analytic everywhere on and inside a closed contour, ∮f dz = 0. So the first question about any contour integral is where the singularities are: ∮dz/(z − 1) over the circle |z| = 1/2 is zero, because the only pole sits at z = 1, outside.
  • Cauchy’s integral formula. For f analytic inside a contour enclosing a, ∮ f(z)/(z − a) dz = 2πi·f(a). So ∮ ez/z dz over |z| = 1 is 2πi·e⁰ = 2πi, without expanding anything. The generalised form ∮ f(z)/(z − a)n+1 dz = 2πi·f(n)(a)/n! handles a higher-order pole the same way.
  • The basic case to memorise. ∮dz/z = 2πi around any contour enclosing the origin — not 0, and not 2π. Every other contour integral in the topic is this one dressed up.
⚠️ Read the contour before the integrand
Examiners set the same integrand with two different contours and offer both answers. The function 1/(z − 1) integrates to 2πi over |z| = 2 and to 0 over |z| = 1/2 — the integrand is identical and the answers are not. Circle the poles on a sketch, draw the contour, and count only what is enclosed. This is also why a question giving |z| = 3 for z/[(z − 1)(z − 2)] requires both residues, while |z| = 1.5 requires only the one at z = 1.

Poles, Laurent Series and the Residue Theorem

A Taylor series expands an analytic function in powers of (z − a) with no negative powers. A Laurent series is the same idea around a singularity and admits negative powers, and the coefficient of the (z − a)⁻¹ term is the residue at a. The order of the pole is the highest negative power that appears: f(z) = (z + 1)/[z²(z − 3)] has a pole of order 2 at z = 0 and a simple pole at z = 3, which you can read from the denominator without expanding.

Computing a residue, by pole order
PoleResidueWorked
Simple, at z = alim(z→a) (z − a)·f(z)For 1/(z² + 1) at z = i: 1/(z + i) at z = i is 1/(2i) = −i/2.
Order 2, at z = alim(z→a) d/dz [(z − a)²·f(z)]One derivative before the limit. Forgetting it is the standard error at a double pole.
A quotient with a simple zero belowp(a)/q′(a)Fastest route when q factorises badly. For z/[(z − 1)(z − 2)] the residues are −1 at z = 1 and 2 at z = 2.

The residue theorem then finishes the job: ∮f dz = 2πi × (sum of residues inside). For 1/(z² + 1) around |z − i| = 1, only z = i is enclosed, so the integral is 2πi·(−i/2) = π — a real answer from a complex integral, which is exactly how this machinery is used to evaluate real integrals. For z/[(z − 1)(z − 2)] around |z| = 3 both poles are inside, the residues sum to −1 + 2 = 1, and the integral is 2πi.

Key takeaways

  • Check whether your paper lists complex variables at all — several do not, Civil Engineering among them. A topic you do not need is the most expensive thing you can study.
  • Analyticity needs both Cauchy–Riemann equations: uₓ = v_y and u_y = −vₓ. z̄ fails the first everywhere, so it is nowhere analytic however smooth it looks.
  • The real and imaginary parts of an analytic function are harmonic. Given one, the other is recovered by integrating the Cauchy–Riemann equations.
  • A pole outside the contour contributes nothing. The same integrand gives 2πi over one circle and 0 over another, so read the contour before the integrand.
  • Memorise ∮dz/z = 2πi and Cauchy’s formula ∮f(z)/(z − a) dz = 2πi·f(a). Together they answer most one-mark questions in the topic outright.
  • The residue at a simple pole is lim (z − a)f(z); at a double pole take one derivative first. The order is read off the denominator, not from an expansion.
  • ∮f dz = 2πi × (sum of enclosed residues). For 1/(z² + 1) around z = i that is 2πi·(−i/2) = π — a real number out of a complex integral.

Practice questions (9)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. The function f(z) = z̄ (the complex conjugate of z) is:

    1. Analytic everywhere
    2. Analytic only at the origin
    3. Nowhere analytic
    4. Analytic everywhere except at the origin
    Show answer

    Answer: C — Nowhere analytic

    Write z̄ = x − iy, so u = x and v = −y. Then uₓ = 1 while v_y = −1, and the first Cauchy–Riemann equation uₓ = v_y fails at every point — there is no point at which 1 = −1. So the function is nowhere analytic. Note how counter-intuitive this is and why it is set so often: u and v are as smooth as functions of two real variables can be, infinitely differentiable, and none of that helps. Analyticity is a condition on how the real and imaginary parts are coupled, not on how smooth each one is separately.
  2. The value of ∮ dz/z taken counter-clockwise around the circle |z| = 1 is:

    1. 0
    2. 2πi
    3. 2π
    4. πi
    Show answer

    Answer: B — 2πi

    The integrand has a simple pole at z = 0, which the contour encloses, so Cauchy’s integral theorem does not apply and the answer is not zero. Either use the integral formula with f(z) = 1, giving 2πi·f(0) = 2πi, or substitute z = eiθ: dz = ieiθdθ and the integral becomes ∫₀2π i dθ = 2πi. Option A is the answer when the pole lies outside the contour, and option C drops the i — this is the single most-used result in the topic, so it is worth being certain that the answer is imaginary.
  3. The value of ∮ dz/(z − 1) around the circle |z| = 1/2 is:

    1. 2πi
    2. 0
    3. πi
    4. −2πi
    Show answer

    Answer: B — 0

    The only singularity is at z = 1, and the contour is the circle of radius 1/2 about the origin, which reaches only to |z| = 0.5. The pole is outside, so the integrand is analytic on and inside the contour and Cauchy’s integral theorem gives 0. Option A is the answer for the same integrand over |z| = 2, where the pole is enclosed — the integrand is identical in both questions and the answers differ entirely, which is precisely the point examiners are making. Always locate the poles relative to the contour before reaching for a formula.
  4. The residue of f(z) = 1/(z² + 1) at z = i is:

    1. −i/2
    2. i/2
    3. 1/2
    4. 2i
    Show answer

    Answer: A — −i/2

    Factorise the denominator as (z − i)(z + i), so z = i is a simple pole. The residue is lim(z→i) (z − i)·f(z) = 1/(z + i) evaluated at z = i, which is 1/(2i). Rationalise by multiplying above and below by i: i/(2i²) = i/(−2) = −i/2. Option B is the answer without that final sign step, and it is where nearly every mistake in this question happens — 1/i is −i, not i. As a check, the residue theorem then gives ∮f dz = 2πi·(−i/2) = π around a contour enclosing only z = i, a positive real number, which is what a correctly signed residue must produce here.
  5. The value of ∮ ez/z dz around the circle |z| = 1 is:

    1. 2πi·e
    2. 2πi
    3. 0
    4. 2π
    Show answer

    Answer: B — 2πi

    Cauchy’s integral formula reads ∮ f(z)/(z − a) dz = 2πi·f(a). Here f(z) = ez, which is entire, and a = 0, so the integral is 2πi·e⁰ = 2πi·1 = 2πi. Option A evaluates f at z = 1 instead of at the pole — the formula asks for f at the singularity, and the radius of the contour never enters. Option C would require the integrand to be analytic inside, but ez/z has a simple pole at the origin, squarely enclosed.
  6. The function f(z) = (z + 1)/[z²(z − 3)] has, at z = 0, a pole of order:

    1. 1
    2. 2
    3. 3
    4. It is a removable singularity, not a pole
    Show answer

    Answer: B — 2

    Read the order off the denominator: z appears squared and the numerator z + 1 equals 1 at z = 0, so nothing cancels and the pole has order 2. The other singularity, at z = 3, is simple. Option D would need the numerator to vanish at z = 0 to at least the second order, and it does not vanish there at all. The order matters practically rather than as a label: the residue at this double pole requires differentiating z²f(z) once before taking the limit, whereas the simple pole at z = 3 yields to a direct substitution.
  7. If u = x² − y² is the real part of an analytic function f(z), then f(z) is:

    1. z² (up to an additive constant)
    2. z̄²
    3. 2xy
    4. No such analytic function exists
    Show answer

    Answer: A — z² (up to an additive constant)

    First check that u can be the real part of something analytic: uₓₓ + u_yy = 2 + (−2) = 0, so u is harmonic and option D is out. Now recover v from the Cauchy–Riemann equations: v_y = uₓ = 2x gives v = 2xy + g(x), and vₓ = −u_y = 2y forces g′(x) = 0. So v = 2xy and f = (x² − y²) + i(2xy) = z², up to an additive constant that the conditions cannot determine. Option C is v alone, which is a real function and cannot be f; option B fails the Cauchy–Riemann test, as any function of z̄ does.
  8. The sum of the residues of f(z) = z/[(z − 1)(z − 2)] at all its poles is _____.

    Numerical answer — type the value.

    Show answer

    Answer: 1

    Both poles are simple. At z = 1 the residue is z/(z − 2) evaluated at z = 1, that is 1/(−1) = −1. At z = 2 it is z/(z − 1) at z = 2, that is 2/1 = 2. The sum is −1 + 2 = 1. So a contour enclosing both, such as |z| = 3, gives ∮f dz = 2πi·1 = 2πi, while a contour enclosing only z = 1, such as |z| = 1.5, gives 2πi·(−1) = −2πi. The two answers differ in sign as well as magnitude, which is why the contour has to be read as carefully as the function. Being a numerical-answer question, a wrong entry costs nothing.
  9. Which of the following functions are analytic at every point of the complex plane? (More than one option may be correct.)

    1. ez
    2. 1/z
    3. z̄
    4. z²
    Show answer

    Answer: A — e^{z}; D — z²

    ez and z² are entire — analytic at every point of the plane — so options A and D are correct. Option B fails at exactly one point: 1/z is analytic everywhere except z = 0, where it has a simple pole, and "at every point" is therefore false even though the function is analytic almost everywhere. Option C fails at every point, since z̄ = x − iy gives uₓ = 1 against v_y = −1 and the first Cauchy–Riemann equation never holds. The pair is worth noticing as a pair: B and C are the two ways a function can fail to be entire — a single bad point, or no good points at all.