<s>[INST] Deriving the BBP identify for $\pi$ I was given a problem to learn how to use Mathematica. I should derive the identity from the paper 1 known as the BBP formula for $\pi$. But I can't figure it out why
$$\begin{equation} \sum_{k=0}^{\infty} \frac{1}{16^k}(\frac{4}{8i+1} - \frac{2}{8i+4}-\frac{1}{8i+5}-\frac{1}{8i+6}) = \int_0^{\frac{1}{\sqrt{2}}} \frac{4\sqrt{2}-8x^3-4\sqrt{2}x^4-8x^5}{1-x^8} {dx} \end{equation}$$
holds while using 
$$\begin{equation}
\int_0^{\frac{1}{\sqrt{2}}} \frac{x^{k-1}}{1-x^8} {dx} = \int_0^{\frac{1}{\sqrt{2}}} \sum_{i=0}^{\infty} x^{k-1}x^{8i} {dx} = \frac{1}{\sqrt{2}^k} \sum_{i=0}^{\infty} \frac{1}{16i(8i+k)}
\end{equation}$$
this. I don't see how I can figure this out neither in Mathematica nor by hand.
 [/INST] Begin by writing
$$
\begin{align}
\int_0^{\frac{1}{\sqrt{2}}} &\frac{4\sqrt{2}-8x^3-4\sqrt{2}x^4-8x^5}{1-x^8} dx = 
\\&
4 \sqrt{2}\int_0^{\frac{1}{\sqrt{2}}} \frac{x^0}{1-x^8} dx 
- 
8\int_0^{\frac{1}{\sqrt{2}}} \frac{x^3}{1-x^8} dx 
\\ & \qquad - 
4 \sqrt{2}\int_0^{\frac{1}{\sqrt{2}}} \frac{x^4}{1-x^8} dx 
- 
8\int_0^{\frac{1}{\sqrt{2}}} \frac{x^5}{1-x^8} dx
\end{align}
$$
</s>