29

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.

Abel
  • 1,792

8 Answers8

38

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.

Arturo Magidin
  • 398,050
  • 1
    I think you've proved that $C=0$ in this case. We're not just making an assumption here. $C=0$ is a hard concrete result in the by-parts formula. – Nick Nov 01 '14 at 09:44
  • 1
    I have problem understanding why did you take $v = \frac{x^2}{2} + C$ for both the first term and the second term. This is why they cancel out eventually. Why not take $v = \frac{x^2}{2} + C_1$ for the first term and $v = \frac{x^2}{2} + C_2$ for the second term. Aren't both valid anti-derivatives of $x$? I know $C$ is as arbitrary as $C_1$ or $C_2$. This is what I find confusing. Indefinite integrals aren't as concrete a thing as definite integrals which are essentially area under a curve. I have learnt that indefinite integrals are a family of functions with the same derivative. – Shinsekai no Kami Jun 23 '22 at 11:10
  • 1
    @ShinsekainoKami In integration by parts you pick one antiderivative for $dv$ and put it into the formula. The formula is $\int u,dv = uv - \int v,du$, not $\int u,dv = uv_1 - \int v_2,du$. The calculation above just shows you can pick any one antiderivative of $v$. The fact that the constants cancel is the point. But even if you pick different constants, once you calculate $\int v,du$ you will just end up with a bunch of constants, which add up to... a constant of integration. – Arturo Magidin Jun 23 '22 at 14:34
  • 2
    @ArturoMagidin Got it. Thanks! I was using the formula $\int f(x) g(x) dx = f(x) \int g(x) dx - \int [ \frac{d}{dx} (f(x)) \int g(x) dx ] dx$ without giving consideration to the original product rule using which this is derived. But I'm not sure if we will just end up with a constant if the arbitrary constants are unequal, say $C_1 \ne C_2$. For example, in the case you have taken in your answer above, we would end up with $\frac{x^2}{2} \ln x - \frac{x^2}{4} + (C_1 - C_2) \ln x + D$. We only get the expected answer if $C_1 = C_2$, which is in fact true like you have just explained. – Shinsekai no Kami Jun 24 '22 at 08:24
8

The second integral would change, but also the first term... Have you actually checked to see what happens if you change the constant?

5

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$.

Rasmus
  • 18,404
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$ )

2

HINT $\rm\ \ C'=0\ \ \Rightarrow\ \ (UV)'-U'\:V\ =\ UV'\: =\ U(V+C)'\: =\ (U(V+C))'-U'\:(V+C) $

Bill Dubuque
  • 272,048
1

We didn't "forget". We simply choose C in a way that the resulting $ \int u\,dv$ would be the simplest form. Usually $C = 0$ but not always. If, for example, we have this integral:

$$ \int \ln(x+2) \,dx $$

Then you would choose $ v = x + 2 $ because $ du = \frac{dx}{x+2} $

Second example:

$$ \int x\ln(x+2) \,dx $$

Then $$ v = \frac{x^2-4}{2} = \frac{(x-2)(x+2)}{2} $$ and $$ u\,dv = \frac{x-2}{2} dx $$

Dylan
  • 16,575
0

Let $AD$ denote the anti derivative operator. Then \begin{align*} &AD \left(u\frac{dv}{dx}+v\frac{du}{dx}\right)=uv\\[5pt] \Rightarrow\qquad &AD \left(u\frac{dv}{dx}\right)+AD\left( v\frac{du}{dx}\right)=uv\\[5pt] \Rightarrow\qquad &AD \left(u\frac{dv}{dx}\right)=uv-AD\left( v\frac{du}{dx}\right).\tag{i} \end{align*} Taking $u=f(x)$ and $v=AD (g(x))$ in (i), we get $$AD \big(f(x)g(x)\big)=f(x)AD(g(x))-AD \left[f'(x)AD( g(x))\right].$$ Therefore, by definition of the indefinite integral, \begin{align*} \int \big(f(x)g(x)\big)\,dx&=AD \big(f(x)g(x)\big)+C\\ &=f(x)AD(g(x))-AD \left[f'(x)AD( g(x))\right]+C. \end{align*} If we write the above formula as \begin{align*} \int \big(f(x)g(x)\big)\,dx= f(x)\int g(x)\,dx-\int\left[f'(x)\int g(x)\,dx\right]\,dx\tag{ii} \end{align*} with the understanding that we shall take only one arbitrary constant of integration on the right hand side at the final stage, then this justifies that we can take the arbitrary constant only once.

Deepak
  • 63
0

We "forget" it, and add it in the last step. The whole point in the constant of integration is to remind us that there could have been a constant term added on at the end originally, but in the process of differentiation we got rid of it because it did not affect the slope.