Integration by parts - $\int \ln (2x+1) \text{dx}$ Use integration by parts to find
$\int \ln (2x+1) \text{dx}$.
So far I have:
$$x\ln(2x+1)-\int\dfrac{2x}{2x+1}dx+c$$
Using integration by substitution to find the integral
$$u=2x+1\Rightarrow\text{du}=2\text{dx}$$
$$\int\dfrac{2x}{2x+1}\cdot\dfrac{1}{2}\text{du}=\int xu^{-1}$$
$$=\int \left(\dfrac{u}{2}-\dfrac{1}{2}\right)u^{-1}\text{du}=\int\left[\dfrac{1}{2}-\dfrac{1}{2}u^{-1}\right]\text{du}$$
$$=\dfrac{1}{2}x-\dfrac{1}{2} \ln \left|2x+1\right|$$
Looking at the answer in the back, this is wrong.
The answer is $x \ln(2x+1)-x+\dfrac{1}{2}\ln(2x+1)+c$.
What have I done wrong?
 A: You made a mistake when evaluating the last integral. One approach to evaluate the  integral of $\tfrac{2x}{2x+1}$ is to write it as: $$\eqalign{\int\dfrac{2x}{2x+1}\mathrm dx&=\int\dfrac{-1+(2x+1)}{2x+1}\mathrm dx\\&=\int\left[\dfrac{-1}{2x+1}+\dfrac{2x+1}{2x+1}\right]\mathrm dx\\
&=\int\left[\dfrac{-1}{2x+1}+1\right]\mathrm dx\\
&=\int\dfrac{-1}{2x+1}\mathrm dx+\int1\,\mathrm dx\\
&=\int-\dfrac{1}{2x+1}\mathrm dx+x.\\
&=-\int\dfrac{1}{2x+1}\mathrm dx+x.\\
}$$
To evaluate the remaining integral use the substitution $u=2x+1$, then $\mathrm du=2\,\mathrm dx\ldots$ 
A: Your issue is in what follows this step:
\begin{align*}
x\ln(2x+1) - \int \frac{2x}{2x+1}\,\text{dx} &= x\ln(2x+1) - \int \frac{2x+1-1}{2x+1}\,\text{dx}\\
&= x\ln(2x+1) - \left(\int \frac{2x+1}{2x+1}\,\text{d}x - \int \frac{1}{2x+1}\,\text{d}x\right)\\
&= x\ln(2x+1) - \left(\int \,\text{d}x - \int \frac{1}{2x+1}\,\text{d}x\right)\\
&= x\ln(2x+1) - \left(x - \frac{1}{2}\ln(2x+1)\right) + C\\
&= x\ln(2x+1) - x + \frac{1}{2}\ln(2x+1) + C
\end{align*}
(The second to last equality follows from a u-substitution, using $u = 2x+1$.  Technically, it seems that the answer should be
$$x\ln(2x+1)-x+\frac{1}{2}\ln|2x+1|+C$$
but perhaps there is some reason for them to be able to drop that absolute value.)
We can also compute this integral using substitution:  Use $u = 2x+1$, $2x = u-1$, $du = 2dx$, to compute it as follows:
\begin{align*}x\ln(2x+1) - \int \frac{2x}{2x+1}\,\text{d}x &= x\ln(2x+1) - \frac{1}{2}\int \frac{u-1}{u}\,\text{d}u\\
&= x\ln(2x+1) - \frac{1}{2}\int\,\text{d}u + \frac{1}{2}\int \frac{1}{u}\,\text{d}u\\
&= x\ln(2x+1) - \frac{u}{2} + \frac{1}{2}\ln|u| + C\\
&= x\ln(2x+1) - \frac{2x+1}{2} + \frac{1}{2}\ln|2x+1| + C\\
&= x\ln(2x+1) - x - \frac{1}{2} + \frac{1}{2}\ln|2x+1|+C\\
&= x\ln(2x+1) - x + \frac{1}{2}\ln|2x+1|+C'
\end{align*}
(the last equality is just a matter of absorbing the constant $\frac{1}{2}$ into the integration constant $C + \frac 12 = C'$)
A: You are right till $$I = x\ln(2x+1) - \int\dfrac{2xdx}{2x+1}.$$
The last integral can be calculated like this:
$$\int\dfrac{2xdx}{2x+1} =\int \dfrac{2x+1 - 1}{2x+1}$$
$$\int dx - \int \dfrac{1}{(2x+1)}$$
Substituting this you get the desired integral:
$$ I = x\ln(2x+1) -x +\frac{ \ln(2x+1)}{2}$$
A: Using these steps
$u=2x+1$, $(1/2)du=dx$ and $2x=u-1$  so: 
$$
\eqalign{
-\int\dfrac{u-1}u \frac12 du &= -\int\dfrac12du+\int\dfrac12u\,du \\
&= -\dfrac12(2x+1)+(1/2)\ln(2x+1).
}$$
A: Since no one else seems to have highlighted it yet, I just found your mistake.  It's in the very last step.  You may have skipped a step in your head, but the single step is what makes the difference.
$$\int\left(\frac12-\frac12u^{-1}\right)du=\frac u2-\frac12\ln|u|=x+\frac 12-\frac12\ln|2x+1|$$
which is the same as the book's answer with a different constant of integration.
A: $$
\begin{aligned}
\int \ln (2 x+1) d x &=\frac{1}{2} \int \ln (2 x+1) d(2 x+1) \\
&=\frac{(2 x+1) \ln (2 x+1)}{2}-\frac{1}{2} \int(2 x+1) \frac{2 d x}{2 x+1} \\
&=\frac{(2 x+1) \ln (2 x+1)}{2}-x+C
\end{aligned}
$$
