Short and Sweet Calculus

## 5.4 Integration by Parts

A powerful technique of integration is integration by parts, which hangs on the formula for differential of a product. Let $$u$$ and $$v$$ be two functions of $$x$$. Then $d(uv)=udv+vdu\quad\Rightarrow\quad udv=d(uv)-vdu.$ Integrating both sides, we have $\int udv=\int d(uv)+\int vdu.$ Since $$\int d(uv)=uv+C$$, we get $\boxed{\int udv=uv-\int vdu.\tag{a}}$ Because we have to add a constant when we integrate $$\int vdu$$, we can ignore the constant of integration $$C$$ when we integrate $$\int d(uv)$$.

When we choose substitutions for $$u$$ and $$v$$, we usually want $$dv$$ to be an expression that can be easily integrated and $$u$$ to be a function that has a simple derivative.

Example 5.8. Evaluate $${\displaystyle \int x\sin xdx}$$.

Solution

Let $u=x\Rightarrow du=dx$ $dv=\sin xdx\Rightarrow v=-\cos x+C_{1}\tag{*}$ \begin{aligned} \therefore\int x\sin xdx & =\underbrace{-x(\cos x+C_{1})}_{uv}-\int\underbrace{(-\cos x+C_{1})dx}_{vdu}\\ & =-x\cos x-C_{1}x+\sin x+C_{1}x+C\\ & =-x\cos x+\sin x+C.\end{aligned}

• In the above example, we see that the first constant of integration $$C_{1}$$ does not appear in the final result. We can prove that this is, in general, true and we do not need to write $$C_{1}$$ when finding $$v$$ from $$dv$$. Suppose we write $$v+C_{1}$$ in place of $$v$$ in formula (a). Then we have \begin{aligned} \int udv & =u(v+C_{1})-\int(v+C_{1})du\\ & =uv+C_{1}u-C_{1}u-\int vdu\\ & =uv-\int vdu.\end{aligned} So in the following examples, we will not write the constant of the integral $$\int d(uv)$$.

Example 5.9. Evaluate $${\displaystyle \int\ln xdx}.$$

Solution

Obviously we cannot put $$u=1$$ and $$dv=\ln xdx$$ because we do not know how to find $$v$$ in this case. So we have to put $$u=\ln x$$ and $$dv=dx$$ $u=\ln x\Rightarrow du=\frac{1}{x}dx$ $dv=dx\Rightarrow v=x$ \begin{aligned} \therefore\int\ln xdx & =x\ln x-\int x\frac{1}{x}dx\\ & =x\ln x-x+C.\end{aligned}

Example 5.10. Evaluate $${\displaystyle \int x\ln xdx}.$$

Solution

Method 1: Let $$u=\ln x$$ and $$dv=xdx$$. Then $u=\ln x\Rightarrow du=\frac{dx}{x},$ $dv=xdx\Rightarrow v=\frac{1}{2}x^{2}.$ \begin{aligned} \therefore\int x\ln xdx & =\frac{1}{2}x^{2}\ln x-\int\frac{1}{2}x^{2}\frac{dx}{x}\\ & =\frac{1}{2}x^{2}\ln x-\frac{1}{4}x^{2}+C.\end{aligned} Method 2: Let $$u=x$$ and $$dv=\ln xdx$$. Then $u=x\Rightarrow du=dx$ $dv=\ln xdx\Rightarrow v=x\ln x-x\qquad\text{(from the previous example)}$ \begin{aligned} \therefore\int x\ln xdx & =x(x\ln x-x)-\int(x\ln x-x)dx\\ & =x^{2}\ln x-x^{2}-\int x\ln xdx+\int xdx\end{aligned} $\Rightarrow2\int x\ln xdx=x^{2}\ln x-x^{2}+\frac{1}{2}x^{2}+C’$ Finally $\int x\ln xdx=\frac{1}{2}x^{2}\ln x-\frac{1}{4}x^{2}+C’.$ Obviously the first method is easier, as in the second method we need to use integration by parts twice.