# Integration by parts: How to choose the constant which make calculations easier?

The formula of integration by parts is: $$\int u(x)v(x) dx = u(x)V(x) - \int u'(x)V(x) dx$$ Which can be re-written as: $$\int u(x)v(x) dx = u(x)[V(x)+C] - \int u'(x)[V(x)+C] dx$$ where C is a constant.

It makes some integration calculations simpler, such as:

$$\int x\tan^{-1}(x) dx$$ When we take $u(x)=\tan^{-1}(x)$ and $v(x)=x .dx$, then $V(x)= \frac {x^2}2 + \frac 12$ instead of $V(x) = \frac {x^2}2$. It make steps calculations easier and simpler.

The question is: How to know and choose this constant? is there some guide or it just experience ?

• unlike for differentiation there is never a go to guide for integration, I don't know about this trick, but my guess is experience.
– john
Jul 15 '15 at 21:01
• Differentation is just mechanics and integration is art. I also think it is just experience. Jul 15 '15 at 21:37
• Yes, integration is not like differentiation, it's not mechanics, but there is sometimes a guide like using "Weierstrass Substitution" in rational trigonometric functions. That's what I'm looking for, a guide :). Jul 15 '15 at 21:48
• Compute $du = \dfrac{dx}{1+x^2}$ before choosing the constant. Then you can choose it to get a nice cancellation, as you have done. Jul 15 '15 at 22:01
• Once you have chosen $u$, $du/dx$ is uniquely determined, e.g. $\dfrac{d}{dx}(\tan^{-1}x) = \dfrac{1}{1+x^2}$. Also, once $u$ is chosen, $dv$ is fixed, but you don't yet have to commit to a specific constant of integration. It can benefit you to figure out $du$ before you even choose the exact form of $v$, as you can choose the constant of integration so that there is and $x^2+1$ term rather than an $x^2$ term - taking away some of the guesswork. Jul 16 '15 at 12:13

This is not as hard as it seems to, first note that

$$u(x)(V(x)+C)-\int u'(x)(V(x)+C)dx=u(x)V(x)+Cu(x)-\int\left(u'(x)v(x)+Cu'(x)\right)dx=u(x)V(x)- \int u'(x)V(x)dx+\underbrace{Cu(x)-C\int u'(x)dx}_{\mathrm{\text{these are equal}}}$$

So we can use this trick in every integral (not only in formula of integration by parts), where we know $u(x)$, or it's easy to compute.

The problem is to find such $C$ that

$$\int (u'(x)V(x) +Cu'(x))dx$$

is easier to compute. In your case $u'(x)=\frac{1}{x^2+1}$ and $V(x)=\frac12x^2$

$$\int \left( \frac{\frac12x^2}{x^2+1} \right)dx\\ =\int \left( \frac{\frac12x^2}{x^2+1} +\frac{C}{x^2+1} \right)dx-C\arctan(x)\\ =\frac12 \int \left( \frac{x^2}{x^2+1} +\frac{2C}{x^2+1} \right)dx-C\arctan(x)\\ =\frac12 \int \left( \frac{x^2+2C}{x^2+1} \right)dx-C\arctan(x)$$

It's evident that $2C=1$ will make calculations easier, so $C=\frac12$.

But there are not that much cases where it is useful and in all cases it will not make computations possible, just easier. And yes, this is experience, but if you don't use this trick nothing's wrong.

• Experience... Thanks a lot :) Jul 22 '15 at 14:32