Tangent sum

When I was writing my post on lemniscate functions yesterday, a line from the Wikipedia article seemed familiar for reasons I cannot place.

Defining a tangent-sum operator as ab := tan(arctan ⁡ a + arctan ⁡ b) gives cl² z ⊕ sl² z = 1.

I feel like I’ve seen this tangent-sum used before, but I can’t remember where. Two near misses come to mind, but I don’t think either is the application I’m trying to remember.

The first near miss is the function

f(t) = arctan(k tan(t)).

I’ve written about this function here and here. This is a sort of inversion of the tangent-sum, swapping the roles of tangent and inverse tangent, and adding something to itself k times rather than adding k different things together.

The second near miss is a chapter in the book Inequalities by Hardy, Littlewood, and Pólya that looks at means of the form

φ−1( Σ p φ(a) )

Here a is a list of non-negative numbers, p is a set of positive weights summing to 1. Various kinds of means have this form. For example, the p-means correspond to φ(x) = xp and the geometric mean corresponds to φ(x) = log x. The same chapter also looks at sums where the weights are removed.

The tangent sum has the form above if we set φ(x) = arctan(x), but Hardy, Littlewood, and Pólya are primarily interested in functions φ that have properties that arctan doesn’t have, such as convexity or φ(x) tending to ∞ as x goes to 0 or as x goes to ∞.

Because of the sum angle identity for tangent, we could write the tangent-sum as simply

ab = (a + b) / (1 − ab)

though this hides the φ−1(φ(a) + φ(b)) structure.

The tangent-sum has some awkward features. For one thing, the sum of two finite numbers can be infinite. For example, 1 ⊕ 1 = ∞. Also, the sum of two positive numbers can be negative, such as 1 ⊕ 2 = −1. Hardy, Littlewood, and Pólya put the conditions on φ that they do in order to eliminate this kind of behavior.

The tangent-sum does have some nice properties however. It’s clearly commutative, and we can show it’s associative too by showing

(ab) ⊕ c = tan(arctan a + arctan b + arctan c) = a ⊕ (bc).

The general pattern when we apply ⊕ many times takes a while to become clear. If we add three terms we get

abc = (a + b + cabc) / (1 − abbcac).

If we add four terms, the numerator of abcd is

a + b + c + d − (abcabdacdbcd)

and the denominator is

1 − (abacadbcbdcd) + abcd.

The general pattern is that numerator and denominator are both alternating sums. The numerator is the sum of all the terms, minus the sum of all distinct products of three of terms, plus the sum of all distinct products of five terms, etc. The denominator is the empty sum, 1, minus the sum of all distinct products of pairs of terms, plus the sum of all distinct products of four terms, etc.

To put it another way, the numerator is

e1e3 + e5 − …

and the denominator is

e0e2 + e4 − …

where ei is the sum of all distinct products of i variables. A name for ei is the ith elementary symmetric polynomial.

You could think of the numerator and denominator as infinite sums, even if you’re taking the tangent-sum of a finite number of arguments. Just pad your argument list with zeros and only the needed terms in the numerator and denominator will be non-zero. If you only have n non-zero arguments then ei = 0 for i > n because every product in the definition of ei will contain a zero term.

3 thoughts on “Tangent sum

  1. I don’t suppose you’re thinking of the velocity addition formula in special relativity? It can be written as tanh(arctanh(u) + arctanh(v)), when u and v are relative to the speed of light. This is another way of saying that rapidities are additive while velocities themselves are not.

Comments are closed.