# How to calculate sum of series $\sum_1^\infty (nx-n+1)x^n$?

I ask for some help with this question:

I need to calculate sum of series $\sum_1^\infty(nx-n+1)x^n$.

I tried this way: $\sum_1^\infty(nx-n+1)x^n=\sum_1^\infty nx^{n+1}-nx^n+x^n=\sum_1^\infty nx^{n+1}-(n-1)x^n$

Lets $f_n(x)=nx^{n+1}$.

Then we have telescopic series $\sum_1^\infty nx^{n+1}-(n-1)x^n=\sum_1^\infty f_n(x)-f_{n-1}(x)=\lim_{n \to \infty}nx^{n+1}$

In this stage I somehow do not now how to proceed next .

Thanks.

Your work is correct, now you should assume that $|x|<1$ to have the convergence and you find

$$\sum_1^\infty nx^{n+1}-(n-1)x^n=\lim_{n \to \infty}nx^{n+1}=0$$

You are correct. And

If $|x|\lt 1$, then $\lim_{n\to\infty}nx^{n+1}=0.$

If $|x|\ge 1$, then $\lim_{n\to\infty}nx^{n+1}$ diverges.

Do you know why?

You want $\sum_1^\infty(nx-n+1)x^n$. Assume that $|x|\lt 1$. We can write our sum as $$(x-1)\sum_1^\infty nx^{n} +\sum_1^\infty x^n.$$

The last sum is just a geometric series.

For $(x-1)\sum_1^\infty nx^{n}$, rewrite as $x(x-1)\sum_1^\infty nx^{n-1}$. Note that $\sum_1^\infty nx^{n-1}$ is the term by term derivative of $1+x+x^2+\cdots$, that is, of $\frac{1}{1-x}$. The derivative is $\frac{1}{(1-x)^2}$. When you put things together, there is pleasant simplification.

HINT. Develop your term under the summation as n x^(n+1) - n x^n + x^n; you all now can rewrite the previous expression as x^2 [n x^(n-1)] - x [n x^(n-1)] + x^n and write the sums. The last term is a well known geometric progression for which you know the answer. Inside brackets, you already identified the first derivative of the first sum. I am sure you will easily finish from here.