Why is it that $\sum_{n=1}^\infty \frac{1}{n^2}=\frac{\pi^2}{6}$ is not less than $\int_1^\infty \frac{dx}{x^2} = 1$? 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.
 A: In the following picture, the pink area is the left-hand part of the integral $\displaystyle \int_{x=1}^\infty \frac1x \, dx$ while the green and pink areas together are left-hand part of the sum $\displaystyle \sum_{n=1}^\infty \frac1{n^2}$
The green area is the difference, which is clearly positive and is in fact $\dfrac{\pi^2}{6} -1\approx 0.6449$

A: Why should the integral be equal to the sum? To see the sum must be larger,
note that
$$\int_1^\infty\frac{dx}{x^2}=\sum_{n=1}^\infty
\int_n^{n+1}\frac{dx}{x^2}<\sum_{n=1}^\infty\frac1{n^2}$$
as $x\mapsto 1/x^2$ is a decreasing function.
A: 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
A: Your logic doesn't hold because the integrand is a decreasing function so that its average value in a unit interval is lower than its initial value.

As the average value is larger than the final value, the following bracketing is guaranteed:
$$\dfrac{\pi^2}6-1<\int_1^\infty\frac{dx}{x^2}<\dfrac{\pi^2}6.$$

$\color{lightgreen}{\text{initial}},\color{blue}{\text{average}},\color{magenta}{\text{final}}$
A: $$\sum_{k=1}^{\infty}\frac1{k^2}-\int_1^{\infty}\frac{dx}{x^2}=\sum_{k=1}^{\infty}\left\{\frac1{k^2}-\int_k^{k+1}\frac{dx}{x^2}\right\}>0$$
Because in each interval of integration, $$\frac1{k^2}>\frac1{x^2}$$
A: Each term of the sum is greater than the corresponding part of the integral. Therefore, the sum is greater than the integral.
$$
\begin{align}
\sum_{k=1}^\infty\frac1{k^2}-\int_1^\infty\frac{\mathrm{d}x}{x^2}
&=\sum_{k=1}^\infty\left(\frac1{k^2}-\int_k^{k+1}\frac{\mathrm{d}x}{x^2}\right)\\
&=\sum_{k=1}^\infty\left(\frac1{k^2}-\frac1{k(k+1)}\right)\\
&=\sum_{k=1}^\infty\frac1{k^2(k+1)}\\[6pt]
&\ge\frac12\quad\text{(the first term)}
\end{align}
$$

The sum is the area of the rectangles $\left(\frac1{k^2}\right)$ and the integral is the area below the curve, $\left(\frac1{k(k+1)}\right)$. The difference is the area of the rectangles above the curve $\left(\frac1{k^2(k+1)}\right)$.

In the image above, it can be seen that
$$
\sum_{k=1}^\infty f(k)=\int_1^\infty f(\lfloor x\rfloor)\,\mathrm{d}x
$$
If $f$ is a decreasing function, then $f(x)\le f(\lfloor x\rfloor)$ because $x\ge\lfloor x\rfloor$, and therefore,
$$
\begin{align}
\int_1^\infty f(x)\,\mathrm{d}x
&\le\int_1^\infty f(\lfloor x\rfloor)\,\mathrm{d}x\\
&=\sum_{k=1}^\infty f(k)
\end{align}
$$
A: If I guess correctly you want to ask why the sum of $1/n^2$ is greater than integral of $1/x^2$ whereas logically it should be the other way round. Your argument is that the integral actually tries to sum all the values for $1/x^2$ and not just the ones where $x$ is integer. Sorry!! Thus is wrong. An integral is not summing the values of a function. Rather it is summing product of values of function and the length of subintervals based on which function values are selected. Remember the Riemann sum is not $\sum f(x_i) $ but rather $\sum f(x_i) (x_i-x_{i-1})$ and it tends to the value of integral when the subinterval length $x_i-x_{i-1}$ tends to zero.
On the other hand the sum $\sum 1/n^2$ can be easily seen to be some kind of a Riemann sum where interval length is fixed as $1$ so obviously this has to be greater than integral of $1/x^2$ (full justification of this is already available in other answers).
To be precise the idea of an integral is not sum a continuous set of values but rather a limit of a very specific kind of sum. It is however possible to define sum of a continuous set of values (sum over an uncountable index set) but it turns out to be infinite unless each term is $0$.
