# Integration by parts | Solution with procedure

Here you will see how to solve these integrals https://atomic-temporary-167386734.wpcomstaging.com/integration-by-parts-exercises/ and check if you got them right!

$\int&space;x\sin(x)dx$ $u=x\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;dv=\sin(x)dx$ $du=dx\;&space;\;&space;\;&space;\;&space;\;&space;\;&space;v=-\cos(x)$
$\int&space;x\sin(x)dx=-x\cos(x)+\sin(x)+C$ $\int&space;x\ln(x)dx$ $u=\ln(x)\;\;\;\;\;&space;dv=xdx$ $du=\frac{1}{x}dx\;\;\;\;\;&space;v=\frac{1}{2}x^2$ $\frac{1}{2}x^2\ln\left&space;|&space;x&space;\right&space;|-\frac{1}{2}\int&space;xdx=\frac{1}{2}x^2\ln\left&space;|&space;x&space;\right&space;|-\frac{1}{4}x^2+C=\frac{1}{2}x^2\left&space;(&space;\ln\left&space;|&space;x&space;\right&space;|-\frac{1}{2}&space;\right&space;)+C$
$\int&space;xe^xdx$ $u=x\;\;\;\;\;&space;dv=e^xdx$ $du=dx\;\;\;\;\;&space;v=e^x$ $xe^x-\int&space;e^xdx=xe^x-e^x=e^x(x-1)+C$ $\int&space;\frac{1}{2}x^2e^xdx=\frac{1}{2}\int&space;x^2e^xdx$ $u=x^2\;\;\;\;\;&space;dv=e^xdx$ $du=2x\,dx\;\;\;\;\;&space;v=e^x$ $\frac{1}{2}x^2e^x-\frac{1}{2}\int2xe^xdx=\frac{1}{2}x^2e^x-\int&space;xe^xdx$ $\frac{1}{2}x^2e^x-\int&space;xe^xdx=\frac{1}{2}x^2e^x-e^x(x-1)=e^x\left&space;(&space;\frac{1}{2}x^2-x+1\right&space;)+C$
$\int&space;\ln(x)dx$ $u=\ln(x)\;\;\;\;dv=dx$ $du=\frac{1}{x}dx\;\;\;\;v=x$ $x\ln(x)-\int&space;dx=x\ln(x)-x=x(\ln\left&space;|&space;x&space;\right&space;|-1)+C$
$\int&space;\ln^2(x)dx=\int&space;\ln(x)\ln(x)dx$ $u=\ln(x)\;\;\;\;\;dv=\ln(x)dx$ $du=\frac{1}{x}dx\;\;\;\;\;v=x(\ln(x)-1)$ $x(\ln(x)-1)\ln(x)-\int&space;(\ln(x)-1)dx=x\ln^2(x)-x\ln(x)+x-\int&space;\ln(x)dx=$ $x\ln^2(x)-x\ln(x)+x-x(\ln(x)-1)=x(\ln^2(x)-2\ln(x)+2)+C$
$\int&space;\sin(x)\cos(x)dx$ $u=\sin(x)\;\;\;\;\;dv=\cos(x)dx$ $du=\cos(x)\;\;\;\;\;v=\sin(x)$ $\sin^2(x)-\int&space;\sin(x)\cos(x)dx$

Wait… we have the integral of sin(x)cos(x) again! So this means that

$\int&space;\sin(x)\cos(x)dx=\sin^2(x)-\int&space;\sin(x)\cos(x)dx$

and

$2\int&space;\sin(x)\cos(x)dx=\sin^2(x)\rightarrow&space;\int&space;\sin(x)\cos(x)dx=\frac{1}{2}\sin^2(x)+C$

Easy, right?

$\int&space;e^x\cos(x)dx$ $u=e^x\;\;\;\;\;dv=\cos(x)dx$ $du=e^xdx\;\;\;\;\;v=\sin(x)$ $e^x\sin(x)-\int&space;e^x\sin(x)dx$ $\int&space;e^x\sin(x)dx$

Let’s solve this integral by performing another integration by parts.

$u=e^x\;\;\;\;\;dv=\sin(x)dx$ $du=e^xdx\;\;\;\;\;v=-\cos(x)$ $\int&space;e^x\sin(x)dx=-e^x\cos(x)+\int&space;e^x\cos(x)dx$

so we have

$\int&space;e^x\cos(x)dx=e^x\sin(x)+e^x\cos(x)-\int&space;e^x\cos(x)dx$

We can do the same thing we did for the integral of sin(x)cos(x).

$2\int&space;e^x\cos(x)dx=e^x\sin(x)+e^x\cos(x)=e^x(\sin(x)+\cos(x))$

Therefore,

$\int&space;e^x\cos(x)dx=\frac{1}{2}e^x(\sin(x)+\cos(x))+C$
$\int&space;e^x\sin(x)dx$

We now know that this is equal to

$-e^x\cos(x)+\int&space;e^x\cos(x)dx$

which is equal to

$-e^x\cos(x)+\frac{1}{2}e^x(\sin(x)+\cos(x))=e^x\left&space;(&space;-\cos(x)+\frac{1}{2}\sin(x)+&space;\frac{1}{2}\cos(x)\right&space;)=$ $\frac{1}{2}e^x(\sin(x)-\cos(x))$

$\int&space;e^x\sin(x)dx=\frac{1}{2}e^x(\sin(x)-\cos(x))+C$
$\int&space;\frac{\ln(x)}{x}dx=\int&space;\ln(x)\frac{1}{x}dx$ $u=\ln(x)\;\;\;\;\;dv=\frac{1}{x}dx$ $du=\frac{1}{x}dx\;\;\;\;\;v=\ln(x)$ $\ln^2(x)-\int&space;\frac{\ln(x)}{x}dx$

Same thing here;

$2\int&space;\frac{\ln(x)}{x}dx=\ln^2(x)$ $\int&space;\frac{\ln(x)}{x}dx=\frac{1}{2}\ln^2(x)+C$

And that’s it! Stay tuned for more integrals. You might find these links useful:

Support my site!

I put all of my efforts to make this site as good as possible. If you would like, you can help my site grow with a small donation! I would really appreciate it.

\$1.00

This site uses Akismet to reduce spam. Learn how your comment data is processed.