Chapter IX · The logarithmic, exponential and circular functions of a real variable

The addition formulae from the integral

§§225–226 35 min

A single substitution in ∫dt/(1+t2)\int dt/(1+t^2) proves arctan⁡x1+arctan⁡x2=arctan⁡x1+x21−x1x2\arctan x_1 + \arctan x_2 = \arctan\frac{x_1+x_2}{1-x_1x_2}, with a correction of ±π\pm\pi that the circle makes visible; continuity then fixes the sign in the formula for cos⁡(y1+y2)\cos(y_1 + y_2).

Why this matters

The definitions of §224 produce three functions, but so far we know almost nothing about them. Everything else in trigonometry (double angles, product formulae, periodicity in its usual form) follows from the addition formulae. In §225 Hardy proves the formula for tan⁡(y1+y2)\tan(y_1 + y_2) directly from the integral that defines arctan⁡\arctan, and in §226 he deduces the formula for cos⁡(y1+y2)\cos(y_1 + y_2), settling a sign by a neat continuity argument. Both arguments are models of how to handle a “many-valued” formula carefully.

The idea

A calculation with differentials (Hardy writes it out) shows that, with z=x+y1−xyz = \frac{x+y}{1-xy},

dx1+x2+dy1+y2=dz1+z2.\frac{dx}{1+x^2} + \frac{dy}{1+y^2} = \frac{dz}{1+z^2}.

This suggests arctan⁡x+arctan⁡y=arctan⁡x+y1−xy\arctan x + \arctan y = \arctan\frac{x+y}{1-xy}. But the suggestion cannot be right as it stands: the left side can be anything in (−π,π)(-\pi, \pi), while our arctan⁡\arctan always lies in (−12π,12π)(-\tfrac12\pi, \tfrac12\pi). For instance arctan⁡2+arctan⁡3≈2.36\arctan 2 + \arctan 3 \approx 2.36, more than 12π\tfrac12\pi. The truth is that the formula holds up to a multiple of π\pi, and we must find out which multiple.

Explore When does arctan⁡x1+arctan⁡x2=arctan⁡x\arctan x_1 + \arctan x_2 = \arctan x?

Try this. Start with x1=12x_1 = \frac12, x2=13x_2 = \frac13. Increase x2x_2 slowly until x1x2x_1x_2 passes 11, and watch the purple point (angle y1+y2y_1 + y_2) and the hollow ochre point (angle arctan⁡x\arctan x). Then try two negative values.

  • angle y1=arctan⁡x1y_1 = \arctan x_1
  • then y2=arctan⁡x2y_2 = \arctan x_2
  • the point at angle y1+y2y_1 + y_2
  • line of slope xx (hollow dot: angle arctan⁡x\arctan x)
y1+y2=0.4636+0.3218=0.7854y_1 + y_2 = 0.4636 + 0.3218 = 0.7854; x1x2=0.1667x_1x_2 = 0.1667. x=1x = 1 and arctan⁡x=0.7854\arctan x = 0.7854: the two points coincide and arctan⁡x1+arctan⁡x2=arctan⁡x\arctan x_1 + \arctan x_2 = \arctan x.
What to notice

The purple and ochre points always lie on the same dashed line, the line of slope xx; that is why tan⁡(y1+y2)=x\tan(y_1 + y_2) = x in every case. While x1x2<1x_1x_2 < 1 the two points coincide. When x1x2>1x_1x_2 > 1 the sum y1+y2y_1 + y_2 passes ±12π\pm\tfrac12\pi, the two points sit at opposite ends of the line, and the angles differ by exactly π\pi. At x1x2=1x_1x_2 = 1 the line is vertical and xx is undefined.

Precise statements

Theorem Addition of inverse tangents Hardy: §225

Let x1,x2x_1, x_2 be real with x1x2≠1x_1x_2 \ne 1, and put x=x1+x21−x1x2x = \dfrac{x_1+x_2}{1-x_1x_2}. Then

arctan⁡x1+arctan⁡x2={arctan⁡xif x1x2<1,arctan⁡x+πif x1x2>1 and x1>0,arctan⁡x−πif x1x2>1 and x1<0.\arctan x_1 + \arctan x_2 = \begin{cases} \arctan x & \text{if } x_1x_2 < 1, \\ \arctan x + \pi & \text{if } x_1x_2 > 1 \text{ and } x_1 > 0, \\ \arctan x - \pi & \text{if } x_1x_2 > 1 \text{ and } x_1 < 0. \end{cases}
Theorem Addition formula for the tangent Hardy: §225 (1)

For all y1,y2y_1, y_2 such that none of y1y_1, y2y_2, y1+y2y_1 + y_2 is an odd multiple of 12π\tfrac12\pi,

tan⁡(y1+y2)=tan⁡y1+tan⁡y21−tan⁡y1tan⁡y2.\tan(y_1 + y_2) = \frac{\tan y_1 + \tan y_2}{1 - \tan y_1\tan y_2}.
Theorem Addition formulae for cosine and sine Hardy: §226 (2)

For all real y1,y2y_1, y_2,

cos⁡(y1+y2)=cos⁡y1cos⁡y2−sin⁡y1sin⁡y2,sin⁡(y1+y2)=sin⁡y1cos⁡y2+cos⁡y1sin⁡y2.\cos(y_1 + y_2) = \cos y_1\cos y_2 - \sin y_1\sin y_2, \qquad \sin(y_1 + y_2) = \sin y_1\cos y_2 + \cos y_1\sin y_2.

Proofs

The key is a substitution that shifts the variable of integration “by an angle”. For fixed x1x_1 put

t=x1+u1−x1u,u=t−x11+x1t.t = \frac{x_1 + u}{1 - x_1u}, \qquad u = \frac{t - x_1}{1 + x_1t}.

Then dtdu=1+x12(1−x1u)2\dfrac{dt}{du} = \dfrac{1 + x_1^2}{(1 - x_1u)^2} and 1+t2=(1+x12)(1+u2)(1−x1u)21 + t^2 = \dfrac{(1 + x_1^2)(1 + u^2)}{(1 - x_1u)^2}, so dt1+t2=du1+u2\dfrac{dt}{1+t^2} = \dfrac{du}{1+u^2}. As uu increases, tt increases too, except that it jumps from +∞+\infty to −∞-\infty (when x1>0x_1 > 0) as uu passes the point 1/x11/x_1, where the denominator vanishes. When u=−x1u = -x_1, t=0t = 0; when u=x2u = x_2, t=xt = x.

Proof Addition of inverse tangents
Strategy

Write arctan⁡x\arctan x as an integral in tt, change the variable to uu, and split the uu-integral at 00 into arctan⁡x1+arctan⁡x2\arctan x_1 + \arctan x_2. If the range of uu crosses the pole u=1/x1u = 1/x_1, the tt-integral runs out to +∞+\infty and comes back from −∞-\infty, which adds π\pi.

The case x1x2<1x_1x_2 < 1: the range of uu avoids the pole

If x1>0x_1 > 0, the condition says x2<1/x1x_2 < 1/x_1, and of course −x1<1/x1-x_1 < 1/x_1, so the uu-interval between −x1-x_1 and x2x_2 does not contain 1/x11/x_1. If x1<0x_1 < 0 it says x2>1/x1x_2 > 1/x_1, with the same conclusion. (If x1=0x_1 = 0 there is nothing to prove.) On this interval the substitution is continuous and monotonic.

Change the variable

arctan⁡x=∫0xdt1+t2=∫−x1x2du1+u2=∫−x10du1+u2+∫0x2du1+u2=arctan⁡x1+arctan⁡x2,\arctan x = \int_0^x \frac{dt}{1+t^2} = \int_{-x_1}^{x_2}\frac{du}{1+u^2} = \int_{-x_1}^{0}\frac{du}{1+u^2} + \int_0^{x_2}\frac{du}{1+u^2} = \arctan x_1 + \arctan x_2,

using that the integrand is even, so ∫−x10=∫0x1\int_{-x_1}^0 = \int_0^{x_1}.

The case x1>0x_1 > 0, x1x2>1x_1x_2 > 1: crossing the pole

Now x2>1/x1x_2 > 1/x_1. As uu runs from −x1-x_1 up to 1/x11/x_1, tt runs from 00 up to +∞+\infty; as uu runs on from 1/x11/x_1 to x2x_2, tt runs from −∞-\infty up to xx. Splitting the uu-integral at 1/x11/x_1 and substituting in each piece,

∫−x1x2du1+u2=∫0∞dt1+t2+∫−∞xdt1+t2=12π+(12π+arctan⁡x)=π+arctan⁡x.\int_{-x_1}^{x_2}\frac{du}{1+u^2} = \int_0^\infty\frac{dt}{1+t^2} + \int_{-\infty}^{x}\frac{dt}{1+t^2} = \tfrac12\pi + \bigl(\tfrac12\pi + \arctan x\bigr) = \pi + \arctan x.

The left side is again arctan⁡x1+arctan⁡x2\arctan x_1 + \arctan x_2.

The case x1<0x_1 < 0, x1x2>1x_1x_2 > 1

Apply the previous case to −x1,−x2-x_1, -x_2 and use that arctan⁡\arctan is odd: the correction becomes −π-\pi.

Proof Addition formula for the tangent
Strategy

Translate the theorem on inverse tangents into a statement about tan⁡\tan, first on the basic interval, then everywhere by the periodicity rule (6) of §224.

y1,y2y_1, y_2 in (−12π,12π)(-\tfrac12\pi, \tfrac12\pi)

Put x1=tan⁡y1x_1 = \tan y_1, x2=tan⁡y2x_2 = \tan y_2, so yk=arctan⁡xky_k = \arctan x_k. If x1x2<1x_1x_2 < 1, the theorem gives y1+y2=arctan⁡xy_1 + y_2 = \arctan x, so tan⁡(y1+y2)=x\tan(y_1 + y_2) = x. If x1x2>1x_1x_2 > 1 and x1>0x_1 > 0, it gives y1+y2−π=arctan⁡xy_1 + y_2 - \pi = \arctan x, and by (6) tan⁡(y1+y2)=tan⁡(y1+y2−π)=x\tan(y_1 + y_2) = \tan(y_1 + y_2 - \pi) = x; similarly for x1<0x_1 < 0. In every case tan⁡(y1+y2)=x=tan⁡y1+tan⁡y21−tan⁡y1tan⁡y2\tan(y_1 + y_2) = x = \frac{\tan y_1 + \tan y_2}{1 - \tan y_1\tan y_2}.

All other y1,y2y_1, y_2

Both sides are unchanged when y1y_1 or y2y_2 is increased by π\pi (by (6)), so the formula holds wherever both sides are defined.

For the cosine, the tangent formula and the definition cos⁡2y=1/(1+tan⁡2y)\cos^2 y = 1/(1 + \tan^2 y) give, after a little algebra,

cos⁡2(y1+y2)=(1−tan⁡y1tan⁡y2)2(1+tan⁡2y1)(1+tan⁡2y2)=(cos⁡y1cos⁡y2−sin⁡y1sin⁡y2)2,\cos^2(y_1 + y_2) = \frac{(1 - \tan y_1\tan y_2)^2}{(1 + \tan^2 y_1)(1 + \tan^2 y_2)} = (\cos y_1\cos y_2 - \sin y_1\sin y_2)^2,

first where all the tangents are defined and then everywhere by continuity. So cos⁡(y1+y2)=±(cos⁡y1cos⁡y2−sin⁡y1sin⁡y2)\cos(y_1 + y_2) = \pm(\cos y_1\cos y_2 - \sin y_1\sin y_2). The squares have lost the sign, and Hardy recovers it by continuity.

Proof The sign in the cosine formula (§226)
Strategy

Fix y1y_1 and regard both sides as continuous functions of y2y_2: F(y2)=cos⁡(y1+y2)F(y_2) = \cos(y_1 + y_2) and G(y2)=cos⁡y1cos⁡y2−sin⁡y1sin⁡y2G(y_2) = \cos y_1\cos y_2 - \sin y_1\sin y_2. We know F2=G2F^2 = G^2. Where F≠0F \ne 0 the ratio F/GF/G is continuous and equal to ±1\pm 1, so it can switch only at zeros. Show that between any two consecutive zeros there is a point where F=GF = G.

The zeros

F(y2)=0F(y_2) = 0 exactly when y1+y2y_1 + y_2 is an odd multiple of 12π\tfrac12\pi: one point in every interval of length π\pi, namely y2=(k+12)π−y1y_2 = (k + \tfrac12)\pi - y_1. Since F2=G2F^2 = G^2, GG has the same zeros.

Between zeros the sign is constant

On each open interval between consecutive zeros, FF and GG are continuous and never 00, and F/GF/G takes only the values ±1\pm1. A continuous function with values in {−1,1}\{-1, 1\} on an interval is constant (intermediate value theorem).

Each interval contains a point where F=GF = G

At y2=0y_2 = 0, F=cos⁡y1=GF = \cos y_1 = G. Increasing y2y_2 by π\pi changes the sign of both FF and GG (rule (6)), so F=GF = G at every multiple of π\pi. Each interval between consecutive zeros has length π\pi and so contains a multiple of π\pi in its interior, unless cos⁡y1=0\cos y_1 = 0.

Conclude

So F=GF = G on every interval, and at the zeros too; hence cos⁡(y1+y2)=cos⁡y1cos⁡y2−sin⁡y1sin⁡y2\cos(y_1 + y_2) = \cos y_1\cos y_2 - \sin y_1\sin y_2 whenever cos⁡y1≠0\cos y_1 \ne 0. The excluded values of y1y_1 are isolated, and both sides are continuous in y1y_1, so the formula holds for them as well. The sine formula is proved in the same way (Exercise 4).

Worked examples and exercises

Exercise Euler's formula for π\pi ●○○ Hardy: §221, §225

Show that arctan⁡12+arctan⁡13=14π\arctan\frac12 + \arctan\frac13 = \frac14\pi.

Hint
Check the condition x1x2<1x_1x_2 < 1 and compute xx.

Solution

x1x2=16<1x_1x_2 = \frac16 < 1, so the sum is arctan⁡x\arctan x with x=1/2+1/31−1/6=5/65/6=1x = \frac{1/2 + 1/3}{1 - 1/6} = \frac{5/6}{5/6} = 1. Finally arctan⁡1=14π\arctan 1 = \frac14\pi from the definitions: the substitution t=1/ut = 1/u shows ∫01dt1+t2=∫1∞du1+u2\int_0^1\frac{dt}{1+t^2} = \int_1^\infty\frac{du}{1+u^2}, so each is half of ∫0∞=12π\int_0^\infty = \tfrac12\pi.

Exercise ●○○ Hardy: §225

Find arctan⁡2+arctan⁡3\arctan 2 + \arctan 3 and arctan⁡(−2)+arctan⁡(−3)\arctan(-2) + \arctan(-3).

Hint
Here x1x2=6>1x_1x_2 = 6 > 1.

Solution

x=2+31−6=−1x = \frac{2 + 3}{1 - 6} = -1 and arctan⁡(−1)=−14π\arctan(-1) = -\frac14\pi. Since x1>0x_1 > 0 and x1x2>1x_1x_2 > 1, arctan⁡2+arctan⁡3=−14π+π=34π≈2.356\arctan 2 + \arctan 3 = -\frac14\pi + \pi = \frac34\pi \approx 2.356. By oddness arctan⁡(−2)+arctan⁡(−3)=−34π\arctan(-2) + \arctan(-3) = -\frac34\pi. The naive formula would give −14π-\frac14\pi, which is not even positive.

Exercise Machin's formula ●●○ Hardy: Examples XCII, 12

Prove that 4arctan⁡15−arctan⁡1239=14π4\arctan\frac15 - \arctan\frac1{239} = \frac14\pi.

Hint
Apply the addition theorem three times: arctan⁡15+arctan⁡15\arctan\frac15 + \arctan\frac15, then double again, then subtract arctan⁡1239\arctan\frac1{239}. Check x1x2<1x_1x_2 < 1 each time.

Solution

2arctan⁡15=arctan⁡2/51−1/25=arctan⁡5122\arctan\frac15 = \arctan\frac{2/5}{1 - 1/25} = \arctan\frac5{12} (product 125<1\frac1{25} < 1). Then 4arctan⁡15=arctan⁡10/121−25/144=arctan⁡1201194\arctan\frac15 = \arctan\frac{10/12}{1 - 25/144} = \arctan\frac{120}{119} (product 25144<1\frac{25}{144} < 1). Finally, since arctan⁡(−v)=−arctan⁡v\arctan(-v) = -\arctan v, arctan⁡120119+arctan⁡(−1239)=arctan⁡120/119−1/2391+120/(119⋅239)\arctan\frac{120}{119} + \arctan\bigl(-\frac{1}{239}\bigr) = \arctan\frac{120/119 - 1/239}{1 + 120/(119 \cdot 239)} (product negative, so less than 11), and

120⋅239−119119⋅239+120=2856128561=1.\frac{120 \cdot 239 - 119}{119 \cdot 239 + 120} = \frac{28561}{28561} = 1.

So 4arctan⁡15−arctan⁡1239=arctan⁡1=14π4\arctan\frac15 - \arctan\frac1{239} = \arctan 1 = \frac14\pi.

Exercise The sine formula ●●○ Hardy: §226 (end)

Prove sin⁡(y1+y2)=sin⁡y1cos⁡y2+cos⁡y1sin⁡y2\sin(y_1 + y_2) = \sin y_1\cos y_2 + \cos y_1\sin y_2 by Hardy’s method.

Hint
From sin⁡2y=tan⁡2y/(1+tan⁡2y)\sin^2 y = \tan^2 y/(1 + \tan^2 y) and the tangent formula, show that both sides have the same square.
Hint
Zeros of sin⁡(y1+y2)\sin(y_1 + y_2), as a function of y2y_2, are at y2=kπ−y1y_2 = k\pi - y_1. Compare the two sides at multiples of π\pi.

Solution

With tk=tan⁡ykt_k = \tan y_k, sin⁡2(y1+y2)=tan⁡2(y1+y2)1+tan⁡2(y1+y2)=(t1+t2)2(1−t1t2)2+(t1+t2)2=(t1+t2)2(1+t12)(1+t22)\sin^2(y_1 + y_2) = \frac{\tan^2(y_1+y_2)}{1 + \tan^2(y_1 + y_2)} = \frac{(t_1 + t_2)^2}{(1-t_1t_2)^2 + (t_1+t_2)^2} = \frac{(t_1+t_2)^2}{(1+t_1^2)(1+t_2^2)}, and (sin⁡y1cos⁡y2+cos⁡y1sin⁡y2)2=cos⁡2y1cos⁡2y2 (t1+t2)2(\sin y_1\cos y_2 + \cos y_1\sin y_2)^2 = \cos^2 y_1\cos^2 y_2\,(t_1 + t_2)^2 is the same. (Where tangents are undefined, use continuity.) As functions of y2y_2, both sides change sign under y2↦y2+πy_2 \mapsto y_2 + \pi; at y2=0y_2 = 0 both equal sin⁡y1\sin y_1, hence they agree at every multiple of π\pi. The zeros of sin⁡(y1+y2)\sin(y_1 + y_2) are at y2=kπ−y1y_2 = k\pi - y_1, one per interval of length π\pi, and if sin⁡y1≠0\sin y_1 \ne 0 each interval between consecutive zeros contains a multiple of π\pi in its interior. As before, the ratio is constant =1= 1 between zeros, so the formula holds; the isolated values with sin⁡y1=0\sin y_1 = 0 follow by continuity in y1y_1.

Exercise Double angles ●○○ Hardy: §226

Deduce that tan⁡2y=2tan⁡y1−tan⁡2y\tan 2y = \dfrac{2\tan y}{1 - \tan^2 y} and cos⁡2y=cos⁡2y−sin⁡2y=1−tan⁡2y1+tan⁡2y\cos 2y = \cos^2 y - \sin^2 y = \dfrac{1 - \tan^2 y}{1 + \tan^2 y}.

Hint
Put y1=y2=yy_1 = y_2 = y.

Solution

With y1=y2=yy_1 = y_2 = y the tangent formula gives the first (where defined), and the cosine formula gives cos⁡2y=cos⁡2y−sin⁡2y=cos⁡2y (1−tan⁡2y)=1−tan⁡2y1+tan⁡2y\cos 2y = \cos^2 y - \sin^2 y = \cos^2 y\,(1 - \tan^2 y) = \frac{1 - \tan^2 y}{1 + \tan^2 y}, using cos⁡2y=1/(1+tan⁡2y)\cos^2 y = 1/(1 + \tan^2 y).

Check yourself

Check yourself Enter a number

arctan⁡2+arctan⁡3=c π\arctan 2 + \arctan 3 = c\,\pi. What is cc?

Why

x=51−6=−1x = \frac{5}{1-6} = -1, arctan⁡(−1)=−14π\arctan(-1) = -\frac14\pi, and since x1>0x_1 > 0, x1x2=6>1x_1x_2 = 6 > 1, we add π\pi: the sum is 34π\frac34\pi, so c=0.75c = 0.75.

Check yourself True or false?

For all real x1,x2x_1, x_2 with x1x2≠1x_1x_2 \ne 1, arctan⁡x1+arctan⁡x2=arctan⁡x1+x21−x1x2\arctan x_1 + \arctan x_2 = \arctan\dfrac{x_1+x_2}{1-x_1x_2}.

Why

False. The right side always lies in (−12π,12π)(-\tfrac12\pi, \tfrac12\pi), the left side need not. The equation holds when x1x2<1x_1x_2 < 1; when x1x2>1x_1x_2 > 1 a correction of +π+\pi (if x1>0x_1 > 0) or −π-\pi (if x1<0x_1 < 0) is needed. What is always true is that the tangents of the two sides are equal.

Check yourself Choose one

In the proof, where does the extra π\pi come from when x1x2>1x_1x_2 > 1?

Why

The substitution is valid on each side of the pole u=1/x1u = 1/x_1 separately. Splitting there, the tt-integral covers [0,∞)[0, \infty) and then (−∞,x](-\infty, x], which is the interval [0,x][0, x] plus the whole line, so it exceeds arctan⁡x\arctan x by exactly π\pi. Periodicity of tan⁡\tan is used only afterwards, to turn the statement about arctan⁡\arctan into one about tan⁡\tan.

Check yourself Choose one

The squares of cos⁡(y1+y2)\cos(y_1 + y_2) and cos⁡y1cos⁡y2−sin⁡y1sin⁡y2\cos y_1\cos y_2 - \sin y_1\sin y_2 agree. Why can’t the sign switch from ++ to −- somewhere between two zeros?

Why

A jump of the ratio from 11 to −1-1 would need a point where one of the functions vanishes or is discontinuous. The other options are false or circular: the aim is to prove the school formula from the new definitions.

Hardy’s language

This suggests that arc tan x + arc tan y = arc tan z, but the functions are many valued, and the formula requires more careful examination.

— G. H. Hardy, §225

Summary

Summary
  • The substitution t=(x1+u)/(1−x1u)t = (x_1 + u)/(1 - x_1u) preserves dt/(1+t2)dt/(1+t^2) and proves arctan⁡x1+arctan⁡x2=arctan⁡x1+x21−x1x2\arctan x_1 + \arctan x_2 = \arctan\frac{x_1+x_2}{1-x_1x_2} when x1x2<1x_1x_2 < 1.
  • When x1x2>1x_1x_2 > 1 the substituted variable passes through infinity and the formula gains ±π\pm\pi; the tangent formula tan⁡(y1+y2)=tan⁡y1+tan⁡y21−tan⁡y1tan⁡y2\tan(y_1+y_2) = \frac{\tan y_1 + \tan y_2}{1 - \tan y_1\tan y_2} holds in all cases.
  • cos⁡2(y1+y2)=(cos⁡y1cos⁡y2−sin⁡y1sin⁡y2)2\cos^2(y_1+y_2) = (\cos y_1\cos y_2 - \sin y_1\sin y_2)^2 follows by algebra; continuity in y2y_2 and the check at multiples of π\pi fix the sign.
  • With the addition formulae, all of trigonometry now rests on the single integral ∫dt/(1+t2)\int dt/(1+t^2).