<s>[INST] Approximation of a summation by an integral I am going to approximate $\sum_{i=0}^{n-1}(\frac{n}{n-i})^{\frac{1}{\beta -1}}$ by $\int_{0}^{n-1}(\frac{n}{n-x})^{\frac{1}{\beta -1}}dx$, such that $n$ is sufficiently large.


*

*Is the above approximation true?

*If the above approximation is true, by which theorem or method (like Newton's method) it can be holds? What is the error of approximation?

 [/INST] If we write $s = 1/(\beta-1)$, your sum and integral can be re-written as
$$ \sum_{i=0}^{n-1} \left( \frac{n}{n-i} \right)^s = n^s \sum_{k=1}^n \frac{1}{k^s}, \qquad \int_{0}^{n-1} \left( \frac{n}{n-x} \right)^s \, dx = n^s \int_{1}^{n} \frac{dx}{x^s}. $$
In this case, the Euler-Maclaurin formula provides a way of estimating the difference within $\mathcal{O}(n^{-K})$ for any prescribed exponent $K$. To see this, let $\tilde{B}_k(x) = B_k(x - \lfloor x \rfloor)$ be the periodic Bernoulli polynomials. Then
\begin{align*}
\int_{1}^{n} \frac{dx}{x^s} 
&= \left( \int_{[1,n]} \frac{d\lfloor x \rfloor}{x^s} + \int_{[1,n]} \frac{d\tilde{B}_1(x)}{x^s} \right) \\
&= \sum_{k=1}^{n} \frac{1}{k^s} + \int_{[1,n]} \frac{d\tilde{B}_1(x)}{x^s} \\
&= \sum_{k=1}^{n} \frac{1}{k^s} + \left[ \frac{\tilde{B}_1(x)}{x^s} \right]_{1^-}^{n} + s \int_{1}^{n} \frac{\tilde{B}_1(x)}{x^{s+1}} \, dx \\
&= \sum_{k=1}^{n} \frac{1}{k^s} - \frac{1 + n^{-s}}{2} + s \int_{1}^{n} \frac{\tilde{B}_1(x)}{x^{s+1}} \, dx
\end{align*}
However, there is an issue with this form. Indeed, if we keep using $[1, n]$ as the domain of integration, the error term of the Euler-Maclaurin formula never vanishes as $n \to \infty$. This is because for each fixed $K$,
$$ \int_{1}^{n} \frac{\tilde{B}_1(x)}{x^{s+K}} \, dx = \Theta(1) \qquad \text{as } n \to \infty $$
To resolve issue, let us assume $s > 0$ and we split the last integral as the difference of two:
\begin{align*}
\int_{1}^{n} \frac{dx}{x^s} 
&= \sum_{k=1}^{n} \frac{1}{k^s} -\frac{1 + n^{-s}}{2} + s \int_{1}^{\infty} \frac{\tilde{B}_1(x)}{x^{s+1}} \, dx - s \int_{n}^{\infty} \frac{\tilde{B}_1(x)}{x^{s+1}} \, dx
\end{align*}
We note that integration by parts easily checks the asymptotics $\int_{n}^{\infty} \frac{\tilde{B}_K(x)}{x^{s+K}} \, dx = \mathcal{O}(n^{-s-K})$ for each fixed $K$. Then letting $n \to \infty$ together with the extra assumption $s > 1$, this yields
\begin{align*}
s \int_{1}^{\infty} \frac{\tilde{B}_1(x)}{x^{s+1}} \, dx
= \frac{1}{2} + \frac{1}{s-1} - \zeta(s).
\end{align*}
This continues to hold for $s > 0$ by the principle of analytic continuation. Plugging this back and simplifying in terms of the sum,
\begin{align*}
\sum_{k=1}^{n} \frac{1}{k^s}
&= \int_{1}^{n} \frac{dx}{x^s} + \frac{1 + n^{-s}}{2} + s \left( \zeta(s) - \frac{1}{2} - \frac{1}{s-1} \right) + s \int_{n}^{\infty} \frac{\tilde{B}_1(x)}{x^{s+1}} \, dx.
\end{align*}
Then we can continue the procedure to extract more terms: for each fixed $K$,
\begin{align*}
\sum_{k=1}^{n} \frac{1}{k^s}
&= \int_{1}^{n} \frac{dx}{x^s} + \frac{1 + n^{-s}}{2} + s \left( \zeta(s) - \frac{1}{2} - \frac{1}{s-1} \right)\\
&\qquad - \sum_{j=2}^{K} \frac{\Gamma(s+j-1)}{\Gamma(s)} \frac{B_j}{j!} \frac{1}{n^{s+j-1}} + \underbrace{\frac{\Gamma(s+K)}{K!\Gamma(s)} \int_{n}^{\infty} \frac{\tilde{B}_K(x)}{x^{s+K}} \, dx}_{\mathcal{O}(n^{-s-K-1})}
\end{align*}
as $n \to \infty$.
</s>