Taylor series
A Taylor series is a method of approximating a function within a certain range by means of adding successive powers of a small parameter, such that each approximation is increasingly precise by a factor of that parameter. While these can be defined for essentially any function, the most useful series in xenharmony are the Taylor series for the logarithm, as the size of an interval is the logarithm of its frequency ratio.
Logarithmic Taylor series
We will use certain properties of logarithms in what follows: as a reminder, the sum of two logarithms is the logarithm of the product and the difference of two logarithms is the logarithm of the fraction, and the logarithm of 1 is 0.
For a value of x between -1 and 1, exclusive, the following series can be found for the natural logarithm (ln) function:
ln(1+x) = x - x2/2 + x3/3 - x4/4 + .... If x here is a fraction, 1/k, this series gives the logarithm of the superparticular interval (k+1)/k. In fact, we will generally write these series, and those that follow, in terms of k.
ln(1 + 1/k) = ln((k+1)/k) = 1/k - 1/(2k2) + 1/(3k3) - 1/(4k4) + .... Reversing the sign of k here, and flipping the sign of the entire logarithm, gives us:
ln(1/(1 - 1/k)) = ln(k/(k-1))= 1/k + 1/(2k2) + 1/(3k3) + 1/(4k4) + ....
Note that we can add these series or subtract these series. Subtracting, and flipping the overall sign, provides us with the expression for -ln((k+1)/k) + ln(k/(k-1)) = ln(k2/(k2 - 1)), the logarithmic size of a square superparticular comma:
ln(k2/(k2 - 1)) = 1/k2 + 1/(2k4) + 1/(3k6) + .... As the series' first term has 1/k to the second power, square superparticulars (and triangle-particulars, etc.) can be called second-order commas.
If we add the two expressions, we get the so-called Euler series:
ln((k+1)/(k-1)) = 2[1/k + 1/(3k3) + 1/(5k5) + ...]. This series is particularly important as this series can compute the logarithm of all intervals from 1 to infinity while x = 1/k only varies from 0 to 1, as well as due to its rapid convergence.
To take the logarithm of any arbitrary ratio a/b, let k = (a+b)/(a-b); then (k+1)/(k-1) = a/b. We call k the bimodular approximant of the fraction a/b, and we will concern ourselves with these as we study third-order commas.
Bimodular approximants
A comma is a ratio (or logarithmic difference) between stacks of intervals. Consider two intervals, p < q, with bimodular approximants s and t respectively. Let h be the least common multiple of s and t. For example, if our two intervals are p = 5/4 and q = 7/5, s = 9 and t = 6, so that h = 18. h/s and h/t are by definition always integers; in this case h/s = 2 and h/t = 3.
Therefore, qh/s p-h/t is a rational number that represents the difference between a stack of interval q and another stack of interval p. This defines the third-order comma between the intervals p and q. In this example, our comma is (7/5)2 (5/4)-3 = 3136/3125, the Didacus comma.
Taking the Taylor series of its logarithm, we obtain (h/s) (2/t) (1 + 1/(3t2)) - (h/t) (2/s) (1 + 1/(3s2)) = 2h/(st) (1 + 1/(3t2) - 1 - 1/(3s2)) = (2/3) h/(st) [1/(t2) - 1/(s2)], to third order in 1/s and 1/t, which is why these are called "third-order" commas - the first-order terms cancel out.
But the expression is not necessarily truly third-order. Let h/s = a and h/s = b. In that case, h/(st) = sqrt(ab/st). We also note 1/(t2) - 1/(s2) = (s-t)(s+t)/(s2t2), so the expression for the third-order comma becomes (2/3) sqrt(ab)(s-t)(s+t)/(st)5/2. Note that generically, sqrt(ab), s-t, and s+t are all first-order in the sizes of s and t, and in that case the expression is in fact only second-order in s and t. The families of commas that are truly third-order have either fixed ab, or fixed s-t.
