Geometric series: two ways to tackle same problem giving me issues

89 Views Asked by At

I am trying to get a closed form expression for the following sum:

$$x + 2x^2 + 3x^3 + \cdots + nx^n$$

so by perturbation method:

$$S = x + 2x^2 + 3x^3 + \cdots + nx^n$$

$$xS= x^2 + 2x^3 + \cdots + (n-1)x^n + nx^{n+1}$$

$$(1-x)S = x + x^2 + x^3 + \cdots + x^n - nx^{n+1}$$

Now here is where it gets weird. The professor writes that this can be simplified to this well-known sum: $1+ x+ x^2 + \cdots + x^n = \frac{1-x^{n+1}}{1-x}$

Giving us:

$$(1-x)S = \frac{1-x^{n+1}}{1-x} - nx^{n+1} - 1$$

I see the $-1$ is because there is no $1$ in our sum but can't I do the following:

$$(1-x)S = x(1 + x + x^2+\cdots+x^{n-1}) - nx^{n+1}$$

$$(1-x)S = x \left( \frac{1-x^n}{1-x} \right) - nx^{n+1}$$

So I went to wolfram to see if this was possible and got a peculiar result when I went to test:

enter image description here

Now I might be using wolfram wrong but is it fair to assume that these two statements:

1.) $(1-x)S = (1-x^(n+1))/(1-x) - nx^(n+1) - 1$

2.) $(1-x)S = x((1-x^n)/(1-x)) - nx^(n+1)$

are equal? And if not: where did I go wrong to get the second statement?

enter image description here

2

There are 2 best solutions below

0
On BEST ANSWER

Both of your results are correct, You are just using Wolfram wrong.

Here's the actual output,

enter image description here

enter image description here

0
On

$$S = x + 2x^2 + \cdots + nx^n$$ implies $$(1-x)S = (x + x^2 + \cdots + x^n) - nx^{n+1}.$$ This much is clear for you. If you do not already know the sum for a finite geometric series, this too can be obtained by the same perturbation method you just applied to $S$. For instance, let $$G = 1 + x + x^2 + \cdots + x^n.$$ Then $$xG = x + x^2 + x^3 + \cdots + x^{n+1},$$ and $$(1-x)G = 1 - x^{n+1},$$ from which it follows that $$G = \frac{1 - x^{n+1}}{1-x}, \quad x \ne 1,$$ and in turn, $$S = \frac{(G-1) - nx^{n+1}}{1-x} = \frac{1 - x^{n+1} - 1 + x - n(1-x)x^{n+1}}{(1-x)^2} = \frac{x + (nx-n-1)x^{n+1}}{(1-x)^2}.$$

Second, judging from the output you obtained from Wolfram Alpha, your input was probably inappropriate. The triple equals sign === is the infix notation for the expression SameQ[] in the Wolfram language, and it gives True only if the LHS and RHS are exactly the same expression. So, if I were to guess, you might have used the word "same" in your input, rather than "equal to." Instead of dealing with these subtleties, it is much more meaningful to simply test the formula for a few carefully chosen values of $x$ and $n$. If you really want to, you could also input

Sum[x^k, {k,0,n}]

or you could even input

Sum[k x^k, {k,1,n}]

to get the answer to the original question.