Английская Википедия:Harmonic series (mathematics)

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Good article Шаблон:Short description Шаблон:Calculus

In mathematics, the harmonic series is the infinite series formed by summing all positive unit fractions: <math display=block>\sum_{n=1}^\infty\frac{1}{n} = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \cdots.</math>

The first <math>n</math> terms of the series sum to approximately <math>\ln n + \gamma</math>, where <math>\ln</math> is the natural logarithm and <math>\gamma\approx0.577</math> is the Euler–Mascheroni constant. Because the logarithm has arbitrarily large values, the harmonic series does not have a finite limit: it is a divergent series. Its divergence was proven in the 14th century by Nicole Oresme using a precursor to the Cauchy condensation test for the convergence of infinite series. It can also be proven to diverge by comparing the sum to an integral, according to the integral test for convergence.

Applications of the harmonic series and its partial sums include Euler's proof that there are infinitely many prime numbers, the analysis of the coupon collector's problem on how many random trials are needed to provide a complete range of responses, the connected components of random graphs, the block-stacking problem on how far over the edge of a table a stack of blocks can be cantilevered, and the average case analysis of the quicksort algorithm.

History

Файл:Harmonic series to 32.svg
A wave and its harmonics, with wavelengths <math>1,\tfrac12,\tfrac13,\dots</math>

The name of the harmonic series derives from the concept of overtones or harmonics in music: the wavelengths of the overtones of a vibrating string are Шаблон:Nowrap Шаблон:Nowrap Шаблон:Nowrap etc., of the string's fundamental wavelength.Шаблон:R Every term of the harmonic series after the first is the harmonic mean of the neighboring terms, so the terms form a harmonic progression; the phrases harmonic mean and harmonic progression likewise derive from music.Шаблон:R Beyond music, harmonic sequences have also had a certain popularity with architects. This was so particularly in the Baroque period, when architects used them to establish the proportions of floor plans, of elevations, and to establish harmonic relationships between both interior and exterior architectural details of churches and palaces.Шаблон:R

The divergence of the harmonic series was first proven in 1350 by Nicole Oresme.Шаблон:R Oresme's work, and the contemporaneous work of Richard Swineshead on a different series, marked the first appearance of infinite series other than the geometric series in mathematics.Шаблон:R However, this achievement fell into obscurity.Шаблон:R Additional proofs were published in the 17th century by Pietro MengoliШаблон:R and by Jacob Bernoulli.Шаблон:R Bernoulli credited his brother Johann Bernoulli for finding the proof,Шаблон:R and it was later included in Johann Bernoulli's collected works.Шаблон:R

The partial sums of the harmonic series were named harmonic numbers, and given their usual notation <math>H_n</math>, in 1968 by Donald Knuth.Шаблон:R

Definition and divergenceШаблон:Anchor

The harmonic series is the infinite series <math display=block>\sum_{n=1}^\infty\frac{1}{n} = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \cdots</math> in which the terms are all of the positive unit fractions. It is a divergent series: as more terms of the series are included in partial sums of the series, the values of these partial sums grow arbitrarily large, beyond any finite limit. Because it is a divergent series, it should be interpreted as a formal sum, an abstract mathematical expression combining the unit fractions, rather than as something that can be evaluated to a numeric value. There are many different proofs of the divergence of the harmonic series, surveyed in a 2006 paper by S. J. Kifowit and T. A. Stamps.Шаблон:R Two of the best-knownШаблон:R are listed below.

Comparison test

Файл:Visual proof harmonic series diverges.svg
There are infinite blue rectangles each with area 1/2, yet their total area is exceeded by that of the grey bars denoting the harmonic series

One way to prove divergence is to compare the harmonic series with another divergent series, where each denominator is replaced with the next-largest power of two: <math display=block>\begin{alignat}{8}

  1 & + \frac{1}{2} && + \frac{1}{3} && + \frac{1}{4} && + \frac{1}{5} && + \frac{1}{6} && + \frac{1}{7} && + \frac{1}{8} && + \frac{1}{9} && + \cdots \\[5pt]
  {} \geq 1 & + \frac{1}{2} && + \frac{1}{\color{red}{\mathbf{4}}} && + \frac{1}{4} && + \frac{1}{\color{red}{\mathbf{8}}} && + \frac{1}{\color{red}{\mathbf{8}}} && + \frac{1}{\color{red}{\mathbf{8}}} && + \frac{1}{8} && + \frac{1}{\color{red}{\mathbf{16}}} && + \cdots \\[5pt]
\end{alignat}</math>

Grouping equal terms shows that the second series diverges (because every grouping of convergent series is only convergent): <math display=block>\begin{align}

  & 1 + \left(\frac{1}{2}\right) + \left(\frac{1}{4} + \frac{1}{4}\right) + \left(\frac{1}{8} + \frac{1}{8} + \frac{1}{8} + \frac{1}{8}\right) + \left(\frac{1}{16} + \cdots + \frac{1}{16}\right) + \cdots \\[5pt]
  {} = {} & 1 + \frac{1}{2} + \frac{1}{2} + \frac{1}{2} + \frac{1}{2} + \cdots.
\end{align}</math>

Because each term of the harmonic series is greater than or equal to the corresponding term of the second series (and the terms are all positive), and since the second series diverges, it follows (by the comparison test) that the harmonic series diverges as well. The same argument proves more strongly that, for every positive Шаблон:Nowrap <math display=block>\sum_{n=1}^{2^k} \frac{1}{n} \geq 1 + \frac{k}{2}</math> This is the original proof given by Nicole Oresme in around 1350.Шаблон:R The Cauchy condensation test is a generalization of this argument.Шаблон:R

Integral test

Файл:Integral Test.svg
Rectangles with area given by the harmonic series, and the hyperbola <math>y=1/x</math> through the upper left corners of these rectangles

It is possible to prove that the harmonic series diverges by comparing its sum with an improper integral. Specifically, consider the arrangement of rectangles shown in the figure to the right. Each rectangle is 1 unit wide and <math>\tfrac1n</math> units high, so if the harmonic series converged then the total area of the rectangles would be the sum of the harmonic series. The curve <math>y=\tfrac1x</math> stays entirely below the upper boundary of the rectangles, so the area under the curve (in the range of <math>x</math> from one to infinity that is covered by rectangles) would be less than the area of the union of the rectangles. However, the area under the curve is given by a divergent improper integral, <math display=block>\int_1^\infty\frac{1}{x}\,dx = \infty.</math> Because this integral does not converge, the sum cannot converge either.Шаблон:R

In the figure to the right, shifting each rectangle to the left by 1 unit, would produce a sequence of rectangles whose boundary lies below the curve rather than above it. This shows that the partial sums of the harmonic series differ from the integral by an amount that is bounded above and below by the unit area of the first rectangle: <math display=block>\int_1^{N+1}\frac1x\,dx<\sum_{i=1}^N\frac1i<\int_1^{N}\frac1x\,dx+1.</math> Generalizing this argument, any infinite sum of values of a monotone decreasing positive function Шаблон:Nowrap (like the harmonic series) has partial sums that are within a bounded distance of the values of the corresponding integrals. Therefore, the sum converges if and only if the integral over the same range of the same function converges. When this equivalence is used to check the convergence of a sum by replacing it with an easier integral, it is known as the integral test for convergence.Шаблон:R

Partial sums

Шаблон:Main

<math>n</math> Partial sum of the harmonic series, <math>H_n</math>
expressed as a fraction decimal relative size
1 1 Шаблон:0Шаблон:Bartable
2 3 /2 Шаблон:Bartable
3 11 /6 ~Шаблон:Bartable
4 25 /12 ~Шаблон:Bartable
5 137 /60 ~Шаблон:Bartable
6 49 /20 Шаблон:Bartable
7 363 /140 ~Шаблон:Bartable
8 761 /280 ~Шаблон:Bartable
9 7129 /2520 ~Шаблон:Bartable
10 7381 /2520 ~Шаблон:Bartable
11 83711 /27720 ~Шаблон:Bartable
12 86021 /27720 ~Шаблон:Bartable
13 1145993 /360360 ~Шаблон:Bartable
14 1171733 /360360 ~Шаблон:Bartable
15 1195757 /360360 ~Шаблон:Bartable
16 2436559 /720720 ~Шаблон:Bartable
17 42142223 /12252240 ~Шаблон:Bartable
18 14274301 /4084080 ~Шаблон:Bartable
19 275295799 /77597520 ~Шаблон:Bartable
20 55835135 /15519504 ~Шаблон:Bartable

Adding the first <math>n</math> terms of the harmonic series produces a partial sum, called a harmonic number and Шаблон:Nowrap <math display=block>H_n = \sum_{k = 1}^n \frac{1}{k}.</math>

Growth rate

These numbers grow very slowly, with logarithmic growth, as can be seen from the integral test.Шаблон:R More precisely, by the Euler–Maclaurin formula, <math display=block>H_n = \ln n + \gamma + \frac{1}{2n} - \varepsilon_n</math> where <math>\gamma\approx 0.5772</math> is the Euler–Mascheroni constant and <math>0\le\varepsilon_n\le 1/8n^2</math> which approaches 0 as <math>n</math> goes to infinity.Шаблон:R

Divisibility

No harmonic numbers are integers, except for Шаблон:Nowrap One way to prove that <math>H_n</math> is not an integer is to consider the highest power of two <math>2^k</math> in the range from Шаблон:Nowrap If <math>M</math> is the least common multiple of the numbers from Шаблон:Nowrap then <math>H_k</math> can be rewritten as a sum of fractions with equal denominators <math display=block>H_n=\sum_{i=1}^n \tfrac{M/i}{M}</math> in which only one of the numerators, Шаблон:Nowrap is odd and the rest are even, and Шаблон:Nowrap <math>M</math> is itself even. Therefore, the result is a fraction with an odd numerator and an even denominator, which cannot be an integer.Шаблон:R More strongly, any sequence of consecutive integers has a unique member divisible by a greater power of two than all the other sequence members, from which it follows by the same argument that no two harmonic numbers differ by an integer.Шаблон:R

Another proof that the harmonic numbers are not integers observes that the denominator of <math>H_n</math> must be divisible by all prime numbers greater than <math>n/2</math>, and uses Bertrand's postulate to prove that this set of primes is non-empty. The same argument implies more strongly that, except for <math>H_1=1</math>, <math>H_2=1.5</math>, and <math>H_6=2.45</math>, no harmonic number can have a terminating decimal representation.Шаблон:R It has been conjectured that every prime number divides the numerators of only a finite subset of the harmonic numbers, but this remains unproven.Шаблон:R

Interpolation

Файл:Psi0.png
The digamma function on the complex numbers

The digamma function is defined as the logarithmic derivative of the gamma function <math display=block>\psi(x)=\frac{d}{dx}\ln\big(\Gamma(x)\big)=\frac{\Gamma'(x)}{\Gamma(x)}.</math> Just as the gamma function provides a continuous interpolation of the factorials, the digamma function provides a continuous interpolation of the harmonic numbers, in the sense that Шаблон:Nowrap This equation can be used to extend the definition to harmonic numbers with rational indices.[1]

Applications

Many well-known mathematical problems have solutions involving the harmonic series and its partial sums.

Crossing a desert

Шаблон:Main

Файл:Jeep problem 1.png
Solution to the jeep problem for <math>n=3</math>, showing the amount of fuel in each depot and in the jeep at each step

The jeep problem or desert-crossing problem is included in a 9th-century problem collection by Alcuin, Propositiones ad Acuendos Juvenes (formulated in terms of camels rather than jeeps), but with an incorrect solution.Шаблон:R The problem asks how far into the desert a jeep can travel and return, starting from a base with <math>n</math> loads of fuel, by carrying some of the fuel into the desert and leaving it in depots. The optimal solution involves placing depots spaced at distances <math>\tfrac{r}{2n}, \tfrac{r}{2(n-1)}, \tfrac{r}{2(n-2)}, \dots</math> from the starting point and each other, where <math>r</math> is the range of distance that the jeep can travel with a single load of fuel. On each trip out and back from the base, the jeep places one more depot, refueling at the other depots along the way, and placing as much fuel as it can in the newly placed depot while still leaving enough for itself to return to the previous depots and the base. Therefore, the total distance reached on the <math>n</math>th trip is <math display=block>\frac{r}{2n}+\frac{r}{2(n-1)}+\frac{r}{2(n-2)}+\cdots=\frac{r}{2} H_n,</math> where <math>H_n</math> is the Шаблон:Nowrap harmonic number. The divergence of the harmonic series implies that crossings of any length are possible with enough fuel.Шаблон:R

For instance, for Alcuin's version of the problem, <math>r=30</math>: a camel can carry 30 measures of grain and can travel one leuca while eating a single measure, where a leuca is a unit of distance roughly equal to Шаблон:Convert. The problem has <math>n=3</math>: there are 90 measures of grain, enough to supply three trips. For the standard formulation of the desert-crossing problem, it would be possible for the camel to travel <math>\tfrac{30}{2}\bigl(\tfrac13+\tfrac12+\tfrac11)=27.5</math> leucas and return, by placing a grain storage depot 5 leucas from the base on the first trip and 12.5 leucas from the base on the second trip. However, Alcuin instead asks a slightly different question, how much grain can be transported a distance of 30 leucas without a final return trip, and either strands some camels in the desert or fails to account for the amount of grain consumed by a camel on its return trips.Шаблон:R

Stacking blocks

Шаблон:Main

Файл:Block stacking problem.svg
The block-stacking problem: blocks aligned according to the harmonic series can overhang the edge of a table by the harmonic numbers

In the block-stacking problem, one must place a pile of <math>n</math> identical rectangular blocks, one per layer, so that they hang as far as possible over the edge of a table without falling. The top block can be placed with <math>\tfrac12</math> of its length extending beyond the next lower block. If it is placed in this way, the next block down needs to be placed with at most <math>\tfrac12\cdot\tfrac12</math> of its length extending beyond the next lower block, so that the center of mass of the top two block is supported and they do not topple. The third block needs to be placed with at most <math>\tfrac12\cdot\tfrac13</math> of its length extending beyond the next lower block, and so on. In this way, it is possible to place the <math>n</math> blocks in such a way that they extend <math>\tfrac12 H_n</math> lengths beyond the table, where <math>H_n</math> is the Шаблон:Nowrap harmonic number.Шаблон:R The divergence of the harmonic series implies that there is no limit on how far beyond the table the block stack can extend.Шаблон:R For stacks with one block per layer, no better solution is possible, but significantly more overhang can be achieved using stacks with more than one block per layer.Шаблон:R

Counting primes and divisors

Шаблон:Main In 1737, Leonhard Euler observed that, as a formal sum, the harmonic series is equal to an Euler product in which each term comes from a prime number: <math display=block>\sum_{i=1}^{\infty}\frac{1}{i}=\prod_{p\in\mathbb{P}}\left(1+\frac1p+\frac1{p^2}+\cdots\right)=\prod_{p\in\mathbb{P}} \frac{1}{1-1/p},</math> where <math>\mathbb{P}</math> denotes the set of prime numbers. The left equality comes from applying the distributive law to the product and recognizing the resulting terms as the prime factorizations of the terms in the harmonic series, and the right equality uses the standard formula for a geometric series. The product is divergent, just like the sum, but if it converged one could take logarithms and obtain <math display=block>\ln \prod_{p\in\mathbb{P}} \frac{1}{1-1/p}=\sum_{p\in\mathbb{P}}\ln\frac{1}{1-1/p}=\sum_{p\in\mathbb{P}}\left(\frac1p+\frac1{2p^2}+\frac1{3p^3}+\cdots\right)=\sum_{p\in\mathbb{P}}\frac1p+K.</math> Here, each logarithm is replaced by its Taylor series, and the constant <math>K</math> on the right is the evaluation of the convergent series of terms with exponent greater than one. It follows from these manipulations that the sum of reciprocals of primes, on the right hand of this equality, must diverge, for if it converged these steps could be reversed to show that the harmonic series also converges, which it does not. An immediate corollary is that there are infinitely many prime numbers, because a finite sum cannot diverge.Шаблон:R Although Euler's work is not considered adequately rigorous by the standards of modern mathematics, it can be made rigorous by taking more care with limits and error bounds.Шаблон:R Euler's conclusion that the partial sums of reciprocals of primes grow as a double logarithm of the number of terms has been confirmed by later mathematicians as one of Mertens' theorems,Шаблон:R and can be seen as a precursor to the prime number theorem.Шаблон:R

Another problem in number theory closely related to the harmonic series concerns the average number of divisors of the numbers in a range from 1 to <math>n</math>, formalized as the average order of the divisor function, <math display=block>\frac1n\sum_{i=1}^n\left\lfloor\frac{n}i\right\rfloor\le\frac1n\sum_{i=1}^n\frac{n}i=H_n.</math> The operation of rounding each term in the harmonic series to the next smaller integer multiple of <math>\tfrac1n</math> causes this average to differ from the harmonic numbers by a small constant, and Peter Gustav Lejeune Dirichlet showed more precisely that the average number of divisors is <math>\ln n+2\gamma-1+O(1/\sqrt{n})</math> (expressed in big O notation). Bounding the final error term more precisely remains an open problem, known as Dirichlet's divisor problem.Шаблон:R

Collecting coupons

Шаблон:Main

Файл:Coupon collector problem.svg
Graph of number of items versus the expected number of trials needed to collect all items

Several common games or recreations involve repeating a random selection from a set of items until all possible choices have been selected; these include the collection of trading cardsШаблон:R and the completion of parkrun bingo, in which the goal is to obtain all 60 possible numbers of seconds in the times from a sequence of running events.Шаблон:R More serious applications of this problem include sampling all variations of a manufactured product for its quality control,Шаблон:R and the connectivity of random graphs.Шаблон:R In situations of this form, once there are <math>k</math> items remaining to be collected out of a total of <math>n</math> equally-likely items, the probability of collecting a new item in a single random choice is <math>k/n</math> and the expected number of random choices needed until a new item is collected Шаблон:Nowrap Summing over all values of <math>k</math> from <math>n</math> Шаблон:Nowrap shows that the total expected number of random choices needed to collect all items Шаблон:Nowrap where <math>H_n</math> is the Шаблон:Nowrap harmonic number.Шаблон:R

Analyzing algorithms

Шаблон:Main

Файл:Sorting quicksort anim.gif
Animation of the average-case version of quicksort, with recursive subproblems indicated by shaded arrows and with pivots (red items and blue lines) chosen as the last item in each subproblem

The quicksort algorithm for sorting a set of items can be analyzed using the harmonic numbers. The algorithm operates by choosing one item as a "pivot", comparing it to all the others, and recursively sorting the two subsets of items whose comparison places them before the pivot and after the pivot. In either its average-case complexity (with the assumption that all input permutations are equally likely) or in its expected time analysis of worst-case inputs with a random choice of pivot, all of the items are equally likely to be chosen as the pivot. For such cases, one can compute the probability that two items are ever compared with each other, throughout the recursion, as a function of the number of other items that separate them in the final sorted order. If items <math>x</math> and <math>y</math> are separated by <math>k</math> other items, then the algorithm will make a comparison between <math>x</math> and <math>y</math> only when, as the recursion progresses, it picks <math>x</math> or <math>y</math> as a pivot before picking any of the other <math>k</math> items between them. Because each of these <math>k+2</math> items is equally likely to be chosen first, this happens with probability <math>\tfrac2{k+2}</math>. The total expected number of comparisons, which controls the total running time of the algorithm, can then be calculated by summing these probabilities over all pairs, givingШаблон:R <math display=block>\sum_{i=2}^n\sum_{k=0}^{i-2}\frac2{k+2}=\sum_{i=1}^{n-1}2H_i=O(n\log n).</math> The divergence of the harmonic series corresponds in this application to the fact that, in the comparison model of sorting used for quicksort, it is not possible to sort in linear time.Шаблон:Sfnp

Related series

Шаблон:See also

Alternating harmonic series

Шаблон:See also

Файл:Alternating Harmonic Series.PNG
The first fourteen partial sums of the alternating harmonic series (black line segments) shown converging to the natural logarithm of 2 (red line).

The series <math display=block>\sum_{n = 1}^\infty \frac{(-1)^{n + 1}}{n} = 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \cdots</math> is known as the alternating harmonic series. It is conditionally convergent by the alternating series test, but not absolutely convergent. Its sum is the natural logarithm of 2.Шаблон:R

Explicitly, the asymptotic expansion of the series is

<math display="block">\frac{1}{1} - \frac{1}{2} +\cdots + \frac{1}{2n-1} - \frac{1}{2n} = H_{2n} - H_n = \ln 2 - \frac{1}{2n} + O(n^{-2})</math>

Using alternating signs with only odd unit fractions produces a related series, the [[Leibniz formula for π|Leibniz formula for Шаблон:Pi]]Шаблон:R <math display=block>\sum_{n = 0}^\infty \frac{(-1)^{n}}{2n+1} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \cdots = \frac{\pi}{4}.</math>

Riemann zeta function

Шаблон:Main The Riemann zeta function is defined for real <math>x>1</math> by the convergent series <math display=block>\zeta(x)=\sum_{n=1}^{\infty}\frac{1}{n^x}=\frac1{1^x}+\frac1{2^x}+\frac1{3^x}+\cdots,</math> which for <math>x=1</math> would be the harmonic series. It can be extended by analytic continuation to a holomorphic function on all complex numbers Шаблон:Nowrap where the extended function has a simple pole. Other important values of the zeta function include Шаблон:Nowrap the solution to the Basel problem, Apéry's constant Шаблон:Nowrap proved by Roger Apéry to be an irrational number, and the "critical line" of complex numbers with Шаблон:Nowrap conjectured by the Riemann hypothesis to be the only values other than negative integers where the function can be zero.Шаблон:R

Random harmonic series

The random harmonic series is <math display=block>\sum_{n=1}^{\infty}\frac{s_{n}}{n},</math> where the values <math>s_n</math> are independent and identically distributed random variables that take the two values <math>+1</math> and <math>-1</math> with equal Шаблон:Nowrap It converges with probability 1, as can be seen by using the Kolmogorov three-series theorem or of the closely related Kolmogorov maximal inequality. The sum of the series is a random variable whose probability density function is Шаблон:Nowrap for values between Шаблон:Nowrap and decreases to near-zero for values greater Шаблон:Nowrap or less Шаблон:Nowrap Intermediate between these ranges, at the Шаблон:Nowrap the probability density is <math>\tfrac18-\varepsilon</math> for a nonzero but very small value Шаблон:Nowrap

Depleted harmonic series

Шаблон:Main The depleted harmonic series where all of the terms in which the digit 9 appears anywhere in the denominator are removed can be shown to converge to the value Шаблон:Gaps.Шаблон:R In fact, when all the terms containing any particular string of digits (in any base) are removed, the series converges.Шаблон:R

References

Шаблон:Sfn whitelist Шаблон:Reflist

External links

Шаблон:Commons category

Шаблон:Series (mathematics)