Please explain the below line in detail -
$$\displaystyle \sum_{n=1}^{\infty} \frac{1}{n^s}- \int_{1}^{\infty}\frac{1}{x^s}dx= \sum_{n=1}^{\infty} \int_{n}^{n+1} \left(\frac{1}{n^s}-\frac{1}{x^s}\right) dx$$
How the summation and integration came in-front of the both expression and why the integration has different limit value?
The source of the question can be found here.
If $f$ is any integrable function over $[1,+\infty)$ (in your case $f(x)=1/x^s$ with $s>1$), then $$\int_{1}^{\infty}f(x)dx=\lim_{N\to +\infty}\int_{1}^{N}f(x)dx= \lim_{N\to +\infty}\sum_{n=1}^{N-1} \int_{n}^{n+1} f(x)dx=\sum_{n=1}^{\infty} \int_{n}^{n+1} f(x)dx$$ and $$f(n)= f(n)(n+1-n)=f(n)\int_{n}^{n+1} dx=\int_{n}^{n+1}f(n) dx.$$ Can you take it from here?