taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.7-10

Exercise 1.2.7-10

proved in Lean solution written

RatingM20
MarkersM (mathematical)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.7 of Volume 1. Companion chapter: Harmonic numbers

The task

Prove the summation by parts formula ∑1≤k<n(ak+1−ak)bk=anbn−a1b1−∑1≤k<nak+1(bk+1−bk)\sum_{1 \le k < n}(a_{k+1} - a_k)b_k = a_nb_n - a_1b_1 - \sum_{1 \le k < n}a_{k+1}(b_{k+1} - b_k).

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Look at the difference ak+1bk+1−akbka_{k+1}b_{k+1} - a_kb_k and split it into two products.

Solution

Show the solution

For each kk,

ak+1bk+1−akbk=(ak+1−ak)bk+ak+1(bk+1−bk).a_{k+1}b_{k+1} - a_kb_k = (a_{k+1} - a_k)b_k + a_{k+1}(b_{k+1} - b_k).

To check this, expand the right side: ak+1bk−akbk+ak+1bk+1−ak+1bka_{k+1}b_k - a_kb_k + a_{k+1}b_{k+1} - a_{k+1}b_k, and the terms ak+1bka_{k+1}b_k cancel. Sum over 1≤k<n1 \le k < n. The left side telescopes to anbn−a1b1a_nb_n - a_1b_1. So

anbn−a1b1=∑1≤k<n(ak+1−ak)bk+∑1≤k<nak+1(bk+1−bk).a_nb_n - a_1b_1 = \sum_{1 \le k < n}(a_{k+1} - a_k)b_k + \sum_{1 \le k < n}a_{k+1}(b_{k+1} - b_k).

Move the second sum to the left side to get the formula.

Check

Take ak=k2a_k = k^2, bk=kb_k = k and n=4n = 4. The left side is 3⋅1+5⋅2+7⋅3=343 \cdot 1 + 5 \cdot 2 + 7 \cdot 3 = 34. The right side is 16⋅4−1⋅1−(4+9+16)=63−29=3416 \cdot 4 - 1 \cdot 1 - (4 + 9 + 16) = 63 - 29 = 34.

Remarks

This is the discrete form of integration by parts. The text uses it in the proof of eq. (9), and exercise 1.2.7-11 uses it again.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.