A unspotted mistake involving simple Harmonic numbers There is a mistake in the following calculations. However, I can't find it so I'd like to ask for help
\begin{align}
S&=1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\dots+\frac{1}{2n-1}-\frac{1}{2n}\\
&=1+\frac{1}{3}+\frac{1}{5}+\frac{1}{7}+\dots+\frac{1}{2n-1}-\left(\frac{1}{2}+\frac{1}{4}+\dots+\frac{1}{2n}\right)\\
&=\sum_{k=0}^{n-1}\frac{1}{2k+1}-\frac{1}{2}\sum_{k=0}^{n-1}\frac{1}{k+1}=\sum_{k=0}^{n-1}\int_0^1 x^{2k} dx-\frac{1}{2}\sum_{k=0}^{n-1}\int_0^1 x^k dx\\
&=\int_0^1 \sum_{k=0}^{n-1} x^{2k} dx-\frac{1}{2}\int_0^1 \sum_{k=0}^{n-1} x^k dx=\int_0^1 \frac{1-x^{2n}}{1-x}dx -\frac{1}{2}\int_0^1 \frac{1-x^n}{1-x}dx\\
&=H_{2n}-\frac{H_n}{2}
\end{align}
The result should've been
$$H_{2n}-H_{n}$$
By
\begin{align}
&1+\frac{1}{3}+\frac{1}{5}+\frac{1}{7}+\dots+\frac{1}{2n-1}-\left(\frac{1}{2}+\frac{1}{4}+\dots+\frac{1}{2n}\right)\\
&=1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\dots+\frac{1}{2n}-\left(1+\frac{1}{2}+\dots+\frac{1}{n}\right)\\
&=H_{2n}-H_{n}
\end{align}

$1 \over 1-x$ should be $1 \over 1-x^2$ on the fourth line.
$$
\sum_{k=0}^{n-1} x^{2k} = {1-x^{2n}\over 1-x^2}
$$
Disclaimer: I didn't follow through with all the calculations to check that fixing this arrives at the correct answer.
