Constants of integration in integration by parts
After finishing a first calculus course, I know how to integrate by parts, for example, $\int x \ln x dx$, letting $u = \ln x$, $dv = x dx$: $$\int x \ln x dx = \frac{x^2}{2} \ln x - \int \frac{x^2}{2x} dx.$$
However, what I could not figure out is why we assume from $dv = x dx$ that $v = \frac{x^2}{2}$, when it could be $v = \frac{x^2}{2} + C$ for any constant $C$. The second integral would be quite different, and not only by a constant, so I would like to understand why we "forget" this constant of integration.
Thanks.
Solution 1:
Take your example, $$\int x\ln x\,dx.$$ Note $x\gt 0$ must be assumed (so the integrand makes sense).
If we let $u = \ln x$ and $dv= x\,dx$, then we can take $v$ to be any function with $dv = x\,dx$. So the "generic" $v$ will be, as you note, $v = \frac{1}{2}x^2 + C$. What happens then if we use this "generic" $v$? \begin{align*} \int x\ln x\,dx &= \ln x\left(\frac{1}{2}x^2 + C\right) - \int \left(\frac{1}{2}x^2+C\right)\frac{1}{x}\,dx\\ &= \frac{1}{2}x^2\ln x + C\ln x - \int\left(\frac{1}{2}x + \frac{C}{x}\right)\,dx\\ &= \frac{1}{2}x^2\ln x + C\ln x - \frac{1}{4}x^2 - C\ln x + D\\ &= \frac{1}{2}x^2\ln x - \frac{1}{4}x^2 + D, \end{align*} so in the end, we get the same result no matter what value of $C$ we take for $v$.
This says that we can take any value of $C$ and still get the same answer. Since we can take any value of $C$, why not take the simplest one, the one that does not require us to carry around an extra term that is going to cancel out anyway? Say..., $C=0$?
This works in general. If you replace $v$ with $v+C$ in the integration by parts formula, you have \begin{align*} \int u\,dv &= u(v+C) - \int(v+C)\,du = uv + Cu - \int v\,du - \int C\,du\\ &= uv+Cu - \int v\,du - Cu = uv-\int v\,du. \end{align*} So the answer is the same regardless of the value of $C$, and so we take $C=0$ because that makes our life simpler.
Solution 2:
The second integral would change, but also the first term... Have you actually checked to see what happens if you change the constant?
Solution 3:
Your observation that $dv=xdx$ does not imlpy $v=x^2/2$ is correct.
Your confusion resolves when you say it this way: we set $v=x^2/2$ and this implies $dv=xdx$.
Solution 4:
Your observation is correct
$$\int x \ln x dx = \frac{x^2}{2} \ln x - \int \frac{x^2}{2x} dx.$$
You could always write $$v = \frac{x^2}{2} + C$$ but that won't matter much because the final result would also involve a constant (Say $K$ which would be equal to $C+k$ )
Solution 5:
HINT $\rm\ \ C'=0\ \ \Rightarrow\ \ (UV)'-U'\:V\ =\ UV'\: =\ U(V+C)'\: =\ (U(V+C))'-U'\:(V+C) $