Why is the integral of $\frac1{x^2}$ from $1$ to $\infty$ not the same as the infinite sum from $1$ to $\infty$? Studying series I am a bit confused on this point. The infinite sum of $1/x^2$ from $1$ to $\infty$ was proved by Euler to be $\pi^2$ divided by $6$:
$$\sum_{x=1}^\infty\frac 1 {x^2}=\frac {\pi^2} 6$$
But if I integrate from $1$ to $\infty$ of the same entity namely $1/x^2$ it is $1$. Correct..? Unless I did it wrong. 
$$\int_1^\infty\frac 1 {x^2}dx=1$$
How can this be since by integrating it seems we are adding a lot more numbers to cover the same area so we should by all means get the same thing or something at least as large as $\pi^2/6$?
 A: Note that
$$
\int_1^\infty \frac{1}{x^2}\leq\sum_1^\infty \frac{1}{n^2}\tag{1}
$$
by considering a Riemann sum with left endpoints. Here is a picture (for the case of $1/x$ but a similar picture can be drawn for this case as well). See this picture. Image credits go to Wikipedia. 
A: When you do the sum, you sort of approximate the area with rectangles of base length equal to $1$. Draw the function $1/x^2$ and draw the rectangles with base length 1; you'll see that the area under the rectangles is much bigger than the area under the function $1/x^2$
Here is an illustration for the function $1/x$, but it's essentially the same as in the $1/x^2$ case. (Thanks to @FoobazJohn)
The integral adds a lot more numbers, but these numbers are multiplied by something very small. The end result is that the integral represents the area under the $1/x^2$ curve, which is less than the area under the rectangles.
A: Let us compare $1$ and $\int_1^2\frac1{x^2}\,\mathrm dx$. Since $\bigl(\forall x\in(1,2]\bigr):\frac1{x^2}<1$, $\int_1^2\frac1{x^2}\,\mathrm dx<1$. For the same reason, $\int_2^3\frac1{x^2}\,\mathrm dx<\frac14$, $\int_3^4\frac1{x^2}\,\mathrm dx<\frac19$, and so on. So$$1=\int_1^\infty\frac1{x^2}\,\mathrm dx<\sum_{n=1}^\infty\frac1{n^2}=\frac{\pi^2}6.$$
Note that it is not true that $\int_a^bf(x)\,\mathrm dx$ is the sum of all numbers $f(x)$ with $x\in[a,b]$. Instead, it is the average value of $f$ in $[a,b]$ times $b-a$.
