I was working on a solution for $$\int\frac{x\ln (x^2+1)}{x^2+1}dx$$ and my approach was the following:
first substituting $u = x^2+1$, which means $du = 2x dx$, and therefore: $$\int\frac{\ln u}{2u}du$$
and then substituting $v=\ln u$, which means $dv = \frac{1}{u} du$, and therefore: $$\frac{1}{2}\int dv = \frac{v}{2} + c = \frac{\ln u}{2} +c = \frac{\ln (x^2+1)}{2}+c$$
However verifying this online from various sources, they indicate that the solution is in fact: $$\int\frac{x\ln (x^2+1)}{x^2+1}dx = \frac{\ln(x^2+1)^2}{4}+c$$ because they substitute $u = \ln(x^2+1)$ which gives $du = \frac{2x}{x^2+1} dx$, which is clairly a shorter path.
But my question is, why does both of these substitution techniques not yield the same result? Where lies my error?
When you get$$\int\frac{\ln u}{2u}\,\mathrm du$$and you do $v=\ln u$ and $\mathrm dv=\frac1u\,\mathrm du$, what you should have obtained was$$\int\frac v2\,\mathrm dv=\frac{v^2}4+c=\frac{\ln^2u}4+c=\frac{\ln^2(x^2+1)}4+c,$$instead of $\frac12\int\,\mathrm dv$.