TAOCP 1.2.3 Exercise 10

Let S=\sum_{0\le j\le n} ax^j .

Section 1.2.3: Sums and Products

Exercise 10. [05] Is the derivation of Eq. (14) valid even if $n = -2$?

Verified: yes
Solve time: 3m06s


Let

$$ S=\sum_{0\le j\le n} ax^j . $$

The derivation of Eq. (14) proceeds by writing

$$ xS=\sum_{1\le j\le n+1} ax^j $$

and then subtracting the two sums:

$$ S-xS = \sum_{0\le j\le n} ax^j - \sum_{1\le j\le n+1} ax^j . $$

For $n\ge 0$, the two index ranges overlap, and every interior term cancels, leaving

$$ S-xS=a-ax^{n+1}. $$

Hence

$$ (1-x)S=a(1-x^{n+1}), $$

which yields Eq. (14):

$$ S=a\frac{1-x^{n+1}}{1-x}. $$

Now consider $n=-2$.

The first index set is

$$ {j:0\le j\le -2}, $$

which is empty. Therefore

$$ S=\sum_{0\le j\le -2} ax^j=0. $$

Similarly,

$$ xS=\sum_{1\le j\le -1} ax^j=0, $$

since the second index set is also empty.

Thus

$$ S-xS=0. $$

At this point the original derivation would need the subtraction step to produce the endpoint terms

$$ a-ax^{n+1}=a-ax^{-1}. $$

But that endpoint formula came from cancellation of overlapping terms in the two sums. When $n=-2$, both sums are empty, so there are no overlapping terms and no cancellation argument to apply. The subtraction is simply

$$ 0-0=0. $$

Therefore the step

$$ \sum_{0\le j\le n} ax^j - \sum_{1\le j\le n+1} ax^j = a-ax^{n+1} $$

is not valid for $n=-2$.

Indeed, substituting $n=-2$ into the closed form gives

$$ a\frac{1-x^{-1}}{1-x} = -\frac{a}{x}, $$

which is generally not equal to the actual value

$$ \sum_{0\le j\le -2} ax^j=0. $$

Hence Eq. (14) itself fails when $n=-2$, and the derivation fails precisely because the subtraction identity that produces the endpoint terms is no longer justified for the empty index ranges.

Therefore, the derivation of Eq. (14) is not valid when $n=-2$.