Integration by parts method.

Literature: Collection of problems in mathematics. Part 1. Edited by A. V. Efimov, B. P. Demidovich.

If $u(x)$ and $v(x)$ are differentiable functions, then the following integration by parts formula holds: $$\int u(x)v'(x)',dx=u(x)v(x)-\int v(x)u'(x)dx,$$

Alternatively, in a concise notation: $$\int u\,dv=uv-\int v\,du.$$

This formula is used in cases where the integrand $f(x)dx$ can be expressed as $u,dv$ such that $v=\int,dv$ can be found and the resulting integral on the right-hand side $\int v,du$ is simpler than the original $\int u,dv$.

Some types of functions that are integrated using the integration by parts method and recommended partitions:

Type I:

$$\int P_n(x)\cos mx\, dx;$$

$$\int P_n(x)\sin nx\, dx;$$

$$\int P_n(x)a^{\alpha x}\,dx,$$

where $P_n(x)$ is a polynomial of degree $n$ in $x:$ $u=P_n(x),$ and $dv$ is everything else.

Type II:

$$\int P_n(x)\ln^mx\, dx;$$

$$\int P_n(x)\arccos x\, dx;$$

$$\int P_n(x)\arcsin x\,dx;$$

$$\int P_n(x)arctg x\, dx;$$

$$\int P_n(x)arcctg x\,dx,$$

where $P_n(x)$ is a polynomial of degree $n$ in $x:$ $dv=P_n(x)dx,$ and $u$ is everything else.

Type III:

$$\int a^{\alpha x}\cos mx\, dx;$$

$$\int a^{\alpha x}\sin nx\,dx:$$

the partition is arbitrary.

It should be noted that for computing the integral, the integration by parts formula can be applied repeatedly.

Examples:

6.124. $\int\arccos x, dx.$

Solution.

$$\int\arccos x\, dx=\left[\begin{array}{lcl}u=\arccos x\Rightarrow du=-\frac{1}{\sqrt{1-x^2}}\,dx\\dv=dx\Rightarrow v=x\end{array}\right]=$$ $$=\arccos x\cdot x-\int x\left(-\frac{1}{\sqrt{1-x^2}}\right)\,dx=x\arccos x+\int\frac{xdx}{\sqrt{1-x^2}}.$$

Let's compute the integral obtained on the right-hand side:

$$\int\frac{xdx}{\sqrt{1-x^2}}=\left[\begin{array}{lcl}1-x^2=t\\ dt=-2x\,dx\Rightarrow x\,dx=\frac{dt}{-2}\end{array}\right]=$$ $$=\int\frac{dt}{-2\sqrt t}=-\frac{1}{2}\int t^{-1/2}\,dt=\frac{1}{2}\frac{t^{1/2}}{1/2}+C=\sqrt{t}+C=\sqrt{1-x^2}+C.$$

Therefore,

$$\int\arccos x\, dx=x\arccos x+\sqrt{1-x^2}+C.$$

Answer: $x\arccos x+\sqrt{1-x^2}+C.$

6.126. $\int x\ln x\, dx.$

Solution.

$$\int x\ln x\, dx=\left[\begin{array}{lcl}u=\ln x\Rightarrow du=\frac{1}{x}\,dx\\dv=xdx\Rightarrow v=\frac{x^2}{2}\end{array}\right]=\ln x\cdot\frac{x^2}{2}-\int \frac{x^2}{2}\frac{1}{x}\,dx=$$ $$=\frac{x^2}{2}\ln x-\frac{1}{2}\int x\,dx=\frac{x^2}{2}\ln x-\frac{x^2}{4}+C.$$

Answer: $\frac{x^2}{4}(2\ln x-1)+C.$

6.129. $\int x^2\sin x\, dx.$

Solution.

$$\int x^2\sin x\, dx=\left[\begin{array}{lcl}u=x^2\Rightarrow du=2x\,dx\\dv=\sin xdx\Rightarrow v=-\cos x\end{array}\right]=$$ $$=-x^2\cos x+2\int \cos x\cdot x\, dx\,dx=\left[\begin{array}{lcl}u=x\Rightarrow du=dx\\dv=\cos x\,dx\Rightarrow v=\sin x\end{array}\right]=$$ $$=-x^2\cos x+2(x\sin x-\int\sin x\,dx)=-x^2\cos x+2x\sin x+2\cos x+C.$$

Answer: $-x^2\cos x+2x\sin x+2\cos x+C.$

6.132.$\int x^3 e^{-x^2}\,dx.$

Solution.

$$\int x^3 e^{-x^2}\, dx=\left[\begin{array}{lcl}u=x^2\Rightarrow du=2x\,dx\\dv=xe^{-x^2}dx\Rightarrow v=\int xe^{-x^2}\,dx\end{array}\right].$$

$$\int xe^{-x^2}\,dx=\left[\begin{array}{lcl}t=-x^2\\dt=-2x\,dx\end{array}\right]=-\frac{1}{2}\int e^{t}dt=-\frac{1}{2}e^{-x^2}+c.$$ Therefore, $$\int x^3 e^{-x^2}\, dx=\left[\begin{array}{lcl}u=x^2\Rightarrow du=2x\,dx\\dv=xe^{-x^2}dx\Rightarrow v=-\frac{1}{2}e^{-x^2}\,dx\end{array}\right]=$$ $$=-\frac{1}{2}x^2e^{-x^2}-\int\left(-\frac{1}{2}e^{-x^2}\right)2x\,dx=-\frac{1}{2}x^2e^{-x^2}+\int xe^{-x^2}\,dx=$$ $$=-\frac{1}{2}x^2e^{-x^2}-\frac{1}{2}e^{-x^2}+C.$$

Answer: $-\frac{1}{2}e^{-x^2}(x^2+1)+C.$

6.135. $\int\frac{x\sin x}{\cos^3 x}\,dx.$

Solution.

$$\int \frac{x\sin x}{\cos ^3 x}\, dx=\left[\begin{array}{lcl}u=x\Rightarrow du=dx\\dv=\frac{\sin x}{\cos^3x}dx\Rightarrow v=\int \frac{\sin x}{\cos^3 x}\,dx\end{array}\right].$$

$$\int \frac{\sin x}{\cos^3 x}\,dx=\left[\begin{array}{lcl}t=\cos x\\dt=-\sin x\,dx\end{array}\right]=-\int \frac{1}{t^3}dt=-\int t^{-3}\,dt=$$ $$=-\frac{t^{-2}}{-2}=\frac{1}{2\cos^2 x}+c.$$

Therefore,

$$\int \frac{x\sin x}{\cos ^3 x}\, dx=\left[\begin{array}{lcl}u=x\Rightarrow du=dx\\dv=\frac{\sin x}{\cos^3x}dx\Rightarrow v=\frac{1}{2\cos^2 x}\end{array}\right]=$$ $$=x\cdot\frac{1}{2\cos^2 x}-\int\frac{1}{2\cos^2 x}\,dx=\frac{x}{2\cos^2 x}-\frac{1}{2}tg x+C.$$

Answer: $\frac{x}{2\cos^2 x}-\frac{1}{2}tg x+C.$

6.136.$\int e^{ax}\cos bx\,dx.$

Solution.

$$\int e^{ax}{\cos bx}\, dx=\left[\begin{array}{lcl}u=\cos bx \Rightarrow du=-b\sin bx\, dx\\dv=e^{ax}dx\Rightarrow v=\frac{1}{a}e^{ax}\end{array}\right]=$$ $$=\cos bx\cdot\frac{1}{a}e^{ax}-\int\frac{1}{a}e^{ax}\cdot (-b\sin bx)\,dx=$$ $$=\frac{\cos bx}{a}e^{ax}+\frac{b}{a}\int e^{ax}\sin bx\, dx=\left[\begin{array}{lcl}u=\sin bx \Rightarrow du=b\cos bx\, dx\\dv=e^{ax}dx\Rightarrow v=\frac{1}{a}e^{ax}\end{array}\right]=$$ $$=\frac{\cos bx}{a}e^{ax}+\frac{b}{a}\left(\sin bx\cdot \frac{1}{a}e^{ax}-\int\frac{1}{a}e^{ax}b\cos bx\,dx\right)=$$ $$=\frac{\cos bx}{a}e^{ax}+\frac{b\sin bx}{a^2}e^{ax}-\frac{b^2}{a^2}\int e^{ax}\cos bx\, dx.$$

Let $\int e^{ax}\cos bx,dx=I.$ Then we'll rewrite the obtained equation as follows:

$$I=\frac{\cos bx}{a}e^{ax}+\frac{b\sin bx}{a^2}e^{ax}-\frac{b^2}{a^2}I.$$ Let's solve this equation for $I:$

$$I+\frac{b^2}{a^2}I=\frac{\cos bx}{a}e^{ax}+\frac{b\sin bx}{a^2}e^{ax}\Rightarrow$$

$$\Rightarrow I\left(1+\frac{b^2}{a^2}\right)=\frac{\cos bx}{a}e^{ax}+\frac{b\sin bx}{a^2}e^{ax}\Rightarrow$$

$$\Rightarrow I=\frac{\frac{\cos bx}{a}e^{ax}+\frac{b\sin bx}{a^2}e^{ax}}{1+\frac{b^2}{a^2}}=\frac{\frac{e^{ax}}{a^2}(a\cos bx+b\sin bx)}{\frac{a^2+b^2}{a^2}}=$$ $$=\frac{e^{ax}(a\cos bx+b\sin bx)}{a^2+b^2}.$$

Answer: $\frac{e^{ax}(a\cos bx+b\sin bx)}{a^2+b^2}+C.$

6.143.$\int\cos(\ln x)\,dx.$

Solution.

$$\int \cos(\ln x)\, dx=\left[\begin{array}{lcl}u=\cos(\ln x) \Rightarrow du=-\frac{1}{x}\sin(\ln x)\, dx\\dv=dx\Rightarrow v=x\end{array}\right]=$$ $$=\cos(\ln x)x-\int x\cdot\left(-\frac{1}{x}\sin(\ln x)\right)\,dx=x\cos(\ln x)+\int\sin(\ln x)\,dx.$$

$$\int \sin(\ln x)\, dx=\left[\begin{array}{lcl}u=\sin(\ln x) \Rightarrow du=\frac{1}{x}\cos(\ln x)\, dx\\dv=dx\Rightarrow v=x\end{array}\right]=$$ $$=\sin(\ln x)x-\int x\cdot\left(\frac{1}{x}\cos(\ln x)\right)\,dx=x\sin(\ln x)-\int\cos(\ln x)\,dx.$$

Thus, $$\int\cos(\ln x)\,dx=x\cos(\ln x)+x\sin(\ln x)-\int\cos(\ln x)\, dx.$$

Let $\int\cos(\ln x), dx=I.$ Then we'll write and solve the equation:

$$I=x\cos(\ln x)+x\sin(\ln x)-I\Rightarrow$$ $$\Rightarrow 2I=x\cos(\ln x)+x\sin(\ln x)\Rightarrow$$ $$\Rightarrow I=\frac{1}{2}(x\cos(\ln x)+x\sin(\ln x).$$

Answer: $\frac{1}{2}(x\cos(\ln x)+x\sin(\ln x))+C.$

Homework.

6.125. $\int x\cos x\, dx.$

6.127. $\int\frac{\ln x}{\sqrt[3]{x}}\, dx.$

6.130. $\int x^2 e^{-x}\, dx.$

6.133. $\int\frac{\ln^2 x}{x^2}\, dx.$

6.134. $\int x arctg x\, dx.$

6.138. $\int\ln(x+\sqrt{1+x^2})\,dx.$

6.139. $\int x^3\ln x\, dx.$

6.141. $\int(x^2-2x+3)\cos x\, dx.$