Calculate a sum involving nth root of unity Calculate
$$1+2\epsilon+3\epsilon^{2}+\cdots+n\epsilon^{n-1}$$
Where $\epsilon$ is nth root of unity.
There is a hint that says: multiply by $(1-\epsilon)$
Doing this multiplication I get:
$$1+\epsilon+\epsilon^{2}+\epsilon^{3}+\cdots+\epsilon^{n-1}-n$$
The answer is: $-\frac{n}{1-\epsilon} $if $ \epsilon\neq1$ and $\frac{n(n+1)}{2}$ if $\epsilon=1$.
I can't see how to get this result...
 A: If $\epsilon=1$, $$1+2\epsilon+3\epsilon^{2}+\cdots+n\epsilon^{n-1}=\sum_{k=1}^nk=\frac{n(n+1)}2$$ by the familiar formula for the sum of the first $n$ positive integers (or more generally by the formula for the sum of a finite arithmetic series).
If $\epsilon\ne 1$, you’ve shown that 
$$(1-\epsilon)(1+2\epsilon+3\epsilon^{2}+\cdots+n\epsilon^{n-1})=\sum_{k=0}^{n-1}\epsilon^k-n=\frac{1-\epsilon^n}{1-\epsilon}-n=-n\;,$$
where I’ve used the formula for the sum of a finite geometric series and the fact that $\epsilon^n=1$. It follows immediately that
$$1+2\epsilon+3\epsilon^{2}+\cdots+n\epsilon^{n-1}=-\frac{n}{1-\epsilon}$$ in this case.
A: Of course, when $\epsilon=1$,
$$
\begin{align}
&1+2\epsilon+3\epsilon^2+4\epsilon^3+\dots+n\epsilon^{n-1}\\
&=1+2+2+4+\dots+n\\
&=\frac{n(n+1)}{2}
\end{align}
$$
When $\epsilon\ne1$
$$
\left.
\begin{align}
1+\epsilon+\epsilon^2+\epsilon^3+\dots+\epsilon^{n-1}&=\frac{1-\epsilon^n}{1-\epsilon}\\
\epsilon+\epsilon^2+\epsilon^3+\dots+\epsilon^{n-1}&=\frac{\epsilon-\epsilon^n}{1-\epsilon}\\
\epsilon^2+\epsilon^3+\dots+\epsilon^{n-1}&=\frac{\epsilon^2-\epsilon^n}{1-\epsilon}\\
\epsilon^3+\dots+\epsilon^{n-1}&=\frac{\epsilon^3-\epsilon^n}{1-\epsilon}\\
&\vdots\\
\epsilon^{n-1}&=\frac{\epsilon^{n-1}-\epsilon^n}{1-\epsilon}\\
\end{align}
\right\}\mbox{ $n$ equations}
$$
Summing these $n$ equations yields
$$
\begin{align}
1+2\epsilon+3\epsilon^2+4\epsilon^3+\dots+n\epsilon^{n-1}
&=\frac{\frac{1-\epsilon^n}{1-\epsilon}-n\epsilon^n}{1-\epsilon}\\
&=\frac{n}{\epsilon-1}
\end{align}
$$
A: $1+2\epsilon+3\epsilon^{2}+\cdots+n\epsilon^{n-1} = f'(\epsilon)$, where $f(x)=1+x+x^2+\cdots+x^n=
\dfrac{x^{n+1}-1}{x-1}$.
Now $f'(x)=\dfrac{(n+1)x^n(x-1)-(x^{n+1}-1)}{(x-1)^2} $ and so $f'(\epsilon)=\dfrac{(n+1)(\epsilon-1)-(\epsilon-1)}{(\epsilon-1)^2}=\dfrac{n}{\epsilon-1}$, if $\epsilon\neq 1$.
A: $1+\epsilon+\epsilon^{2}+\epsilon^{3}+\cdots+\epsilon^{n-1}$ is a geometric series and its summation can be computed as
$$\frac{1-\epsilon^n}{1-\epsilon}$$ for $\epsilon\neq 1$.
