Chapter X · The general theory of the logarithmic, exponential and circular functions

Problems: Miscellaneous Examples on Chapter X

Miscellaneous examples 120 min

Ten of Hardy's Miscellaneous Examples on complex logarithms, exponentials and circular functions, with graded hints and full solutions.

These problems are chosen for variety: computing many-valued expressions, solving transcendental equations in the complex plane, limits, mappings, level curves, trigonometric series and an integral. Hardy’s statements are restated compactly; the numbering is his. In every problem, say whether each logarithm or power is a principal value or the general value. Try each one before opening the hints, and open the hints one at a time.

Computing with many values

Exercise A power of i with a logarithmic exponent ●○○ Hardy: Misc. Examples X, 1

Show that the real parts of the values of ilog⁡(1−i)i^{\log(1 - i)} are e18(4k+1)π2cos⁡{14(4k+1)πlog⁡2}e^{\frac18(4k+1)\pi^2}\cos\{\tfrac14(4k + 1)\pi\log 2\}, kk any integer. (Here log⁡(1−i)\log(1 - i) is the principal value and the power is the general value.)

Hint
By definition iw=exp⁡(wLog⁡i)i^{w} = \exp(w\operatorname{Log} i) with w=log⁡(1−i)w = \log(1 - i).
Hint
log⁡(1−i)=12log⁡2−14πi\log(1 - i) = \tfrac12\log 2 - \tfrac14\pi i and Log⁡i=(2k+12)πi\operatorname{Log} i = (2k + \tfrac12)\pi i. Multiply these out.

Solution

wLog⁡i=(12log⁡2−14πi)(2k+12)πi=14π(2k+12)π+i 12log⁡2 (2k+12)πw\operatorname{Log} i = (\tfrac12\log 2 - \tfrac14\pi i)(2k + \tfrac12)\pi i = \tfrac14\pi(2k + \tfrac12)\pi + i\,\tfrac12\log 2\,(2k + \tfrac12)\pi. The real part is 18(4k+1)π2\tfrac18(4k + 1)\pi^2 and the imaginary part 14(4k+1)πlog⁡2\tfrac14(4k + 1)\pi\log 2. So the values are e18(4k+1)π2{cos⁡14(4k+1)πlog⁡2+isin⁡14(4k+1)πlog⁡2}e^{\frac18(4k+1)\pi^2}\{\cos\tfrac14(4k+1)\pi\log 2 + i\sin\tfrac14(4k+1)\pi\log 2\}, and their real parts are as stated. The principal value (k=0k = 0) has real part eπ2/8cos⁡(14πlog⁡2)≈3.434×0.855≈2.94e^{\pi^2/8}\cos(\tfrac14\pi\log 2) \approx 3.434 \times 0.855 \approx 2.94 (a numerical check of the principal value gives 2.938+1.778i2.938 + 1.778i).

Exercise An imaginary power near the origin ●○○ Hardy: Misc. Examples X, 25

Let aa be real and non-zero. How does Z=zaiZ = z^{ai} behave as zz approaches 00 along the positive real axis? Along the negative real axis? (Principal values, then general values.)

Hint
For z=x>0z = x > 0, zai=exp⁡(ailog⁡x)z^{ai} = \exp(ai\log x), and log⁡x\log x is real.
Hint
For z=x<0z = x < 0 the principal logarithm is log⁡∣x∣+πi\log|x| + \pi i.

Solution

For x>0x > 0: xai=exp⁡(ailog⁡x)=cos⁡(alog⁡x)+isin⁡(alog⁡x)x^{ai} = \exp(ai\log x) = \cos(a\log x) + i\sin(a\log x), a point of the unit circle. As x→0+x \to 0+, alog⁡x→∓∞a\log x \to \mp\infty, so ZZ goes round and round the unit circle infinitely often; its real and imaginary parts oscillate finitely between −1-1 and 11, and ZZ tends to no limit.

For x<0x < 0: log⁡x=log⁡∣x∣+πi\log x = \log|x| + \pi i, so xai=exp⁡(ailog⁡∣x∣−aπ)=e−aπ{cos⁡(alog⁡∣x∣)+isin⁡(alog⁡∣x∣)}x^{ai} = \exp(ai\log|x| - a\pi) = e^{-a\pi}\{\cos(a\log|x|) + i\sin(a\log|x|)\}: the same behaviour on the circle of radius e−aπe^{-a\pi}.

General values: Log⁡x=log⁡∣x∣+i⋅2kπ\operatorname{Log} x = \log|x| + i\cdot 2k\pi (or (2k+1)π(2k+1)\pi), so the other values move round circles of radius e−2kπae^{-2k\pi a} (or e−(2k+1)πae^{-(2k+1)\pi a}) in the same way.

Equations in the complex plane

Exercise A trigonometric equation without real roots ●●○ Hardy: Misc. Examples X, 2

Let aa, bb, cc be real with c2>a2+b2c^2 > a^2 + b^2. Show that the solutions of acos⁡θ+bsin⁡θ+c=0a\cos\theta + b\sin\theta + c = 0 are

θ=mπ+α±ilog⁡∣c∣+c2−a2−b2a2+b2,\theta = m\pi + \alpha \pm i\log\frac{|c| + \sqrt{c^2 - a^2 - b^2}}{\sqrt{a^2 + b^2}},

where mm is any odd integer if c>0c > 0 and any even integer if c<0c < 0, and cos⁡α=a/a2+b2\cos\alpha = a/\sqrt{a^2 + b^2}, sin⁡α=b/a2+b2\sin\alpha = b/\sqrt{a^2 + b^2}.

Hint
With R=a2+b2R = \sqrt{a^2 + b^2}, the equation is Rcos⁡(θ−α)=−cR\cos(\theta - \alpha) = -c. (If a=b=0a = b = 0 there are no solutions at all; assume R>0R > 0.)
Hint
Now cos⁡(θ−α)=A\cos(\theta - \alpha) = A with A=−c/RA = -c/R real and ∣A∣>1|A| > 1. Use the solution of cos⁡ζ=A\cos\zeta = A from Examples XCVI, 8 (lesson on the circular functions).

Solution

The addition formula holds for complex θ\theta, so acos⁡θ+bsin⁡θ=R(cos⁡αcos⁡θ+sin⁡αsin⁡θ)=Rcos⁡(θ−α)a\cos\theta + b\sin\theta = R(\cos\alpha\cos\theta + \sin\alpha\sin\theta) = R\cos(\theta - \alpha), and the equation is cos⁡(θ−α)=A=−c/R\cos(\theta - \alpha) = A = -c/R, with ∣A∣>1|A| > 1 because c2>R2c^2 > R^2.

By Examples XCVI, 8: if A>1A > 1 (that is, c<0c < 0), θ−α=2kπ±ilog⁡{A+A2−1}\theta - \alpha = 2k\pi \pm i\log\{A + \sqrt{A^2 - 1}\}; if A<−1A < -1 (c>0c > 0), θ−α=(2k+1)π±ilog⁡{−A+A2−1}\theta - \alpha = (2k + 1)\pi \pm i\log\{-A + \sqrt{A^2 - 1}\}. In both cases ∣A∣+A2−1=∣c∣+c2−R2R|A| + \sqrt{A^2 - 1} = \dfrac{|c| + \sqrt{c^2 - R^2}}{R}. So θ=mπ+α±ilog⁡∣c∣+c2−a2−b2a2+b2\theta = m\pi + \alpha \pm i\log\dfrac{|c| + \sqrt{c^2 - a^2 - b^2}}{\sqrt{a^2 + b^2}} with mm even when c<0c < 0 and odd when c>0c > 0. There are no real solutions, as expected, since ∣acos⁡θ+bsin⁡θ∣≤R<∣c∣|a\cos\theta + b\sin\theta| \le R < |c| for real θ\theta.

Exercise The roots of tan z = az ●●● Hardy: Misc. Examples X, 7

Let aa be real. Determine the number and approximate positions of the roots of tan⁡z=az\tan z = az.

Hint
Put z=x+iyz = x + iy and use tan⁡(x+iy)=sin⁡2x+isinh⁡2ycos⁡2x+cosh⁡2y\tan(x + iy) = \dfrac{\sin 2x + i\sinh 2y}{\cos 2x + \cosh 2y} (Examples XCVI, 3). Equate real and imaginary parts.
Hint
If x≠0x \ne 0 and y≠0y \ne 0, divide the two equations to get sin⁡2x2x=sinh⁡2y2y\dfrac{\sin 2x}{2x} = \dfrac{\sinh 2y}{2y}. Compare the sizes of the two sides.
Hint
So every root is real or purely imaginary. For z=iyz = iy, tan⁡iy=itanh⁡y\tan iy = i\tanh y: when does tanh⁡y=ay\tanh y = ay have a non-zero root?

Solution

With D=cos⁡2x+cosh⁡2yD = \cos 2x + \cosh 2y (positive except at the poles of tan⁡\tan on the real axis), the equation splits into sin⁡2x=axD\sin 2x = axD and sinh⁡2y=ayD\sinh 2y = ayD.

No roots off the axes. If x≠0x \ne 0, y≠0y \ne 0 and a≠0a \neq 0, dividing gives sin⁡2x2x=sinh⁡2y2y=12aD\dfrac{\sin 2x}{2x} = \dfrac{\sinh 2y}{2y} = \tfrac12 aD. But ∣sin⁡u/u∣<1|\sin u/u| < 1 for real u≠0u \ne 0, while sinh⁡v/v>1\sinh v/v > 1 for real v≠0v \ne 0 (compare the power series term by term). Contradiction. (If a=0a = 0 the equation is tan⁡z=0\tan z = 0, whose roots kπk\pi are real.) So x=0x = 0 or y=0y = 0.

Real roots (y=0y = 0): tan⁡x=ax\tan x = ax. x=0x = 0 is always a root. The line y=axy = ax meets every branch of y=tan⁡xy = \tan x for large ∣x∣|x|, so there are infinitely many real roots; for large ∣k∣|k| there is one near (k+12)π(k + \tfrac12)\pi, just before or after it according to the sign of aa (Examples XVII, 4).

Imaginary roots (x=0x = 0): tan⁡iy=itanh⁡y\tan iy = i\tanh y, so the equation is tanh⁡y=ay\tanh y = ay. The function tanh⁡y/y\tanh y/y is even, equals 11 at y→0y \to 0, and decreases to 00 as ∣y∣→∞|y| \to \infty (its values lie in (0,1)(0, 1)). So there is a pair of non-zero roots ±y0\pm y_0 exactly when 0<a<10 < a < 1, and none when a≤0a \le 0 or a≥1a \ge 1.

Conclusion: infinitely many real roots always; in addition two purely imaginary roots ±iy0\pm iy_0 when 0<a<10 < a < 1; no other complex roots.

Limits and mappings

Exercise A general exponential limit ●●○ Hardy: Misc. Examples X, 12

Show that if n ϕ(z,n)→zn\,\phi(z, n) \to z as n→∞n \to \infty, then {1+ϕ(z,n)}n→exp⁡z\{1 + \phi(z, n)\}^n \to \exp z.

Hint
Write ϕn=ϕ(z,n)\phi_n = \phi(z, n). Then ϕn→0\phi_n \to 0, so eventually ∣ϕn∣<12|\phi_n| < \tfrac12 and the logarithmic series applies to log⁡(1+ϕn)\log(1 + \phi_n).
Hint
Show ∣log⁡(1+w)−w∣≤∣w∣2/(1−∣w∣)|\log(1 + w) - w| \le |w|^2/(1 - |w|) for ∣w∣<1|w| < 1, and use it to prove nlog⁡(1+ϕn)→zn\log(1 + \phi_n) \to z.

Solution

Since nϕn→zn\phi_n \to z, ϕn=(nϕn)/n→0\phi_n = (n\phi_n)/n \to 0. For ∣w∣<1|w| < 1, log⁡(1+w)−w=−12w2+13w3−⋯\log(1 + w) - w = -\tfrac12 w^2 + \tfrac13 w^3 - \cdots, whose modulus is at most ∣w∣2(1+∣w∣+∣w∣2+⋯ )=∣w∣2/(1−∣w∣)|w|^2(1 + |w| + |w|^2 + \cdots) = |w|^2/(1 - |w|). Hence, once ∣ϕn∣<12|\phi_n| < \tfrac12,

∣nlog⁡(1+ϕn)−nϕn∣≤n∣ϕn∣21−∣ϕn∣≤2 ∣nϕn∣ ∣ϕn∣→2∣z∣⋅0=0.|n\log(1 + \phi_n) - n\phi_n| \le \frac{n|\phi_n|^2}{1 - |\phi_n|} \le 2\,|n\phi_n|\,|\phi_n| \to 2|z| \cdot 0 = 0.

So nlog⁡(1+ϕn)→zn\log(1 + \phi_n) \to z. Finally {1+ϕn}n=exp⁡{nlog⁡(1+ϕn)}\{1 + \phi_n\}^n = \exp\{n\log(1 + \phi_n)\} (an integer power is one-valued), and exp⁡\exp is continuous (as in the proof of §246), so the limit is exp⁡z\exp z. The case ϕ=z/n\phi = z/n is §246 itself.

Exercise Strips and spirals ●●○ Hardy: Misc. Examples X, 14–15

Let z=exp⁡(πZ/a)z = \exp(\pi Z/a) with a>0a > 0. Show that (i) the principal value Z=(a/π)log⁡zZ = (a/\pi)\log z maps the whole zz-plane (without 00) onto the strip −a<Im⁡Z≤a-a < \operatorname{Im}Z \le a; (ii) a straight line in the ZZ-plane corresponds to an equiangular spiral in the zz-plane (or, in degenerate cases, a circle or a ray).

Hint
With Z=X+iYZ = X + iY: ∣z∣=eπX/a|z| = e^{\pi X/a} and am⁡z=πY/a\operatorname{am}z = \pi Y/a.
Hint
Parametrise the line as Z=Z0+s(cos⁡β+isin⁡β)Z = Z_0 + s(\cos\beta + i\sin\beta), ss real, and eliminate ss between log⁡r\log r and θ\theta.

Solution

(i) z=eπX/a{cos⁡(πY/a)+isin⁡(πY/a)}z = e^{\pi X/a}\{\cos(\pi Y/a) + i\sin(\pi Y/a)\}. The principal logarithm has imaginary part in (−π,π](-\pi, \pi], so Z=(a/π)log⁡zZ = (a/\pi)\log z has Y∈(−a,a]Y \in (-a, a], and each z≠0z \ne 0 corresponds to exactly one such ZZ. Other values of Log⁡z\operatorname{Log}z give the other strips (2k−1)a<Y≤(2k+1)a(2k - 1)a < Y \le (2k + 1)a.

(ii) On the line, log⁡r=πa(X0+scos⁡β)\log r = \tfrac{\pi}{a}(X_0 + s\cos\beta) and θ=πa(Y0+ssin⁡β)\theta = \tfrac\pi a(Y_0 + s\sin\beta), where θ\theta is a continuously varying amplitude. If sin⁡β≠0\sin\beta \neq 0, eliminating ss gives log⁡r=const+θcot⁡β\log r = \text{const} + \theta\cot\beta, i.e. r=Ceθcot⁡βr = Ce^{\theta\cot\beta}: an equiangular spiral, cutting each radius at the constant angle β\beta (since 1rdrdθ=cot⁡β\frac{1}{r}\frac{dr}{d\theta} = \cot\beta). If sin⁡β=0\sin\beta = 0 (horizontal line), θ\theta is constant: a ray. If cos⁡β=0\cos\beta = 0 (vertical line), rr is constant: a circle, covered infinitely often. This is the same picture as the values of aζa^\zeta, which lie on the image of a line under exp⁡\exp.

Level curves

Exercise The level curves of z exp z ●●○ Hardy: Misc. Examples X, 29

Sketch the level curves ∣zexp⁡z∣=k|z\exp z| = k for k>0k > 0. Then check your sketch with the figure below.

Hint
∣zexp⁡z∣=∣z∣ex|z\exp z| = |z|e^x. Look first at the real axis: where does ∣x∣ex|x|e^x take the value kk?
Hint
On the negative real axis, ∣x∣ex|x|e^x has a maximum 1/e1/e at x=−1x = -1, where the derivative (1+z)exp⁡z(1 + z)\exp z vanishes. Expect the shape to change at k=1/ek = 1/e.

Solution

On the real axis, g(x)=∣x∣exg(x) = |x|e^x increases from 00 to ∞\infty on [0,∞)[0, \infty), and on (−∞,0](-\infty, 0] rises from 00 (at −∞-\infty) to 1/e1/e (at x=−1x = -1) and falls back to 00 (at x=0x = 0).

  • k<1/ek < 1/e: the level set meets the real axis in three points: one in (0,∞)(0, \infty), one in (−1,0)(-1, 0), one in (−∞,−1)(-\infty, -1). The first two lie on a small closed oval round the zero z=0z = 0 (close to the circle ∣z∣=k|z| = k when kk is small). The third lies on an open curve to the left of −1-1, symmetric in the real axis, whose two branches go off to infinity with ∣y∣≈ke−x|y| \approx ke^{-x} as x→−∞x \to -\infty.
  • k=1/ek = 1/e: the oval and the open curve meet at z=−1z = -1, a double point where ddz(zexp⁡z)=0\frac{d}{dz}(z\exp z) = 0.
  • k>1/ek > 1/e: a single curve crossing the real axis once, at a positive xx, and opening out to the left.

As kk increases the curves move to the right on the right side, since ∣z∣ex|z|e^x grows rapidly with xx.

Explore Check your sketch

Try this. Select zexp⁡zz\exp z and move the level kk through 1/e≈0.3681/e \approx 0.368. Then look at sin⁡z\sin z, exp⁡z−c\exp z - c and sin⁡z−c\sin z - c (Hardy's Figs. 56–59).

∣zez∣=k|z e^{z}| = k
xy
  • Hardy’s levels k = 0.1, 0.2, 0.37, 0.6, 1, 2, 4
  • your level k
  • zeros (|f| = 0)
  • a point z (drag it)
At z=1.2+0.8iz = 1.2 + 0.8i the value is 0.87+4.71i0.87 + 4.71i, of modulus 4.794.79. Small k: small closed curves round the zeros. Large k: the curves leave the window, because the modulus is unbounded.
What to notice

For zexp⁡zz\exp z the oval round 00 and the open curve on the left join at z=−1z = -1 when k=1/ek = 1/e. In each family the shape changes exactly at levels through a point where the derivative vanishes.

Series and integrals

Exercise Odd harmonics ●●○ Hardy: Misc. Examples X, 32

Prove that, for 0<θ<π0 < \theta < \pi,

cos⁡θ+13cos⁡3θ+15cos⁡5θ+⋯=14log⁡cot⁡212θ,sin⁡θ+13sin⁡3θ+15sin⁡5θ+⋯=14π,\cos\theta + \tfrac13\cos 3\theta + \tfrac15\cos 5\theta + \cdots = \tfrac14\log\cot^2\tfrac12\theta, \qquad \sin\theta + \tfrac13\sin 3\theta + \tfrac15\sin 5\theta + \cdots = \tfrac14\pi,

and find the sums for all other θ\theta for which the series converge.

Hint
Use z+13z3+15z5+⋯=12{log⁡(1+z)−log⁡(1−z)}z + \tfrac13 z^3 + \tfrac15 z^5 + \cdots = \tfrac12\{\log(1 + z) - \log(1 - z)\}, valid for ∣z∣≤1|z| \le 1, z≠±1z \ne \pm1 (§244), with z=cos⁡θ+isin⁡θz = \cos\theta + i\sin\theta.
Hint
Find the principal amplitudes of 1+z1 + z and 1−z1 - z with half-angle formulae: 1−eiθ=2sin⁡12θ exp⁡{i(12θ−12π)}1 - e^{i\theta} = 2\sin\tfrac12\theta\,\exp\{i(\tfrac12\theta - \tfrac12\pi)\}.

Solution

Adding the series for log⁡(1+z)\log(1 + z) and log⁡{1/(1−z)}\log\{1/(1 - z)\} and halving gives ∑n oddzn/n=12{log⁡(1+z)−log⁡(1−z)}\sum_{n \text{ odd}} z^n/n = \tfrac12\{\log(1 + z) - \log(1 - z)\}, valid on ∣z∣=1|z| = 1 except at z=±1z = \pm 1.

With z=eiθz = e^{i\theta}, 0<θ<π0 < \theta < \pi: 1+z=2cos⁡12θ eiθ/21 + z = 2\cos\tfrac12\theta\,e^{i\theta/2} with 2cos⁡12θ>02\cos\tfrac12\theta > 0 and amplitude 12θ∈(0,12π)\tfrac12\theta \in (0, \tfrac12\pi); and 1−z=2sin⁡12θ ei(θ−π)/21 - z = 2\sin\tfrac12\theta\,e^{i(\theta - \pi)/2} with 2sin⁡12θ>02\sin\tfrac12\theta > 0 and amplitude 12(θ−π)∈(−12π,0)\tfrac12(\theta - \pi) \in (-\tfrac12\pi, 0). Both amplitudes are principal, so

12{log⁡(1+z)−log⁡(1−z)}=12log⁡cot⁡12θ+12i{12θ−12(θ−π)}=14log⁡cot⁡212θ+14πi.\tfrac12\{\log(1 + z) - \log(1 - z)\} = \tfrac12\log\cot\tfrac12\theta + \tfrac12 i\{\tfrac12\theta - \tfrac12(\theta - \pi)\} = \tfrac14\log\cot^2\tfrac12\theta + \tfrac14\pi i.

Equating real and imaginary parts gives both formulae.

Other θ\theta: replacing θ\theta by θ+π\theta + \pi changes zz to −z-z, and the series has only odd powers, so both sums change sign. Since cot⁡212(θ+π)=tan⁡212θ=1/cot⁡212θ\cot^2\tfrac12(\theta + \pi) = \tan^2\tfrac12\theta = 1/\cot^2\tfrac12\theta, the first formula holds for every θ\theta that is not a multiple of π\pi (where z=±1z = \pm 1 and the cosine series diverges). The sine series is 14π\tfrac14\pi for 2kπ<θ<(2k+1)π2k\pi < \theta < (2k + 1)\pi, −14π-\tfrac14\pi for (2k+1)π<θ<(2k+2)π(2k + 1)\pi < \theta < (2k + 2)\pi, and 00 at multiples of π\pi, where every term vanishes: a square wave.

Exercise An infinite integral of an exponential ●○○ Hardy: Misc. Examples X, 5

Let a>0a > 0 and bb be real. Show that ∫0∞exp⁡{−(a+ib)x} dx=1a+ib\displaystyle\int_0^\infty \exp\{-(a + ib)x\}\,dx = \frac{1}{a + ib}, and deduce the values of ∫0∞e−axcos⁡bx dx\int_0^\infty e^{-ax}\cos bx\,dx and ∫0∞e−axsin⁡bx dx\int_0^\infty e^{-ax}\sin bx\,dx.

Hint
For real xx, ddxexp⁡(−Ax)=−Aexp⁡(−Ax)\frac{d}{dx}\exp(-Ax) = -A\exp(-Ax) (§246), with A=a+ibA = a + ib.
Hint
∣exp⁡(−AX)∣=e−aX→0|\exp(-AX)| = e^{-aX} \to 0 as X→∞X \to \infty.

Solution

By the derivative rule, ∫0Xexp⁡(−Ax) dx=[−exp⁡(−Ax)A]0X=1−exp⁡(−AX)A\int_0^X\exp(-Ax)\,dx = \Bigl[-\dfrac{\exp(-Ax)}{A}\Bigr]_0^X = \dfrac{1 - \exp(-AX)}{A} (integrate real and imaginary parts). Since ∣exp⁡(−AX)∣=e−aX→0|\exp(-AX)| = e^{-aX} \to 0, the integral converges to 1/A=(a−ib)/(a2+b2)1/A = (a - ib)/(a^2 + b^2).

Now exp⁡{−(a+ib)x}=e−ax(cos⁡bx−isin⁡bx)\exp\{-(a + ib)x\} = e^{-ax}(\cos bx - i\sin bx). Equating real and imaginary parts: ∫0∞e−axcos⁡bx dx=aa2+b2\int_0^\infty e^{-ax}\cos bx\,dx = \dfrac{a}{a^2 + b^2} and ∫0∞e−axsin⁡bx dx=ba2+b2\int_0^\infty e^{-ax}\sin bx\,dx = \dfrac{b}{a^2 + b^2}, the results of Examples LXXXVIII, 6 obtained in one stroke.

Exercise An integral with complex constants ●●● Hardy: Misc. Examples X, 36

Let a≠ba \ne b, and suppose neither aa nor bb is real. Prove that

∫0∞dx(x−a)(x−b)=−log⁡(−a)−log⁡(−b)a−b,\int_0^\infty\frac{dx}{(x - a)(x - b)} = -\frac{\log(-a) - \log(-b)}{a - b},

each logarithm having its principal value. Verify the result when a=cia = ci, b=−cib = -ci, c>0c > 0.

Hint
Partial fractions: 1(x−a)(x−b)=1a−b(1x−a−1x−b)\dfrac{1}{(x - a)(x - b)} = \dfrac{1}{a - b}\Bigl(\dfrac{1}{x - a} - \dfrac{1}{x - b}\Bigr).
Hint
As xx runs along [0,∞)[0, \infty), the point x−ax - a moves on a horizontal line that never meets the real axis, so it never crosses the cut of the principal logarithm. Show that ddxlog⁡(x−a)=1/(x−a)\frac{d}{dx}\log(x - a) = 1/(x - a) there.
Hint
What does log⁡(x−a)−log⁡(x−b)\log(x - a) - \log(x - b) tend to as x→∞x \to \infty?

Solution

Antiderivative. For real xx, w(x)=x−aw(x) = x - a has constant non-zero imaginary part −Im⁡a-\operatorname{Im}a, so it stays in the open upper or lower half-plane, where the principal amplitude am⁡w\operatorname{am}w is a continuous, differentiable function. As in §231, ddx{log⁡∣w∣+iam⁡w}=w′w=1x−a\dfrac{d}{dx}\{\log|w| + i\operatorname{am}w\} = \dfrac{w'}{w} = \dfrac{1}{x - a}. Similarly for bb. Hence, by partial fractions,

∫0Xdx(x−a)(x−b)=1a−b[log⁡(x−a)−log⁡(x−b)]0X.\int_0^X\frac{dx}{(x - a)(x - b)} = \frac{1}{a - b}\Bigl[\log(x - a) - \log(x - b)\Bigr]_0^X.

Limit at infinity. As X→∞X \to \infty, ∣X−a∣/∣X−b∣→1|X - a|/|X - b| \to 1, and both principal amplitudes tend to 00 (a point with fixed imaginary part and real part →+∞\to +\infty has amplitude →0\to 0). So log⁡(X−a)−log⁡(X−b)→0\log(X - a) - \log(X - b) \to 0.

Result. The integral is 1a−b{0−(log⁡(−a)−log⁡(−b))}=−log⁡(−a)−log⁡(−b)a−b\dfrac{1}{a - b}\{0 - (\log(-a) - \log(-b))\} = -\dfrac{\log(-a) - \log(-b)}{a - b}.

Check. a=cia = ci, b=−cib = -ci: the integrand is 1/(x2+c2)1/(x^2 + c^2), with integral π/(2c)\pi/(2c). The formula gives log⁡(−ci)=log⁡c−12πi\log(-ci) = \log c - \tfrac12\pi i, log⁡(ci)=log⁡c+12πi\log(ci) = \log c + \tfrac12\pi i, so −−πi2ci=π2c-\dfrac{-\pi i}{2ci} = \dfrac{\pi}{2c}. ✓

(If aa or bb is real and negative, x−ax - a stays on the positive real axis and the formula still holds; if one is real and positive or zero, the integrand has a pole on the path (or at its end-point 00) and the integral does not exist as it stands. This is the “discuss” part of Hardy’s problem.)