Why ${ \sum\limits_{n=1}^{\infty} \frac{1}{n} }$ is divergent , but ${ \sum\limits_{n=1}^{\infty} \frac{1}{n^2} }$ is convergent? I don't understand why ${ \displaystyle \sum\limits_{n=1}^{\infty} \frac{1}{n} }$ is divergent, but ${ \displaystyle \sum\limits_{n=1}^{\infty} \frac{1}{n^2} }$ is convergent and its limit is equal to ${ \displaystyle\frac{\pi^2}{6} }$. In both cases, ${n^{th}}$ term tends to zero, so what makes these series different?
${ \displaystyle \sum\limits_{n=1}^{\infty} \frac{1}{n} = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} +  }$ ...
${ \displaystyle \sum\limits_{n=1}^{\infty} \frac{1}{n^2} =1 + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \frac{1}{25} + \frac{1}{36} + }$ ...

Summation is closely related to integration. For a non-increasing function $f$ we have
$$\sum_{n=t+1}^\infty f(n) \leq \int_t^\infty f(x)\mathrm{d}x \leq \sum_{n=t}^\infty f(n)$$
or expressed differently
$$-f(t) + \sum_{n=t}^\infty f(n) \leq \int_t^\infty f(x)\mathrm{d}x \leq \sum_{n=t}^\infty f(n)$$
or equivalently
$$\int_t^\infty f(x)\mathrm{d}x \leq \sum_{n=t}^\infty f(n) \leq f(t) + \int_t^\infty f(x)\mathrm{d}x$$


So if the integral exists, the sum diverges iff the integral is $\infty$ - the sum bounds the integral and vice versa.

Let's consider $p>1$:
\begin{align}
\int_1^{\infty} \frac{1}{x^p} \mathrm{d}x &= \int_1^{\infty} x^{-p} \mathrm{d}x \\
&= \frac{1}{1-p}(\lim_{x\rightarrow\infty} x^{1-p} - 1^{1-p}) \\
&= \frac{1}{p-1}
\end{align}
which means that the corresponding sum converges. We even get some bounds, in particular
$$ \frac{1}{p-1} \leq \sum_{n=1}^\infty n^{-p} \leq \frac{1}{p-1} + 1$$
If $p = 1$ then
\begin{align}
\int_1^{\infty} \frac{1}{x} \mathrm{d}x &= \lim_{x\rightarrow\infty} (\ln x) - \ln 1 \\
&= \infty
\end{align}
which means that the corresponding sum diverges.
So we can conclude that the sum $\sum_{n=1}^\infty n^{-p}$ converges iff $p>1$.
