When will it diverge? When will it converge? 
Test for what $x\in \mathbb{R}$ the series
$\sum_{n=0}^\infty nx^n$
converges and for what $x\in \mathbb{R}$ it diverges. Determine the limit of sequence for the case of the convergence.

We started dealing with series since the beginning of the week and I tried myself on this one for practice.
I was thinking, that for $x<1$ it should converge? Because it kind of reminds of the geometric series. But the n in front of the x kind of bugs me. Anyway, how can I prove that mathematically? Or is the argumentation with the geometric series enough? Similarly, I was thinking that for an $x>1$ it should diverge.
But I need a proof that isn't based on guesses I think. I read about tests that determine whether something converges, like the ratio test, but I don't know how to use them yet. Are there also tests which determine whether a series diverges?
 A: You can try to prove by your own the ratio test which says that a series $\sum u_n$ having strictly positive terms converge if $\lim \frac{u_{n+1}}{u_n}$ exists and is strictly less than $1$.
A: Note that $$\sum_{n=0}^{\infty}nx^n=x\frac{d}{dx}\sum_{n=0}^{\infty}x^n=\frac{x}{(1-x)^2}$$
for $|x|<1$.  So, the series converges to $\frac{x}{(1-x)^2}$ for $|x|<1$.
For $|x|\ge 1$ we see that the series diverges since its terms $nx^n$ dominate $x^n$, and the geometric series diverges for $|x|\ge 1$.
A: You can use Hadamard's formula for the radius of convergence:
$$\frac1R=\limsup_{n\to\infty} n^{\frac1n}=1$$
hence $R=1$.
Alternatively, based on Abel's lemma,
$$R=\sup\{r\ge0\mid nr^n\enspace\text{is bounded}\}$$
For $r\ge1$, $\,(nr^n)\to \infty$ and for $0\le r<1$, $\,(nr^n)\to 0$. Hence, again, $R=1$.
A: If $x>1$, the terms don't tend to zero as $n \to \infty$, which is required for convergence (there's no point where the value stops jumping around too much as you take more and more terms).
If $x<1$, notice the following trick: we know that if
$$ S_n = 1 + x + \dotsb + x^n, $$
then
$$ xS_n = x + x^2 + \dotsb + x^{n+1},  $$
so
$$ S_n = \frac{1-x^{n+1}}{1-x} $$
by subtracting and dividing. But now,
$$ \begin{align*}
x+2x^2+3x^3+\dotsb + nx^n &=x+x^2+x^3+\dotsb + x^n \\
&\qquad +x^2+x^3 + \dotsb + x^n \\
&\qquad\qquad\qquad\quad \ddots \\
&\qquad\qquad\qquad\qquad+ x^n \\
&= xS_{n-1} + x^2 S_{n-2} + \dotsb + x^{n-1}S_1 + x^{n} S_0 \\
&= \frac{x}{1-x} \left( (1-x^{n}) + x(1-x^{n-1}) + x^2(1-x^{n-2})+ \dotsb + x^{n-1} (1-x) \right) \\
&= \frac{x}{1-x} \left( (1+x+x^2+\dotsb x^{n-1})-nx^{n} \right) \\
&= \frac{x}{1-x} \left( S_{n-1}-nx^{n} \right) \\
&= \frac{x}{1-x} \left( \frac{1-x^n}{1-x}-nx^{n} \right)
\end{align*} $$
Now, this does simplify further (to $\frac{x}{(1-x)^2}(1-(n+1)x^n+nx^{n+1})$), but we don't want that. What we want to know is what happens as $n \to \infty$. The terms we need to look at are
$$ -\frac{x^n}{1-x} \quad \text{and} \quad \frac{nx^{n+1}}{1-x}. $$
The first obviously goes to zero since $-1<x<1$, so each multiplication decreases the absolute value of $x^{n-1}$. The second is harder: but look at the ratio of successive values:
$$ \frac{(n+1)x^{n+1}}{nx^n} = \left( 1+ \frac{1}{n}\right) x $$
Now, for $n$ large enough the bracket can be made as close to $1$ as we like: in particular, we can make it smaller than $1/\lvert x\rvert$, which we know is larger than $1$ because $-1<x<1$. Therefore
$$ \left\lvert \left( 1+ \frac{1}{n}\right) x \right\rvert < \frac{\lvert x \rvert}{\lvert x \rvert} = 1, $$
so the ratio of successive terms is less than $1$, so $nx^n$ eventually tends to zero. Hence the sum you are considering converges, to $x/(1-x)^2$.
