Proving an integral using a series If $f:(0,1]\rightarrow \textbf {R}$ is defined by $f(x)=2nx$ for $\frac{1}{n+1}\leq x \leq \frac 1n$ and $n$ is a natural number, assuming that $\sum_{k=1}^{k=\infty}1/k^2=\pi^2/6$,  show that $\int_0^1 f(x)dx=\pi^2/6$.
So I wrote the summation of the integral from $x=\frac{1}{n+1}$ to $x=\frac{1}{n}$ of $f(x)dx$. After I integrate I'm left with the infinite series of $\frac{1}{k}-\frac{k}{(k+1)^2}$ from $k=1$ to $k=\infty$? Not sure where to go from here.

I feel a bit silly, as I missed the clearly correct way to do this.
As you say, you manipulate the integral into the sum
$$ \sum_{k \geq 1} \frac{1}{k} - \frac{k}{(k+1)^2}.$$
We now use the deep fact that $k = k + 1 - 1$ to finish.
$$ \begin{align}
\sum_{k \geq 1} \frac{1}{k} - \frac{k}{(k+1)^2} &= \sum_{k \geq 1} \frac{1}{k} - \frac{k+1}{(k+1)^2} + \frac{1}{(k+1)^2} \\
&= \sum_{k \geq 1} \frac{1}{k} - \frac{1}{k+1} + \frac{1}{(k+1)^2} \\
&= \sum_{k \geq 1} \frac{1}{k^2} = \frac{\pi^2}{6}.
\end{align}$$
