The Riemann zeta function and tuning: Difference between revisions
→Gene Smith's original derivation: formatting |
|||
Line 7: | Line 7: | ||
== Gene Smith's original derivation == | == Gene Smith's original derivation == | ||
=== Preliminaries === | === Preliminaries === | ||
Suppose x is a variable representing some equal division of the octave. For example, if x = 80, x reflects 80edo with a step size of 15 cents and with pure octaves. Suppose that x can also be continuous, so that it can also represent fractional or "nonoctave" divisions as well. The [[Bohlen-Pierce|Bohlen-Pierce scale]], 13 equal divisions of 3/1, is approximately 8.202 equal divisions of the "octave" (although the octave itself does not appear in this tuning), and would hence be represented by a value of x = 8.202. | Suppose ''x'' is a variable representing some equal division of the octave. For example, if ''x'' = 80, ''x'' reflects 80edo with a step size of 15 cents and with pure octaves. Suppose that ''x'' can also be continuous, so that it can also represent fractional or "nonoctave" divisions as well. The [[Bohlen-Pierce|Bohlen-Pierce scale]], 13 equal divisions of 3/1, is approximately 8.202 equal divisions of the "octave" (although the octave itself does not appear in this tuning), and would hence be represented by a value of ''x'' = 8.202. | ||
Now suppose that ||x|| denotes the difference between x and the integer nearest to x. For example, ||8.202|| would be .202, since it's the difference between 8.202 and the nearest integer, which is 8. ||7.95|| would be .05, which is the difference between 7.95 and the nearest integer, which is 8. Mathematically speaking, ||x|| denotes the function |x - | Now suppose that ||''x''|| denotes the difference between ''x'' and the integer nearest to ''x''. For example, ||8.202|| would be 0.202, since it's the difference between 8.202 and the nearest integer, which is 8. ||7.95|| would be 0.05, which is the difference between 7.95 and the nearest integer, which is 8. Mathematically speaking, ||''x''|| denotes the function |''x'' - ⌊x+1/2⌋|. | ||
For any value of x, we can construct a p-limit [[Patent_val|generalized patent val]]. We do so by rounding | For any value of ''x'', we can construct a ''p''-limit [[Patent_val|generalized patent val]]. We do so by rounding ''x'' log<sub>2</sub>(''q'') to the nearest integer for each prime ''q'' up to ''p''. Now consider the function | ||
<math>\ | <math>\displaystyle \xi_p(x) = \sum_{\substack{2 \leq q \leq p \\ q \text{ prime}}} \left(\frac{||x \log_2 q||}{\log_2 q}\right)^2</math> | ||
This function has local minima, corresponding to associated generalized patent vals. The minima occur for values of x which are the [[Tenney-Euclidean_Tuning|Tenney-Euclidean tuning]]s of the octaves of the associated vals, while ξ for these minima is the square of the [[Tenney-Euclidean_metrics|Tenney-Euclidean relative error]] of the val - equal to the TE error times the TE complexity, and sometimes known as "TE simple badness." | This function has local minima, corresponding to associated generalized patent vals. The minima occur for values of x which are the [[Tenney-Euclidean_Tuning|Tenney-Euclidean tuning]]s of the octaves of the associated vals, while ξ<sub>''p''</sub> for these minima is the square of the [[Tenney-Euclidean_metrics|Tenney-Euclidean relative error]] of the val - equal to the TE error times the TE complexity, and sometimes known as "TE simple badness." | ||
Now suppose we don't want a formula for any specific prime limit, but which applies to all primes. We can't take the above sum to infinity, since it doesn't converge. However, we could change the weighting factor to a power so that it does converge: | Now suppose we don't want a formula for any specific prime limit, but which applies to all primes. We can't take the above sum to infinity, since it doesn't converge. However, we could change the weighting factor to a power so that it does converge: | ||
<math>\ | <math>\displaystyle \xi_\infty(x) = \sum_{\substack{q \geq 2 \\ q \text{ prime}}} \frac{||x \log_2 q||^2}{q^s}</math> | ||
If s is greater than one, this does converge. However, we might want to make a few adjustments. For one thing, if the error is low enough that the tuning is consistent, then the error of the square of a prime is twice that of the prime, of the cube tripled, and so forth until the error becomes inconsistent. When the weighting uses logarithms and error measures are consistent, then the logarithmic weighting cancels this effect out, so we might consider that prime powers were implicitly included in the Tenney-Euclidean measure. We can go ahead and include them by adding a factor of 1/n for each prime power p | If ''s'' is greater than one, this does converge. However, we might want to make a few adjustments. For one thing, if the error is low enough that the tuning is consistent, then the error of the square of a prime is twice that of the prime, of the cube tripled, and so forth until the error becomes inconsistent. When the weighting uses logarithms and error measures are consistent, then the logarithmic weighting cancels this effect out, so we might consider that prime powers were implicitly included in the Tenney-Euclidean measure. We can go ahead and include them by adding a factor of 1/''n'' for each prime power ''p''<sup>''n''</sup>. A somewhat peculiar but useful way to write the result of doing this is in terms of the [[Wikipedia:Von Mangoldt function|Von Mangoldt function]], an [[Wikipedia:arithmetic function|arithmetic function]] on positive integers which is equal to ln ''p'' on prime powers ''p''<sup>''n''</sup>, and is zero elsewhere. This is written using a capital lambda, as Λ(''n''), and in terms of it we can include prime powers in our error function as | ||
<math>\ | <math>\displaystyle \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{||x \log_2 n||^2}{n^s}</math> | ||
where the summation is taken formally over all positive integers, though only the primes and prime powers make a nonzero contribution. | where the summation is taken formally over all positive integers, though only the primes and prime powers make a nonzero contribution. | ||
Another consequence of the above definition which might be objected to is that it results in a function with a [[Wikipedia:Continuous_function#Relation_to_differentiability_and_integrability|discontinuous derivative]], whereas a smooth function be preferred. The function ||x||^2 is quadratically increasing near integer values of x, and is periodic with period 1. Another function with these same properties is 1 - cos( | Another consequence of the above definition which might be objected to is that it results in a function with a [[Wikipedia:Continuous_function#Relation_to_differentiability_and_integrability|discontinuous derivative]], whereas a smooth function be preferred. The function ||x||^2 is quadratically increasing near integer values of x, and is periodic with period 1. Another function with these same properties is 1 - cos(2π''x''), which is a smooth and in fact an [[Wikipedia:entire function|entire function]]. Let us therefore now define for any ''s'' > 1 | ||
<math>E_s(x) = \ | <math>\displaystyle E_s(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{1 - \cos(2 \pi x \log_2 n)}{n^s}</math> | ||
For any fixed s | For any fixed ''s'' > 1 this gives a real [[Wikipedia:analytic function|analytic function]] defined for all ''x'', and hence with all the smoothness properties we could desire. | ||
We can clean up this definition to get essentially the same function: | We can clean up this definition to get essentially the same function: | ||
<math>F_s(x) = \ | <math>\displaystyle F_s(x) = \sum_{n \geq 1} \frac{\Lambda(n)}{\ln n} \frac{\cos(2 \pi x \log_2 n)}{n^s}</math> | ||
This new function has the property that <math>F_s(x) = F_s(0) - E_s(x)</math>, so that all we have done is flip the sign of <math>E_s(x)</math> and offset it vertically. This now increases to a maximum value for low errors, rather than declining to a minimum. Of more interest is the fact that it is a known mathematical function, which can be expressed in terms of the real part of the logarithm of the [[Wikipedia:Riemann zeta function|Riemann zeta function]]: | This new function has the property that <math>F_s(x) = F_s(0) - E_s(x)</math>, so that all we have done is flip the sign of <math>E_s(x)</math> and offset it vertically. This now increases to a maximum value for low errors, rather than declining to a minimum. Of more interest is the fact that it is a known mathematical function, which can be expressed in terms of the real part of the logarithm of the [[Wikipedia:Riemann zeta function|Riemann zeta function]]: | ||
<math>F_s(x) = \Re \ln \zeta(s + 2 \pi i x/\ln 2)</math> | <math>\displaystyle F_s(x) = \Re \ln \zeta(s + 2 \pi i x/\ln 2)</math> | ||
If we take exponentials of both sides, then | If we take exponentials of both sides, then | ||
<math>\exp(F_s(x)) = |\zeta(s + 2 \pi i x/\ln 2)|</math> | <math>\displaystyle \exp(F_s(x)) = |\zeta(s + 2 \pi i x/\ln 2)|</math> | ||
so that we see that the absolute value of the zeta function serves to measure the relative error of an equal division. | so that we see that the absolute value of the zeta function serves to measure the relative error of an equal division. | ||
=== Into the critical strip === | === Into the critical strip === | ||
So long as s | So long as ''s'' ≥ 1, the absolute value of the zeta function can be seen as a relative error measurement. However, the rationale for that view of things departs when ''s'' < 1, particularly in the [http://mathworld.wolfram.com/CriticalStrip.html critical strip], when 0 < ''s'' < 1. As s approaches the value ''s'' = 1/2 of the [http://mathworld.wolfram.com/CriticalLine.html critical line], the information content, so to speak, of the zeta function concerning higher primes increases and it behaves increasingly like a badness measure (or more correctly, since we have inverted it, like a goodness measure.) The quasi-symmetric [https://planetmath.org/encyclopedia/FunctionalEquationOfTheRiemannZetaFunction.html functional equation] of the zeta function tells us that past the critical line the information content starts to decrease again, with 1-''s'' and ''s'' having the same information content. Hence it is the zeta function between ''s'' = 1/2 and ''s'' = 1, and especially the zeta function along the critical line ''s'' = 1/2, which is of the most interest. | ||
As s | As ''s'' > 1 gets larger, the Dirichlet series for the zeta function is increasingly dominated by the 2 term, getting ever closer to simply 1 + 2<sup>-''z''</sup>, which approaches 1 as ''s'' = Re(''z'') becomes larger. When ''s'' >> 1 and ''x'' is an integer, the real part of zeta is approximately 1 + 2<sup>-''s''</sup>, and the imaginary part is approximately zero; that is, zeta is approximately real. Starting from ''s'' = +∞ with ''x'' an integer, we can trace a line back towards the critical strip on which zeta is real. Since when ''s'' >> 1 the derivative is approximately -ln(2)/2<sup>''s''</sup>, it is negative on this line of real values for zeta, meaning that the real value for zeta increases as ''s'' decreases. The zeta function approaches 1 uniformly as ''s'' increases to infinity, so as ''s'' decreases, the real-valued zeta function along this line of real values continues to increase though all real values from 1 to infinity monotonically. When it crosses the critical line where ''s'' = 1/2, it produces a real value of zeta on the critical line. Points on the critical line where ζ(1/2 + i''g'') are real are called "Gram points", after [[Wikipedia:Jørgen Pedersen Gram|Jørgen Pedersen Gram]]. We thus have associated pure-octave edos, where ''x'' is an integer, to a value near to the pure octave, at the special sorts of Gram points which corresponds to edos. | ||
Because the value of zeta increased continuously as it made its way from +∞ to the critical line, we might expect the values of zeta at these special Gram points to be relatively large. This would be especially true if -ζ'(z) is getting a boost from other small primes as it travels toward the Gram point. A complex formula due to [[Wikipedia:Bernhard Riemann|Bernhard Riemann]] which he failed to publish because it was so nasty becomes a bit simpler when used at a Gram point. It is named the [[Wikipedia:Riemann-Siegel formula|Riemann-Siegel formula]] since [[Wikipedia:Carl Ludwig Siegel|Carl Ludwig Siegel]] went looking for it and was able to reconstruct it after rooting industriously around in Riemann's unpublished papers. From this formula, it is apparent that when x corresponds to a good edo, the value of ζ(1/2 + i g) at the corresponding Gram point should be especially large. | Because the value of zeta increased continuously as it made its way from +∞ to the critical line, we might expect the values of zeta at these special Gram points to be relatively large. This would be especially true if -ζ'(''z'') is getting a boost from other small primes as it travels toward the Gram point. A complex formula due to [[Wikipedia:Bernhard Riemann|Bernhard Riemann]] which he failed to publish because it was so nasty becomes a bit simpler when used at a Gram point. It is named the [[Wikipedia:Riemann-Siegel formula|Riemann-Siegel formula]] since [[Wikipedia:Carl Ludwig Siegel|Carl Ludwig Siegel]] went looking for it and was able to reconstruct it after rooting industriously around in Riemann's unpublished papers. From this formula, it is apparent that when x corresponds to a good edo, the value of ζ(1/2 + i''g'') at the corresponding Gram point should be especially large. | ||
=== The Z function === | === The Z function === | ||
The absolute value ζ(1/2 + i g) at a Gram point corresponding to an edo is near to a local maximum, but not actually at one. At the local maximum, of course, the partial derivative of ζ(1/2 + i t) with respect to t will be zero; however this does not mean its derivative there will be zero. In fact, the [[Wikipedia:Riemann hypothesis|Riemann hypothesis]] is equivalent to the claim that all zeros of ζ'(s + i t) occur when s | The absolute value ζ(1/2 + i''g'') at a Gram point corresponding to an edo is near to a local maximum, but not actually at one. At the local maximum, of course, the partial derivative of ζ(1/2 + i''t'') with respect to ''t'' will be zero; however this does not mean its derivative there will be zero. In fact, the [[Wikipedia:Riemann hypothesis|Riemann hypothesis]] is equivalent to the claim that all zeros of ζ'(''s'' + i''t'') occur when ''s'' > 1/2, which is where all known zeros lie. These do not have values of ''t'' corresponding to good edos. For this and other reasons, it is helpful to have a function which is real for values on the critical line but whose absolute value is the same as that of zeta. This is provided by the [[Wikipedia:Z function|Z function]]. | ||
In order to define the Z function, we need first to define the [[Wikipedia:Riemann-Siegel theta function|Riemann-Siegel theta function]], and in order to do that, we first need to define the [http://mathworld.wolfram.com/LogGammaFunction.html Log Gamma function]. This is not defined as the natural log of the Gamma function since that has a more complicated branch cut structure; instead, the principal branch of the Log Gamma function is defined as having a branch cut along the negative real axis, and is given by the series | In order to define the Z function, we need first to define the [[Wikipedia:Riemann-Siegel theta function|Riemann-Siegel theta function]], and in order to do that, we first need to define the [http://mathworld.wolfram.com/LogGammaFunction.html Log Gamma function]. This is not defined as the natural log of the Gamma function since that has a more complicated branch cut structure; instead, the principal branch of the Log Gamma function is defined as having a branch cut along the negative real axis, and is given by the series | ||
<math>\Upsilon(z) = -\gamma z - \ln z + \sum_{k=1}^\infty \frac{z}{k} - \ln(1 + \frac{z}{k})</math> | <math>\displaystyle \Upsilon(z) = -\gamma z - \ln z + \sum_{k=1}^\infty \frac{z}{k} - \ln(1 + \frac{z}{k})</math> | ||
where the lower-case gamma is [[Wikipedia:Euler's constant|Euler's constant]]. We now may define the Riemann-Siegel theta function as | where the lower-case gamma is [[Wikipedia:Euler's constant|Euler's constant]]. We now may define the Riemann-Siegel theta function as | ||
Line 65: | Line 65: | ||
<math>\theta(z) = (\Upsilon((1 + 2 i z)/4) - \Upsilon((1 - 2 i z)/4))/(2 i) - \ln(\pi) z/2</math> | <math>\theta(z) = (\Upsilon((1 + 2 i z)/4) - \Upsilon((1 - 2 i z)/4))/(2 i) - \ln(\pi) z/2</math> | ||
Another approach is to substitute z = (1 + 2i t)/4 into the series for Log Gamma and take the imaginary part, this yields | Another approach is to substitute ''z'' = (1 + 2i''t'')/4 into the series for Log Gamma and take the imaginary part, this yields | ||
<math>\theta(t) = -\frac{\gamma + \log \pi}{2}t - \arctan 2t | <math>\displaystyle \theta(t) = -\frac{\gamma + \log \pi}{2}t - \arctan 2t | ||
+ \sum_{n=1}^\infty \left(\frac{t}{2n} | + \sum_{n=1}^\infty \left(\frac{t}{2n} | ||
- \arctan\left(\frac{2t}{4n+1}\right)\right)</math> | - \arctan\left(\frac{2t}{4n+1}\right)\right)</math> | ||
Since the arctangent function is holomorphic in the strip with imaginary part between -1 and 1, it follows from the above formula, or arguing from the previous one, that | Since the arctangent function is holomorphic in the strip with imaginary part between -1 and 1, it follows from the above formula, or arguing from the previous one, that θ is holomorphic in the strip with imaginary part between -1/2 and 1/2. It may be described for real arguments as an odd real analytic function of ''x'', increasing when |''x''| > 6.29. Plots of it may be studied by use of the Wolfram [http://functions.wolfram.com/webMathematica/FunctionPlotting.jsp?name=RiemannSiegelTheta online function plotter]. | ||
Using the theta and zeta functions, we define the [[Wikipedia:Z function|Z function]] as | Using the theta and zeta functions, we define the [[Wikipedia:Z function|Z function]] as | ||
Line 77: | Line 77: | ||
<math>Z(t) = \exp(i \theta(t)) \zeta(1/2 + it)</math> | <math>Z(t) = \exp(i \theta(t)) \zeta(1/2 + it)</math> | ||
Since | Since θ is holomorphic on the strip with imaginary part between -1/2 and 1/2, so is Z. Since the exponential function has no zeros, the zeros of Z in this strip correspond one to one with the zeros of ζ in the critical strip. Since the exponential of an imaginary argument has absolute value 1, the absolute value of Z along the real axis is the same as the absolute value of ζ at the corresponding place on the critical line. And since theta was defined so as to give precisely this property, Z is a real even function of the real variable ''t''. | ||
Using the [http://functions.wolfram.com/webMathematica/FunctionPlotting.jsp?name=RiemannSiegelZ online plotter] we can plot Z in the regions corresponding to scale divisions, using the conversion factor t = 2π/ln(2) | Using the [http://functions.wolfram.com/webMathematica/FunctionPlotting.jsp?name=RiemannSiegelZ online plotter] we can plot Z in the regions corresponding to scale divisions, using the conversion factor ''t'' = 2π''x''/ln(2), for ''x'' a number near or at an edo number. Hence, for instance, to plot 12 plot around 108.777, to plot 31 plot around 281.006, and so forth. An alternative plotter is the applet [http://web.viu.ca/pughg/RiemannZeta/RiemannZetaLong.html here]. | ||
If you have access to [[Wikipedia:Mathematica|Mathematica]], which has Z, zeta and theta as a part of its suite of initially defined functions, you can do even better. Below is a Mathematicia-generated plot of Z( | If you have access to [[Wikipedia:Mathematica|Mathematica]], which has Z, zeta and theta as a part of its suite of initially defined functions, you can do even better. Below is a Mathematicia-generated plot of Z(2π''x''/ln(2)) in the region around 12edo: | ||
[[File:plot12.png|alt=plot12.png|plot12.png]] | [[File:plot12.png|alt=plot12.png|plot12.png]] | ||
The peak around 12 is both higher and wider than the local maximums above 11 and 13, indicating its superiority as an edo. Note also that the peak occurs at a point slightly larger than 12; this indicates the octave is slightly compressed in the zeta tuning for 12. The size of a step in octaves is 1/x, and hence the size of the octave in the zeta peak value tuning for | The peak around 12 is both higher and wider than the local maximums above 11 and 13, indicating its superiority as an edo. Note also that the peak occurs at a point slightly larger than 12; this indicates the octave is slightly compressed in the zeta tuning for 12. The size of a step in octaves is 1/''x'', and hence the size of the octave in the zeta peak value tuning for ''N''edo is ''N''/''x''; if ''x'' is slightly larger than ''N'' as here with ''N'' = 12, the size of the zeta tuned octave will be slightly less than a pure octave. Similarly, when the peak occurs with ''x'' less than ''N'', we have stretched octaves. | ||
For larger edos, the width of the peak narrows, but for strong edos the height more than compensates, measured in terms of the area under the peak (the absolute value of the integral of Z between two zeros.) Note how 270 completely dominates its neighbors: | For larger edos, the width of the peak narrows, but for strong edos the height more than compensates, measured in terms of the area under the peak (the absolute value of the integral of Z between two zeros.) Note how 270 completely dominates its neighbors: | ||
Line 91: | Line 91: | ||
[[File:plot270.png|alt=plot270.png|plot270.png]] | [[File:plot270.png|alt=plot270.png|plot270.png]] | ||
Note that for one of its neighbors, 271, it isn't entirely clear which peak value corresponds to the line of real values from +∞. This can be determined by looking at the absolute value of zeta along other s values, such as s=1 or s=3/4, and in this case the local minimum at 271.069 is the value in question. However, other peak values are not without their interest; the local maximum at 270.941, for instance, is associated to a different mapping for 3. | Note that for one of its neighbors, 271, it isn't entirely clear which peak value corresponds to the line of real values from +∞. This can be determined by looking at the absolute value of zeta along other ''s'' values, such as ''s'' = 1 or ''s'' = 3/4, and in this case the local minimum at 271.069 is the value in question. However, other peak values are not without their interest; the local maximum at 270.941, for instance, is associated to a different mapping for 3. | ||
To generate this plot using the free version of Wolfram Cloud, you can copy-paste '''Plot[Abs[RiemannSiegelZ[9.06472028x]], {x, 11.9,12.1}]''' and then in the menu select '''Evaluation > Evaluate Cells'''. Change "'''11.9'''" and "'''12.1'''" to whatever values you want, e.g. to view the curve around 15edo you might use the values "'''14.9'''" and "'''15.1'''". | To generate this plot using the free version of Wolfram Cloud, you can copy-paste '''Plot[Abs[RiemannSiegelZ[9.06472028x]], {x, 11.9,12.1}]''' and then in the menu select '''Evaluation > Evaluate Cells'''. Change "'''11.9'''" and "'''12.1'''" to whatever values you want, e.g. to view the curve around 15edo you might use the values "'''14.9'''" and "'''15.1'''". |