Chapter VI · Derivatives and integrals

Derivatives of complex-valued functions

§115 20 min

A complex function of a real variable is differentiated part by part; its derivative is the velocity of a moving point in the Argand diagram, and rules (1)–(5) still hold.

Why this matters

Complex numbers enter the calculus long before we meet functions of a complex variable. The very next sections use them. To differentiate a rational function by partial fractions (§118), Hardy needs the derivative of 1/(x−α)1/(x - \alpha) when the root α\alpha of the denominator is complex. And cos⁡x+isin⁡x\cos x + i\sin x is a function of the real variable xx whose derivative turns out to be ii times itself, a first glimpse of the exponential function of Chapter X. §115 is short: it says how to differentiate such functions and which rules survive.

The idea

Let xx be real, and let y=ϕ(x)+iψ(x)y = \phi(x) + i\psi(x), where ϕ\phi and ψ\psi are real functions. As xx varies, the point yy moves in the Argand diagram (§44), tracing a path. The chord quotient

y(x+h)−y(x)h=ϕ(x+h)−ϕ(x)h+i ψ(x+h)−ψ(x)h\frac{y(x + h) - y(x)}{h} = \frac{\phi(x + h) - \phi(x)}{h} + i\,\frac{\psi(x + h) - \psi(x)}{h}

is the displacement from one position to a nearby one, divided by the (real) time hh taken. So it is an average velocity, and its limit should be the velocity of the moving point.

Explore The derivative of a moving point

Try this. With the unit circle selected, shrink hh and watch the ochre vector (the scaled chord) settle onto the purple one. Then move tt around the circle. Switch to the parabola and repeat.

z(t)=cos⁡t+isin⁡tz(t) = \cos t + i\sin t, z′(t)=−sin⁡t+icos⁡t=i z(t)z'(t) = -\sin t + i\cos t = i\,z(t)
ReIm
  • path of z(t)
  • {z(t+h) − z(t)}/h
  • z′(t) = φ′(t) + iψ′(t)
  • i z(t): z turned through a right angle
z(t)=0.697+0.717 iz(t) = 0.697 + 0.717\,i; scaled chord z(t+h)−z(t)h=−0.9074+0.3528 i\frac{z(t+h)-z(t)}{h} = -0.9074 + 0.3528\,i; z′(t)=−0.7174+0.6967 iz'(t) = -0.7174 + 0.6967\,i.
The two vectors differ by 0.393. The real and imaginary parts of the chord converge separately, to ϕ′(t)\phi'(t) and ψ′(t)\psi'(t), so the whole vector converges. On the unit circle z′=izz' = iz: the velocity is always perpendicular to the radius.
What to notice

The scaled chord always converges to a vector tangent to the path, the velocity. On the unit circle it always points at a right angle to the radius and has length 11: it equals iz(t)i z(t), which is z(t)z(t) turned through 12π\tfrac12\pi. The real and imaginary parts converge separately, which is the whole content of the definition.

Precise statements

Definition Derivative of a complex function of a real variable Hardy: §115

If y(x)=ϕ(x)+iψ(x)y(x) = \phi(x) + i\psi(x) with ϕ,ψ\phi, \psi real, and ϕ′(x)\phi'(x) and ψ′(x)\psi'(x) both exist, then yy is differentiable at xx and

y′(x)=ϕ′(x)+i ψ′(x).y'(x) = \phi'(x) + i\,\psi'(x).

Equivalently, y′(x)y'(x) is the complex number ww such that ∣y(x+h)−y(x)h−w∣→0\left|\dfrac{y(x + h) - y(x)}{h} - w\right| \to 0 as the real number hh tends to 00. The two forms agree, as the first proof below shows.

Theorem The algebraic rules survive Hardy: §115

Rules (1)–(5) of §114, for sums, constant (possibly complex) multiples, products, reciprocals and quotients, hold without change when ff and FF are complex functions of the real variable xx.

Rules (6) and (7) are another matter. A composite F{f(x)}F\{f(x)\} with complex values of ff needs FF to be defined at complex numbers: a function of a complex variable, whose derivative is a new idea that Hardy postpones. One harmless case does work at once. If ff is real and FF is a complex function of a real variable, apply the real chain rule to the real and imaginary parts of FF separately.

Proofs

Proof The two definitions agree
Strategy

A complex number is small exactly when both its real and imaginary parts are small. So convergence of a complex quotient is the same thing as convergence of its two real parts.

Two inequalities

For any complex u=a+ibu = a + ib: ∣a∣≤∣u∣|a| \le |u|, ∣b∣≤∣u∣|b| \le |u|, and ∣u∣≤∣a∣+∣b∣|u| \le |a| + |b| (the triangle inequality, §45).

Parts converge ⇒ the complex quotient converges

Put w=ϕ′(x)+iψ′(x)w = \phi'(x) + i\psi'(x) and u=q(h)−wu = q(h) - w, where q(h)q(h) is the chord quotient. The real and imaginary parts of uu are the errors of the chord slopes of ϕ\phi and ψ\psi, both tending to 00. So ∣u∣≤∣real part∣+∣imaginary part∣→0|u| \le |\text{real part}| + |\text{imaginary part}| \to 0.

The complex quotient converges ⇒ the parts converge

Conversely, if ∣q(h)−w∣→0|q(h) - w| \to 0 for some w=a+ibw = a + ib, then the real part of q(h)−wq(h) - w is at most ∣q(h)−w∣|q(h) - w| in absolute value, so the chord slope of ϕ\phi tends to aa; similarly that of ψ\psi tends to bb.

Proof Rules (1)–(5) for complex functions
Strategy

The proofs in §114 used only the limit of a sum, product and quotient, and the continuity of a differentiable function. All of these hold for complex-valued functions, with the same proofs, since ∣uv∣=∣u∣∣v∣|uv| = |u||v| and the triangle inequality hold for complex numbers.

Limits of complex expressions

If u(h)→u0u(h) \to u_0 and v(h)→v0v(h) \to v_0 (complex), then u+v→u0+v0u + v \to u_0 + v_0, uv→u0v0uv \to u_0v_0, and 1/v→1/v01/v \to 1/v_0 when v0≠0v_0 \ne 0. For instance, ∣uv−u0v0∣≤∣u∣∣v−v0∣+∣v0∣∣u−u0∣|uv - u_0v_0| \le |u||v - v_0| + |v_0||u - u_0|, exactly as for real numbers.

Continuity

If y′(x)y'(x) exists then y(x+h)−y(x)=q(h)⋅h→y′(x)⋅0=0y(x + h) - y(x) = q(h) \cdot h \to y'(x) \cdot 0 = 0, so yy is continuous at xx.

Repeat the proofs

With these facts, the proofs of the product, reciprocal and quotient rules in §114 go through word for word. As a check, the product rule can also be verified directly. If f=a+ibf = a + ib and F=c+idF = c + id, then fF=(ac−bd)+i(ad+bc)fF = (ac - bd) + i(ad + bc). Differentiating each real part by the real product rule and regrouping gives (a′+ib′)(c+id)+(a+ib)(c′+id′)=f′F+fF′(a' + ib')(c + id) + (a + ib)(c' + id') = f'F + fF'.

Worked examples and exercises

Exercise ●○○ Hardy: Examples XLIV, 13

Show that the derivative of y=cos⁡x+isin⁡xy = \cos x + i\sin x is iyiy. Interpret this in the Argand diagram.

Hint
Differentiate the two parts, then compare with i(cos⁡x+isin⁡x)i(\cos x + i\sin x).

Solution

y′=−sin⁡x+icos⁡xy' = -\sin x + i\cos x, and iy=icos⁡x+i2sin⁡x=−sin⁡x+icos⁡xiy = i\cos x + i^2 \sin x = -\sin x + i\cos x. So y′=iyy' = iy. The point yy runs round the unit circle at unit speed; multiplying by ii turns a vector through a right angle, so the velocity is always perpendicular to the radius, as it must be for motion in a circle. (In Chapter X this function becomes eixe^{ix}, and y′=iyy' = iy is then no surprise.)

Exercise A complex partial fraction ●●○ Hardy: §§115, 118

Let α=a+ib\alpha = a + ib with b≠0b \ne 0. Show that the derivative of 1/(x−α)1/(x - \alpha) is −1/(x−α)2-1/(x - \alpha)^2, first by the reciprocal rule and then directly from real and imaginary parts.

Hint
For the direct check, write 1x−α=(x−a)+ib(x−a)2+b2\dfrac{1}{x - \alpha} = \dfrac{(x - a) + ib}{(x - a)^2 + b^2}.

Solution

By rule (4). f(x)=x−αf(x) = x - \alpha has f′=1f' = 1, and f(x)≠0f(x) \ne 0 for real xx because b≠0b \ne 0. So the derivative is −1/(x−α)2-1/(x - \alpha)^2.

Directly. Put s=x−as = x - a and D=s2+b2D = s^2 + b^2. The real part s/Ds/D has derivative (D−2s2)/D2=(b2−s2)/D2(D - 2s^2)/D^2 = (b^2 - s^2)/D^2, and the imaginary part b/Db/D has derivative −2bs/D2-2bs/D^2. On the other hand,

−1(x−α)2=−(s+ib)2D2=−(s2−b2)−2ibsD2=b2−s2D2−i 2bsD2.-\frac{1}{(x - \alpha)^2} = -\frac{(s + ib)^2}{D^2} = \frac{-(s^2 - b^2) - 2ibs}{D^2} = \frac{b^2 - s^2}{D^2} - i\,\frac{2bs}{D^2}.

The two answers agree.

Exercise Motion on a circle ●●○ Hardy: §115

Suppose ∣z(t)∣=1|z(t)| = 1 for all tt in an interval, and zz is differentiable. Show that z′(t)z'(t) is perpendicular to z(t)z(t) whenever z′(t)≠0z'(t) \ne 0, that is, that the real part of z(t)‾ z′(t)\overline{z(t)}\,z'(t) is 00.

Hint
Differentiate zzˉ=1z\bar z = 1 by the product rule. What is the derivative of zˉ\bar z?

Solution

If z=ϕ+iψz = \phi + i\psi then zˉ=ϕ−iψ\bar z = \phi - i\psi, whose derivative is ϕ′−iψ′=z′‾\phi' - i\psi' = \overline{z'}. Differentiating zzˉ=1z \bar z = 1 gives z′zˉ+zz′‾=0z'\bar z + z\overline{z'} = 0. The second term is the conjugate of the first, so this says 2 Re(zˉz′)=02\,\mathrm{Re}(\bar z z') = 0. Writing zˉz′=∣z∣∣z′∣(cos⁡θ+isin⁡θ)\bar z z' = |z||z'|(\cos\theta + i\sin\theta), where θ\theta is the angle from zz to z′z', gives cos⁡θ=0\cos\theta = 0, so the two vectors are perpendicular. In real terms: ϕ2+ψ2=1\phi^2 + \psi^2 = 1 gives ϕϕ′+ψψ′=0\phi\phi' + \psi\psi' = 0, which says that the vectors (ϕ,ψ)(\phi, \psi) and (ϕ′,ψ′)(\phi', \psi') are orthogonal.

Exercise De Moivre, differentiated ●●○ Hardy: Examples XL, 1; §45

Let y=cos⁡x+isin⁡xy = \cos x + i\sin x. Differentiate yny^n (nn a positive integer) in two ways, by the rule (zn)′=nzn−1z′(z^n)' = nz^{n-1}z' and by De Moivre’s theorem yn=cos⁡nx+isin⁡nxy^n = \cos nx + i\sin nx, and check that the answers agree.

Solution

By the power rule (valid for complex functions, being a repeated product rule) and the first exercise, (yn)′=nyn−1⋅iy=in yn(y^n)' = ny^{n-1}\cdot iy = in\,y^n. By De Moivre, (yn)′=(cos⁡nx+isin⁡nx)′=−nsin⁡nx+incos⁡nx=in(cos⁡nx+isin⁡nx)=in yn(y^n)' = (\cos nx + i\sin nx)' = -n\sin nx + in\cos nx = in(\cos nx + i\sin nx) = in\,y^n. They agree.

Check yourself

Check yourself Enter a number

For z(t)=cos⁡t+isin⁡tz(t) = \cos t + i\sin t, what is ∣z′(t)∣|z'(t)| (for any tt)?

Why

z′(t)=−sin⁡t+icos⁡tz'(t) = -\sin t + i\cos t, whose modulus is sin⁡2t+cos⁡2t=1\sqrt{\sin^2 t + \cos^2 t} = 1. The point moves round the circle at unit speed.

Check yourself True or false?

For a differentiable complex function zz of a real variable there is always a ξ\xi between aa and bb with z(b)−z(a)=(b−a)z′(ξ)z(b) - z(a) = (b - a) z'(\xi), just as in the mean value theorem for real functions.

Why

False. Take z(t)=cos⁡t+isin⁡tz(t) = \cos t + i\sin t on [0,2π][0, 2\pi]: z(2π)−z(0)=0z(2\pi) - z(0) = 0, but ∣z′(ξ)∣=1|z'(\xi)| = 1 for every ξ\xi. The real and imaginary parts each have their own mean value point, but the two points are usually different. The rules (1)–(5) carry over to complex functions; the mean value theorem of §126 does not.

Check yourself Choose one

Which statement about Hardy’s rules for complex functions of a real variable xx is correct?

Why

The algebraic rules use only limits of sums, products and quotients, which behave the same way for complex numbers; order is never used. The chain rule with complex inner function ff needs a derivative of FF at complex points, a notion not yet defined.

Hardy’s language

Summary

Summary
  • For real xx: (ϕ+iψ)′=ϕ′+iψ′(\phi + i\psi)' = \phi' + i\psi'. The derivative exists when both parts are differentiable.
  • Geometrically, the derivative is the velocity of the moving point y(x)y(x) in the Argand diagram, the limit of scaled chords.
  • Rules (1)–(5) hold unchanged; in particular {1/(x−α)}′=−1/(x−α)2\{1/(x - \alpha)\}' = -1/(x - \alpha)^2 for complex α\alpha.
  • (cos⁡x+isin⁡x)′=i(cos⁡x+isin⁡x)(\cos x + i\sin x)' = i(\cos x + i\sin x): motion round the unit circle at unit speed.
  • The mean value theorem does not carry over to complex-valued functions.