As part of a homework problem in Rudin, I need calculate
$$ \int_{1}^{N} \frac{[x]}{x^{s+1}} \,dx$$ where $[x]$ is the floor function. Clearly $[x]$ has derivative $0$ everywhere but the integers.
Is the following correct?:
$$\begin{align} \int_{1}^{N} \frac{[x]}{x^{s+1}} \,dx &= \Big( -\frac{[x]}{s}x^{-s} \Big)_{1}^{N} + \int_{1}^{N} \frac{d}{dx}([x])\frac{1}{x^{s+1}} \,dx \\ &= \Big( -\frac{[x]}{s}x^{-s} \Big)_{1}^{N} + \int_{1}^{2} \frac{d}{dx}([x])\frac{1}{x^{s+1}} \,dx + \cdots + \int_{N-1}^{N} \frac{d}{dx}([x])\frac{1}{x^{s+1}} \,dx \\ &= \Big( -\frac{[x]}{s}x^{-s} \Big)_{1}^{N} + 0 \\ &=\frac{-1}{s} \Big(\frac{N}{x^{-s}} -1 \Big) \end{align}$$
Is this a correct calculation? If not, please do not explicitly give the correct answer, rather a hint as to where I've gone wrong would be nice.
You can not apply integration by parts here because one of the function is not continue, as Hint the right way is to write your intgral as: $$\int_{1}^{N} \frac{[x]}{x^{s+1}} \,dx=\sum_{i=1}^{N-1}\int_{i}^{i+1} \frac{[x]}{x^{s+1}} $$
now what is the value of $[x]$ in the interval $[i,i+1]$ and continue your calculations.