So according to Euler's proof of the Basel problem,
$$\sum_{n=1}^\infty \frac{1}{n^2}=\frac{\pi^2}{6},$$
But only for $n \in \mathbb{Z}$.
But if $n$ was a positive real and $n \geqslant 1$, then would the sum $S$ be equal to,
$$\int_1^\infty \frac{dx}{x^2}?$$
If so then after solving the integral via power rule we get $S=1$.
But how can this be since when taking reals, we take integral values as well as new values. So by logic shouldn't, $S>\dfrac{\pi^2}{6}$ but $1$ isn't. Where am I going wrong pls explain.



Note that
$$S=\int_1^1 \frac{dx}{x^2}=0\quad \neq \quad \sum_{n=1}^1 \frac{1}{n^2}=1$$
To see more in general why inquality doesn't hold you should consider the function $\frac1{x^2}$ and compare with $\frac1{n^2}:=\frac{1}{\lfloor x\rfloor^2}\ge\frac{1}{\lfloor x^2\rfloor}$ to observe that
$$\frac1{x^2} \le \frac{1}{\lfloor x^2\rfloor}\le\frac{1}{\lfloor x\rfloor^2}\implies \int_1^\infty\frac{dx}{x^2}\le \int_1^\infty\frac{dx}{\lfloor x\rfloor^2}= \sum_{n=1}^\infty \frac{1}{n^2}$$
Plot for latter inequality