Let $\{f_k\}$ and $\{g_k\}$ be sequences of real numbers. The formula for summation by parts is given by:
$\sum_{k=m} ^n f_k \Delta g_k=(f_{n+1}g_{n+1}-f_mg_m)-\sum_{k=m} ^n g_{k+1}\Delta f_k$,
where $\Delta f_k=f_{k+1}-f_k$.
Letting $f_k=2k+1$ and $g_k=-\frac{1}{k}$. One then computes $\Delta f_k=2$ and $\Delta g_k=\frac{1}{k(k+1)}$. Therefore, using the partial summation formula, we have
\begin{align*} \sum_{k=1} ^n f_k \Delta g_k=\sum_{k=1} ^n \frac{2k+1}{k(k+1)}&=-\frac{2n+3}{n+1}+3+\sum_{k=1} ^n \frac{2}{k+1} \\ &=\frac{n}{n+1}+2(H_n-1)\\ &=2H_n-\frac{n+2}{n+1}, \end{align*}
where $H_n$ denotes the $n^{th}$ harmonic number.
I have check my answer multiple times, but I am convinced it is incorrect. Could anyone point out a flaw in my reasoning?
Here is the full solution:
Let $f_k=2k+1$ and $g_k=-\frac{1}{k}$. One then computes $\Delta f_k=2$ and $\Delta g_k=\frac{1}{k(k+1)}$. Therefore, \begin{align*} \sum_{k=1} ^n f_k \Delta g_k=\sum_{k=1} ^n \frac{2k+1}{k(k+1)}&=-\frac{2n+3}{n+1}+3+\sum_{k=1} ^n \frac{2}{k+1} \\ &=\frac{n}{n+1}+2(H_{n+1}-1)\\ &=2H_n+\frac{n}{n+1}-2\frac{n}{n+1}\\ &=2H_n-\frac{n}{n+1}. \end{align*}