Antiderivatives

# Integration by Parts

If a given function to be integrated is in the product form and it cannot be integrated either by reducing the integrand into the standard form or by substitution, we use the following rule known as integration by parts.

Let $u$ and $w$ be the two differential functions of $x$. Then using the product rule of differentiation, we have, $\frac{d}{dx}(uw)=u\frac{dw}{dx}+w\frac{du}{dx}$ $u\frac{dw}{dx}=\frac{d}{dx}(uw)-w\frac{du}{dx}$

Integrating both sides with respect to $x$, we have, $\int\left(u\frac{dw}{dx}\right)dx=\int\left(\frac{d}{dx}(uw)\right)dx-\int\left(w\frac{du}{dx}\right)dx$ $\Rightarrow \int\left(u\frac{dw}{dx}\right)dx=uw-\int\left(w\frac{du}{dx}\right)dx\text{ __(1)}$ Let $\frac{dw}{dx}=v$, then $w=\int vdx$.

Hence, equation $\text{(1)}$ becomes, $\int uv dx=u\int v dx-\int\left(\frac{du}{dx}\int vdx\right)dx$

This is the formula of the integration of the product of two functions and is known as integration by parts. The successfulness of the use of the above formula depends upon the proper choice of the first function. The first function must be chosen such that its derivative reduces to a simple form and second function should be easily integrable.

## Integrate the followings:

### $\int\log xdx$

$\int\log xdx=\int 1.\log xdx$ $=\log x\int 1.dx-\int\left(\frac{d}{dx}(\log x)\int 1.dx\right)dx$ $=\log x.x-\int\frac{1}{x}.xdx$ $=x\log x-\int 1.dx$ $=x\log x-x+C$

### $\int x^n\log(x-1)dx$

$\int x^n\log(x-1)dx$$=\log x\int x^ndx-\int\left(\frac{d}{dx}(\log x)\int x^ndx\right)dx$ $=\log x\frac{x^{n+1}}{n+1}-\int\left(\frac{1}{x}\frac{x^{n+1}}{n+1}\right)dx$ $=\frac{x^{n+1}}{n+1}\log x-\frac{1}{n+1}\int x^ndx$ $=\frac{x^{n+1}}{n+1}\log x-\frac{x^{n+1}}{(n+1)^2}+C$

### $\int xe^xdx$

$\int xe^xdx=x\int e^xdx-\int\left(\frac{d}{dx}(x)\int e^xdx\right)dx$ $=xe^x-\int e^xdx$ $=xe^x-e^x+C$

### $\int x\sin xdx$

$\int x\sin xdx=x\sin xdx-\int\left(\frac{d}{dx}(x)\int \sin xdx\right)dx$ $=-x\cos x-\int\left(-\cos x\right)dx$ $=-x\cos x+\int\cos xdx$ $=-x\cos x+\sin x+C$ $=\sin x-x\cos x+C$

### $\int x\cos nxdx$

$\int x\cos nxdx$$=x\int\cos nxdx-\int\left(\frac{d}{dx}(x)\int\cos nxdx\right)dx$ $=x\frac{\sin nx}{n}-\int\frac{\sin nx}{n}dx$ $=\frac{x}{n}\sin nx-\frac{1}{n}\int\sin nxdx$ $=\frac{x}{n}\sin nx+\frac{1}{n}\frac{\cos nx}{n}+C$ $=\frac{x}{n}\sin nx+\frac{1}{n^2}\cos nx+C$

### $\int x^2\sin xdx$

$\int x^2\sin xdx$$=x^2\int\sin xdx-\int\left(\frac{d}{dx}(x^2)\int\sin xdx\right)dx$ $=-x^2\cos x+\int(2x\cos x)dx$ $=-x^2\cos x+2\int x\cos xdx$ $=-x^2\cos x+2\left[x\int\cos xdx-\int\left(\frac{d}{dx}(x)\int\cos x dx\right)dx\right]$ $=-x^2\cos x+2\left[x\sin x-\int\sin xdx\right]$ $=-x^2\cos x+2\left[x\sin x+\cos x\right]+C$ $=-x^2\cos x+2x\sin x+2\cos x+C$

### $\int x\tan^2nxdx$

$\int x\tan^2nxdx$ $=x\int\tan^2nxdx-\int\left(\frac{d}{dx}(x)\int\tan^2nxdx\right)dx$ $=x\int(\sec^2nx-1)dx-\int\left(\int(sec^2nx-1)dx\right)dx$ $=x\left(\frac{\tan nx}{n}-x\right)-\int\left(\frac{\tan nx}{n}-x\right)dx$ $=\frac{x}{n}\tan nx-x^2-\left(\frac{-\log(\cos nx)}{n^2}-\frac{x^2}{2}\right)+C$ $=\frac{x}{n}\tan nx-x^2+\frac{1}{n^2}\log(\cos nx)+\frac{x^2}{2}+C$ $=\frac{x}{n}\tan nx+\frac{1}{n^2}\log(\cos nx)-\frac{x^2}{2}+C$

### $\int e^x\sin xdx$

$\text{Let }I=\int e^x\sin xdx$ $I=\sin x\int e^xdx-\int\left(\frac{d}{dx}(\sin x)\int e^xdx\right)dx$ $I=\sin xe^x-\int\cos xe^x dx$ $I=e^x\sin x-\left[\cos x\int e^xdx-\int\left(\frac{d}{dx}(\cos x)\int e^xdx\right)dx\right]$ $I=e^x\sin x-\left[\cos xe^x+\int\sin xe^xdx\right]$ $I=e^x\sin x-[e^x\cos x+I]+C$ $I=e^x\sin x-e^x\cos x-I+C$ $2I=e^x(\sin x-\cos x)+C$ $I=\frac{e^x}{2}(\sin x-\cos x)+C$