Volume P2 · Concrete mathematics
Finite calculus
Draft. This chapter is written and checked by the tools of the project, and a person has not reviewed it yet. Read it with care.
Contents
Differences, falling powers and definite sums
Statement
In this section a function is a map from a set of real or complex numbers to the complex numbers, where contains for each . The main cases are , , and equal to a coset . The section defines the difference operator, finds the functions that it treats as simply as the derivative treats , and proves the fundamental theorem that turns a sum into a difference of two values.
Definition P2.3.1 (difference and shift operators). Let be a function. The difference of is the function with . The shift of is the function with . Write for the identity operator, . Then . The powers of the operators are their iterates: , , and for .
Lean: Mathlib fwdDiff h f, with the notation Δ_[h] f and the value f (n + h) - f n; the operator of this section is Δ_[1], and its iterate is Δ_[1]^[n].
Example P2.3.2. Let . Then , and . The derivative of is , not . So the ordinary powers do not behave well under . The falling powers below repair this.
Example P2.3.3. Let be a number and on the integers. Then . For this gives . So plays the part that plays in calculus: it is equal to its own difference. For the function is constant and its difference is .
Proposition P2.3.4 (rules of the difference operator). Let and be functions on and let , be constants. Then:
- , and the same holds for .
- for a constant function .
- , so for all .
- If and , then is constant.
Lean: Mathlib fwdDiff_add, fwdDiff_const_smul and fwdDiff_const (proved in Mathlib).
Proof. For part 1, . Part 2 is . For part 3, both and are equal to . The general form follows by induction on . For part 4, says for every integer . Induction upward from gives for , and induction downward gives for .
Part 4 needs . On the function has difference and is not constant. A function with on is exactly a function of period .
Definition P2.3.5 (falling and rising powers). Let be a number and an integer. The falling power (" to the falling") and the rising power (" to the rising") are the products
For each product is empty, so . These are equations 1.2.5(18) and 1.2.5(19) of TAOCP. Both are polynomials in of degree with leading coefficient .
Lean: Mathlib descPochhammer R m and ascPochhammer R m (the polynomials), with Nat.descFactorial n m and Nat.ascFactorial on the natural numbers; descPochhammer_eval_eq_descFactorial links the two (proved in Mathlib).
Example P2.3.6. Let and . Then and . The number counts the ordered lists of different objects chosen from : there are choices for the first, for the second and for the third. For each the definitions give and .
Example P2.3.7. Expand the products: , and . Let and be integers with . Then the product contains the factor , so . For example . In contrast, , since a negative never meets a zero factor.
Proposition P2.3.8 (falling and rising powers). Let be a number and an integer. Then
If is an integer with , then . If , then .
Lean: Mathlib descPochhammer_eval_eq_ascPochhammer (the shift form), ascPochhammer_eval_neg_eq_descPochhammer (the sign form) and Nat.descFactorial_eq_div (the quotient of factorials); all proved in Mathlib.
Proof. The factors of are . Read from the top they are , which are the factors of . Also for each , so the product of the factors is times the product of the factors , which is . The second chain follows from the first: put for in the first equation, and put for in the second. For the factorials, , since the first factors of form and the rest form . The formula for follows from .
The proposition is equation 1.2.5(20). The quotient in equation 1.2.5(21) uses the factorial of a noninteger, which is the gamma function: . P5 treats the gamma function. This chapter needs only integer exponents, and for those the products above are enough.
Definition P2.3.9 (falling powers with negative exponents). Let be an integer and let be a number that is not one of . Then
where the second needs .
Lean: not yet stated; Mathlib has descPochhammer only for exponents in .
Example P2.3.10. The first cases are and . For these are and . For the definition gives . So is for and for , but it is for .
Example P2.3.11. The definition is the one that keeps a law of exponents. Multiply by . The product is , and . The next theorem proves this law in general. The plain rule is false: , but .
Theorem P2.3.12 (law of exponents for falling powers). For all integers and ,
for each number at which the three falling powers are defined.
Lean: Mathlib descPochhammer_mul gives the case as an identity of polynomials (proved in Mathlib); the case of negative exponents is not yet stated.
Proof. First, the step rule holds for every integer , as an identity of rational functions of . For it is the definition: the last factor of is . For it says . For with it says , which is true.
Now fix and use induction on , upward and downward from . For the claim is . Suppose the claim holds for . The step rule for and , then the claim for , then the step rule for and give
For the downward step, the same two step rules, read from right to left, give and as rational functions. Divide the claim for by to get the claim for . So the law holds as an identity of rational functions. Two rational functions that are equal take equal values at each where both are defined, which proves the law for numbers.
Theorem P2.3.13 (difference of a falling power). For every integer ,
at each where and are defined. In the same way for .
Lean: for the identity of polynomials follows from descPochhammer_succ_eval and descPochhammer_mul; the form for binomial coefficients is fwdDiff_choose (proved in Mathlib). The statement for all integers is not yet stated.
Proof. Apply the law of exponents twice, once with the split at the point and once with the split at the point :
Subtract: . For the rising power, and share the factors , and the remaining factors are and . So .
The theorem is the discrete form of . It holds for negative too. For it reads , which agrees.
Definition P2.3.14 (binomial coefficient). For a number and an integer , the binomial coefficient is when and when . This is the definition of TAOCP 1.2.6(3). Chapter 6 develops it.
Lean: TAOCP.binom r k in TAOCP/Notation (tamnd/taocp-lean main), for in a field and , with the bridge TAOCP.binom_natCast to Mathlib Nat.choose; Mathlib also has Ring.choose for a binomial ring.
Example P2.3.15. The coefficient counts the subsets of size of a set of elements: each subset gives ordered lists. For , , so the upper index need not be an integer.
Example P2.3.16. For the coefficient is , since . Also and for every , and for .
Corollary P2.3.17 (difference of a binomial coefficient). For every number and every integer , ; that is, .
Lean: Mathlib fwdDiff_choose and Nat.choose_succ_succ' for natural numbers, Ring.choose_succ_succ in a binomial ring (proved in Mathlib).
Proof. For divide the theorem by : . For both sides are , since is constant and . For both sides are .
The corollary is the addition formula for binomial coefficients, Pascal's rule, here proved for every upper index .
Definition P2.3.18 (indefinite and definite sums). Let be a function. A function is an indefinite sum of if . For integers and and a function on , the definite sum of from to is
The upper limit is not in the range of the sum when . The form is the natural one for finite calculus, as the next theorem shows.
Lean: Mathlib Finset.sum over Finset.Ico a b; Mathlib has no definite sum with the sign rule for , and the handbook does not state one yet.
Example P2.3.19. The function satisfies , by the theorem with . So is an indefinite sum of . The definite sum is , which the next theorem gives as . For this is .
Example P2.3.20. The function is an indefinite sum of itself. So , the geometric sum of Chapter 2. The sign rule gives , so that , as for integrals.
Theorem P2.3.21 (fundamental theorem of finite calculus). Let and be functions on .
- If , then for all integers and .
- The function satisfies , and each indefinite sum of is for a constant .
- For all integers , and , .
Lean: Mathlib Finset.sum_range_sub gives part 1 for (proved in Mathlib); Finset.sum_Ico_sub gives the form on Finset.Ico a b for .
Proof. For part 1 with , the sum telescopes (Chapter 1): each with appears once with each sign, and is left. For , the definition and the case just proved give . Part 3 follows from part 1 for any indefinite sum , if one exists; so prove part 2 first, directly. Let . Then . Let . Then and , so again . If too, then , and is constant by the rules of the difference operator. Now part 3 is with .
Corollary P2.3.22 (sums of falling powers). Let be integers and let be an integer. If , assume that . Then
In particular for and .
Lean: for and natural numbers, the form with binomial coefficients is Mathlib Nat.sum_Icc_choose, and the case is Finset.sum_range_id_mul_two (both proved in Mathlib). The case is not yet stated.
Proof. By the theorem on the difference of a falling power, satisfies . For this holds at every integer. For the falling powers and are defined at every integer , and that is the range used when . The fundamental theorem gives the claim.
The case is the exception, just as is the exception for integrals. Section 3.2 shows that the harmonic numbers fill this gap.
Corollary P2.3.23 (sums over the upper index). Let be a number and let be integers. Then
These are equations 1.2.6(11) and 1.2.6(10).
Lean: Mathlib Nat.sum_Icc_choose (the first identity) and Nat.sum_range_add_choose (the second for a natural number ); both proved in Mathlib. The second for a real is not yet stated.
Proof. The corollary on the difference of a binomial coefficient, with in place of , says that is an indefinite sum of . The fundamental theorem gives . For the second identity let . Then
by Pascal's rule at . The fundamental theorem gives .
Proof
All the proofs of the section rest on two facts. The first is the telescoping sum of Chapter 1, which is the fundamental theorem in disguise: a sum of differences is a difference. The second is the law of exponents for falling powers. Once that law holds for all integer exponents, the difference of is one line, because and share the factor and differ only in one end factor. In calculus the derivative of needs the binomial theorem or a limit; here no limit appears and the computation is exact.
The negative falling powers are not a free choice. If the law of exponents is to hold for all integers, then forces , which is the definition. Exercise 6 asks for this argument. The same remark explains why the law has the shift in its second factor: the falling power "uses up" the values , and the next factor must start at .
The method of the section for a sum is: write as a combination of functions whose indefinite sums are known, then apply the fundamental theorem. The functions with known indefinite sums are so far for , and for . Section 3.2 adds the products, and Section 3.3 shows how to write any polynomial in falling powers.
Examples
Example P2.3.24. Find . The term is , so the corollary on sums of falling powers gives . For the terms are , with sum , and .
Example P2.3.25. Find . The term is , and , . The corollary gives
For the sum is , which agrees. As the sum tends to . In the same way for each (Exercise 9).
Example P2.3.26. Find . The term is the rising power . By the proposition on falling and rising powers, , so the sum is with . The corollary gives , since . For : .
Example P2.3.27. Find . Here for integers , so the second identity of the corollary on sums over the upper index with gives . For : . With the same identity gives , that is , which is true.
Example P2.3.28. The method also gives a sum that is not a polynomial. Let . Since , the function is an indefinite sum of , and . For , , : .
Exercises
- [10] Compute , , and .
- [12] Write as a falling power of , and use the theorem on the difference of a falling power to find . Check the result directly.
- [M15] Let . Use finite calculus to find , and check the case , .
- [M18] Find all functions with , and all functions with .
- [M20] Show that for every integer .
- [M15] Assume that a family of rational functions , one for each integer , satisfies for and the law for all integers and . Show that for .
- [M20] Find a closed form for by writing the term as a falling power.
- [M20] Find a closed form for .
- [HM20] Let . Show that .
- [M22] Let be the backward difference. Show that for , and deduce that for and .
- [M15] Let and be two functions on with . Show that has period . Give and with such that is not constant.
- [M20] Let be a number and an integer. Show that .
Lean
Mathlib has the difference operator as fwdDiff h f in the file Mathlib.Algebra.Group.ForwardDiff, with the notation Δ_[h] in the scope fwdDiff. The operator of this chapter is Δ_[1]. The file proves linearity (fwdDiff_add, fwdDiff_const_smul), the difference of a constant (fwdDiff_const) and the difference of a binomial coefficient on the natural numbers (fwdDiff_choose). The falling and rising powers are the polynomials descPochhammer R m and ascPochhammer R m in Mathlib.RingTheory.Polynomial.Pochhammer, with descPochhammer_mul as the law of exponents for and descPochhammer_eval_eq_ascPochhammer as the link to rising powers. On the natural numbers the values are Nat.descFactorial and Nat.ascFactorial. The telescoping sum is Finset.sum_range_sub, and the sums over the upper index are Nat.sum_Icc_choose and Nat.sum_range_add_choose. All of these are proved in Mathlib.
Mathlib has no falling power with a negative exponent and no definite sum with the sign rule of this section. The project library tamnd/taocp-lean defines the binomial coefficient of TAOCP 1.2.6(3) as TAOCP.binom in TAOCP/Notation, with TAOCP.binom_of_neg for a negative lower index and TAOCP.binom_natCast as the bridge to Nat.choose. It does not yet state the theorems of this section.
Notes and history
The calculus of finite differences is as old as the calculus itself. Newton used differences for interpolation in the 1670s, and Brook Taylor wrote the first book on the subject, Methodus Incrementorum, in 1715. The systematic theory of the operators and , with the identity , is due to the nineteenth century British school of the calculus of operations; the book of George Boole, A Treatise on the Calculus of Finite Differences (1860), is the classic account.
The notations and are fairly recent. TAOCP 1.2.5 traces them to Capelli and Toscano, and Concrete Mathematics made them standard in computer science. The extension to negative exponents and the notation follow GKP94, Section 2.6. The name "Pochhammer symbol" in Mathlib comes from the use of for one of these products in the theory of hypergeometric functions, where unfortunately it often means the rising power.
Summation by parts and the harmonic numbers
Statement
Section 3.1 sums a function when an indefinite sum of it is known. This section extends the method to products. The tool is the discrete form of integration by parts. It needs the rule for the difference of a product, which has one more term than the rule for the derivative of a product, or rather one term with a shift. The section also defines the harmonic numbers, which fill the gap in the sums of falling powers, and uses them to sum , , and .
As in Section 3.1, is the shift: .
Theorem P2.3.29 (difference of a product). Let and be functions. Then
Lean: Mathlib fwdDiff_smul (the third form, proved in Mathlib).
Proof. Write , , and . Then . Add and subtract : . The second form is the first with and exchanged. For the third form, write in the first.
Example P2.3.30. Let and . Then and , so the theorem gives . Directly: .
The derivative of a product is with no shift. The shift in is the price of a finite step: the term of the third form is the discrete version of , which calculus neglects.
Theorem P2.3.31 (summation by parts). Let and be functions on and let be integers. Then
In the notation of definite sums, .
Lean: Mathlib Finset.sum_range_by_parts and Finset.sum_Ico_by_parts (proved in Mathlib), in the form with partial sums of the second factor.
Proof. Sum the first form of the product rule, , over . The fundamental theorem of finite calculus (Section 3.1) gives .
The rule is useful when is a factor of the term whose indefinite sum is known, and when is simpler than . The usual choice makes a polynomial or a harmonic number, whose difference is simpler, and a power or a falling power, whose indefinite sum is known.
Definition P2.3.32 (harmonic numbers). For an integer the th harmonic number is
So (the empty sum) and . Chapter 9 studies these numbers in depth; this section uses only the definition.
Lean: Mathlib harmonic n, a rational number, with harmonic_zero and harmonic_succ (proved in Mathlib); TAOCP/Notation (tamnd/taocp-lean main) has TAOCP.harmonicPow r n for and the bridge TAOCP.harmonicPow_one to harmonic.
Example P2.3.33. The first values are , , , , and . For the number is never an integer: the largest power of up to divides the denominator of exactly one term. The denominators grow fast.
Example P2.3.34. The harmonic numbers grow without bound, but slowly. Group the terms in blocks . A block has terms, each at least , so its sum is at least . So . In the same way, the block has sum at most , so . So grows like a logarithm. Chapter 9 proves that tends to a constant.
Theorem P2.3.35 (harmonic numbers as the discrete logarithm). For each integer , . So for integers ,
With the corollary on sums of falling powers of Section 3.1, this gives, for every integer and every ,
Lean: Mathlib harmonic_succ gives the difference (proved in Mathlib); the case of the sum is harmonic itself, by harmonic_eq_sum_Icc.
Proof. by the definition, and by the definition of negative falling powers. The fundamental theorem gives the sum from to . For and it gives .
In calculus, is for and for . The theorem is the discrete twin, and this is the sense in which is the discrete logarithm. Note that is and not ; the shift is why the sum of for appears as a sum over .
Theorem P2.3.36 (the sum of ). Let be a number and an integer. Then
If , then .
Lean: not yet stated; the geometric sum is Mathlib geom_sum_eq (proved in Mathlib).
Proof. Use summation by parts with and . Section 3.1 gives , and . So
Bring the two terms to the denominator . The numerator is . For the terms and tend to as (P5 proves that ; it also follows from the ratio ), so the sum tends to .
Theorem P2.3.37 (the sum of harmonic numbers). For each integer ,
The second form is equation 1.2.7(8).
Lean: not yet stated.
Proof. Use summation by parts with and , so and . Then . For the second form, , so . Now , which gives .
Theorem P2.3.38 (the sum of ). For integers and ,
Equivalently, , which is equation 1.2.7(9).
Lean: not yet stated.
Proof. Use summation by parts with and . By the corollary on the difference of a binomial coefficient (Section 3.1), . Then and
For each integer , . So the last sum is , by the corollary on sums over the upper index. This proves the first form. The second form is the first with in place of .
For the theorem gives back .
Corollary P2.3.39 (the sum of ). For each integer ,
Lean: not yet stated.
Proof. Put in the theorem: and .
Proof
Summation by parts is the product rule summed with the fundamental theorem, and every result of the section is one application of it with a good choice of and . The rule moves a difference from one factor to the other, at the cost of a shift. The choice is right when the new sum is one that Section 3.1 can do directly.
For the factor is differenced to , and the new sum is geometric. For times a polynomial, the harmonic number is differenced to , and this cancels one factor of the indefinite sum of the polynomial. The cancellation is the heart of the proof of equation 1.2.7(9). It works because the indefinite sum of is and the shift turns it into , which contains the factor . This is the reason to sum and not : the binomial coefficients are the functions for which the method closes.
Examples
Example P2.3.40. Find . Take and , so and . Then
The theorem on with gives . So the sum is . Check : , and .
Example P2.3.41. Find . Take and . Since , the function works. Then
since . For : , and . For even the value is .
Example P2.3.42. Find without the general theorem. Take and , so . Then
because . For : , and .
Example P2.3.43. A bad choice of the parts makes the sum worse. In , take and . Then , , and the new sum is , which has a polynomial of higher degree. The rule of thumb is to difference the factor that becomes simpler.
Example P2.3.44. The sum of for and , in the form of equation 1.2.7(9): . The formula gives .
Exercises
- [10] Use the rule for the difference of a product to find .
- [M15] Prove the rule for the difference of a quotient: , where .
- [M18] Find a closed form for .
- [M20] Find a closed form for and its limit as .
- [M20] Find a closed form for .
- [M22] Let . Show that .
- [M25] Show that .
- [M20] Find a closed form for .
- [M22] With as in Exercise 6, show that . Given that and , find .
- [M20] Let . Use summation by parts to show that .
- [M22] (Abel's inequality.) Let and let be real numbers whose partial sums satisfy for . Show that .
Lean
Mathlib states the product rule in the form as fwdDiff_smul, and summation by parts as Finset.sum_range_by_parts and Finset.sum_Ico_by_parts in Mathlib.Algebra.BigOperators.Module. The Mathlib form differences the first factor and uses the partial sums of the second factor; it is the theorem of this section with . The harmonic numbers are harmonic n : ℚ, with harmonic_succ for the step, harmonic_eq_sum_Icc for the sum and the bounds log_add_one_le_harmonic and harmonic_le_one_add_log in Mathlib.NumberTheory.Harmonic.Bounds. All of these are proved in Mathlib. TAOCP/Notation in tamnd/taocp-lean main defines TAOCP.harmonicPow r n, the harmonic number of order , with TAOCP.harmonicPow_one as the bridge to harmonic.
The sums of , and , equations 1.2.7(8) and 1.2.7(9), are not yet stated in Lean.
Notes and history
Summation by parts is due to Abel, who used it in 1826 to prove the continuity of a power series on the boundary of its disk of convergence; Exercise 11 is his inequality. The harmonic numbers have their name from the harmonic series of music, where strings of lengths give the overtones. The divergence of the harmonic series was proved by Oresme in the fourteenth century with the grouping argument of the second example after the definition.
The analogy between and is the theme of GKP94, Section 2.6. TAOCP 1.2.7 derives equation (9), and an exercise there gives the general rule of summation by parts. Chapter 9 of this volume returns to harmonic numbers: their growth, their sums with binomial weights and the numbers of higher order.
Difference tables and Newton's formula
Statement
The difference operator can be applied again and again. The values and their repeated differences form a triangle of numbers, the difference table. This section shows that the left edge of the table, the numbers , determines at every nonnegative integer, and that for a polynomial it determines everywhere. The result is Newton's forward formula, the discrete form of Taylor's formula. It turns the sum of any polynomial into a sum of binomial coefficients, which Section 3.1 can do.
Definition P2.3.45 (difference table). Let be a function on the integers . The difference table of is the array whose row , for , is the sequence . Row is the sequence of values of . Each entry of row is the entry above it on the right minus the entry above it on the left. The left edge of the table is the sequence .
Lean: Mathlib Δ_[1]^[j] f x, the iterate of fwdDiff 1.
Example P2.3.46. The table of for :
| row | ||||||
|---|---|---|---|---|---|---|
The third row is constant and equal to , and the fourth row is . The left edge is .
Example P2.3.47. The table of has every row equal to , since . Its left edge is . The table of has row equal to , since , so the rows grow and never become .
Theorem P2.3.48 (powers of the difference and shift operators). Let be a function, a point of its domain and an integer. Then
Lean: Mathlib fwdDiff_iter_eq_sum_shift and shift_eq_sum_fwdDiff_iter (proved in Mathlib).
Proof. Both formulas hold for . Suppose the second holds for , at every point. Then is the formula for at the point :
since . Collect the terms with : the coefficient is , by Pascal's rule (Section 3.1). This is the formula for . The first formula has the same proof: suppose it holds for , and write . The formula for at the two points gives . The coefficient of is .
In operator form the theorem says and , expanded by the binomial theorem. That is legal because and commute; the proof above checks it without the language of operators.
Lemma P2.3.49 (falling powers form a basis). Let be a polynomial of degree with leading coefficient . There are unique numbers with
and .
Lean: not yet stated in this form; Mathlib proves that descPochhammer R j is monic of degree (monic_descPochhammer, descPochhammer_natDegree).
Proof. Use induction on . For , . For , the polynomial has degree and leading coefficient . So has degree less than (or is ), and the induction hypothesis writes it in falling powers of degree less than . For uniqueness, suppose with some , and let be the largest such . The left side has degree and leading coefficient , which is impossible.
Theorem P2.3.50 (th difference of a polynomial). Let be a polynomial of degree with leading coefficient . Then is a polynomial of degree with leading coefficient . So is the constant , and for .
Lean: Mathlib Polynomial.fwdDiff_iter_degree_eq_factorial, Polynomial.fwdDiff_iter_eq_zero_of_degree_lt, fwdDiff_iter_eq_factorial and fwdDiff_iter_pow_eq_zero_of_lt (proved in Mathlib).
Proof. Write with , by the lemma. By the theorem on the difference of a falling power, . Its term of highest degree is , so has degree and leading coefficient . Apply this times: has degree and leading coefficient , so it is that constant. One more difference gives .
Corollary P2.3.51 (alternating sums of a polynomial). Let and let be a polynomial of degree at most . Then
In particular, for . This is equation 1.2.6(34).
Lean: Mathlib fwdDiff_iter_sum_mul_pow_eq_zero (the case ) and Polynomial.fwdDiff_iter_degree_eq_factorial, with fwdDiff_iter_eq_sum_shift (proved in Mathlib).
Proof. By the theorem on powers of the difference operator, the left side is . If , then has degree and the last theorem gives (for both sides are ). If , then has degree less than and .
Theorem P2.3.52 (Newton's forward formula). Let be a function on the integers . Then for each integer ,
If is a polynomial of degree at most , then for every number .
Lean: Mathlib shift_eq_sum_fwdDiff_iter (the first statement, proved in Mathlib); the identity of polynomials is not yet stated.
Proof. The first statement is the theorem on powers of the shift operator at . For the second, let . This is a polynomial of degree at most . For , the first statement gives . The terms with vanish because for , and the terms with vanish because . So for every integer . The polynomial has degree at most and infinitely many roots, so it is .
The formula is the discrete form of Taylor's formula . In finite calculus the role of is played by , and the role of the derivatives is played by the differences.
Corollary P2.3.53 (Newton's formula for sums). Let be a function on the integers . Then for each integer ,
Lean: Mathlib sum_range_shift_eq_sum_fwdDiff_iter (proved in Mathlib).
Proof. Put Newton's formula into the sum and change the order of summation:
The inner sum is , by the corollary on sums over the upper index (Section 3.1), since the terms with are .
Theorem P2.3.54 (sums of squares and cubes). For each integer ,
Equivalently, , which is equation 1.2.6(12).
Lean: Mathlib Finset.sum_range_id_mul_two for the first powers; the sums of squares and cubes are not yet stated in this form.
Proof. The difference table of at is ; ; , with left edge . Newton's formula gives . The first example of the section has left edge for , so . Sum with the corollary on sums of falling powers:
For the second form of the squares, replace by : .
The same method sums for any : find the left edge of the table of , write in falling powers and sum. The coefficients that appear are the Stirling numbers of the second kind, , and Chapter 8 develops them with the general change between ordinary and falling powers. Chapter 11 gives the closed forms of with the Bernoulli numbers.
Proof
The section has one idea: the left edge of the difference table is a complete description of a function on the nonnegative integers. The theorem on powers of the shift operator says how to rebuild each value from the edge, and the theorem on powers of the difference operator says how to compute the edge from the values. The two formulas are inverse to each other, and both are the binomial theorem for .
For polynomials the edge is finite: the theorem on the th difference shows that a polynomial of degree has for . The proof uses the basis of falling powers, on which acts as the derivative acts on ordinary powers. Then Newton's formula holds at every integer, and the rule that a nonzero polynomial has only finitely many roots extends it to every number. That last step is the reason that the conclusion for all needs to be a polynomial: the function is at every integer, so its whole table is , but is not .
Examples
Example P2.3.55. A sequence starts . Suppose it comes from a polynomial of degree at most . Its table has left edge , since the first five values of give the same edge as itself. Newton's formula gives , and , not . The next value is . This polynomial counts the regions into which hyperplanes in general position cut space of dimension , and counts the regions of a disk cut by all chords between points in general position on its circle. It is a warning: a few values do not fix a sequence.
Example P2.3.56. Find . The values of at are , with differences and second difference . The left edge is . Newton's formula for sums gives
Check : and .
Example P2.3.57. The corollary on alternating sums with and says that . Indeed . With and it says that .
Example P2.3.58. Newton's formula for with a number. Since , the edge is , and the formula gives . With this is the binomial theorem . So the binomial theorem is a special case of Newton's formula.
Example P2.3.59. The theorem on powers of the difference operator with and , : . On the other side, , so , which is at .
Exercises
- [10] Write the difference table of for . Use its left edge to write as a combination of falling powers.
- [M15] Use Exercise 1 to find as a polynomial in , and factor it.
- [M18] A polynomial of degree at most has , , and . Find from the difference table, and find .
- [M22] Let and let be a number that is not . Show that .
- [M15] Show that , and use the theorem on powers of the difference operator to find .
- [M22] Let be a polynomial of degree such that are integers. Show that is an integer for every integer , also for . Give such a of degree whose coefficients are not all integers.
- [M20] Let be the polynomial of degree at most with for . Show that .
- [M23] Show that .
- [M20] Let satisfy for every integer . Show that there is a polynomial of degree at most with for every integer , also for .
- [M20] Let . Show that is a polynomial in of degree , with leading coefficient and constant term .
- [M24] Find at for , and deduce from Newton's formula that .
Lean
Mathlib's file Mathlib.Algebra.Group.ForwardDiff has most of this section. The theorem on powers of the difference and shift operators is fwdDiff_iter_eq_sum_shift and shift_eq_sum_fwdDiff_iter, Newton's formula for sums is sum_range_shift_eq_sum_fwdDiff_iter, and the th difference of a polynomial is Polynomial.fwdDiff_iter_degree_eq_factorial with Polynomial.fwdDiff_iter_eq_zero_of_degree_lt. For powers of the variable the file has fwdDiff_iter_eq_factorial and fwdDiff_iter_pow_eq_zero_of_lt, and for binomial coefficients fwdDiff_iter_choose and fwdDiff_iter_choose_zero. All are proved in Mathlib.
The identity of polynomials in Newton's forward formula, the sums of squares and cubes in the form of equation 1.2.6(12), and the basis of falling powers are not yet stated in the project library. Mathlib has the facts behind the basis: monic_descPochhammer and descPochhammer_natDegree.
Notes and history
Newton found the forward formula in the 1670s and published it in the Principia (1687), Book III, Lemma 5, as a method to pass a curve through given points. James Gregory had found it a few years before him, in 1670. The formula was the main tool of numerical interpolation for three centuries; tables of logarithms and of the positions of planets were filled in with it. The first example of the Examples part is a classic warning about interpolation: the numbers of regions of a circle cut by the chords between points in general position are , and the doubling stops at the sixth term.
The difference table of and the change of basis to falling powers lead to the Stirling numbers, which Stirling introduced in 1730 for this purpose. Chapter 8 treats them, and Chapter 11 treats the sums of powers in general.
This section ends the chapter. The table shows where the equations of TAOCP 1.2 that the outline gives to this chapter appear.
| TAOCP 1.2 | Result of P2 |
|---|---|
| 1.2.5(18), 1.2.5(19) | Definition P2.3.5 |
| 1.2.5(20), 1.2.5(21) | Proposition P2.3.8 |
| 1.2.6(10), 1.2.6(11) | Corollary P2.3.23 |
| 1.2.6(12) | Theorem P2.3.54 |
| 1.2.6(34) | Corollary P2.3.51 |
| 1.2.7(8) | Theorem P2.3.37 |
| 1.2.7(9) | Theorem P2.3.38 |
The calculus of Newton and Leibniz has a discrete twin. In place of the derivative it has the difference , and in place of the integral it has the sum. The two calculi have the same shape: there is a fundamental theorem, a rule for products, a rule of integration by parts, and a family of functions whose derivative is easy. In the continuous case that family is the powers . In the discrete case it is the falling powers . This chapter builds the discrete calculus and uses it to find closed forms of sums.
Section 3.1 defines the difference and shift operators, the falling and rising powers with exponents of both signs, and the definite sum. Its main result is the fundamental theorem of finite calculus: a sum is for each with . Section 3.2 proves the rule for the difference of a product and the rule of summation by parts. It shows that the harmonic numbers play the part of the logarithm, and it finds the sums of , and . Section 3.3 is about difference tables. It proves that the th difference of a polynomial of degree is a constant, it proves Newton's forward formula, and it uses the formula to sum powers.
TAOCP uses this material in several places. Section 1.2.5 defines the falling and rising factorial powers in its equations (18) to (21). Section 1.2.6 sums binomial coefficients over the upper index in equations (10) and (11), sums squares in equation (12), and states the th difference of a polynomial in equation (34). Section 1.2.7 sums harmonic numbers in equations (8) and (9), with summation by parts. Each of these equations is a theorem or an example of this chapter, and the table at the end of Section 3.3 gives the place of each one.
The chapter assumes P1 and Chapters 1 and 2 of P2. From Chapter 1 it uses the rules for sums, the change of index and the telescoping sum. From Chapter 2 it uses the geometric sum and the sums of squares and cubes as checks. It uses binomial coefficients only through the formula , which Section 3.1 states. Chapter 6 develops binomial coefficients in full, and Chapter 8 gives the general change from ordinary powers to falling powers through the Stirling numbers.
The chapter reads with Section 2.6 and Section 5.3 of Concrete Mathematics (GKP94). That book uses the notation for a definite sum, and this chapter uses it too. All functions in the chapter are defined at least on the integers, and their values are real or complex numbers.
The source of this page. Something is wrong? Report it.