Integrating $xe^{x} \cos x$

2.1k Views Asked by At

Please help me to integrate the following function. I'm unsure of following a particular method .

$$xe^{x}\cos x $$

3

There are 3 best solutions below

1
On

use integral by part and get $$u=x$$ and $$ dv=e^{x}cosx$$ for finding v use integral by part again

0
On

setting $$f=x$$ and $$dg=e^x\cos(x)dx$$ then we get $$df=1$$ and $$g=\frac{1}{2}e^x(\sin(x)+\cos(x)$$ and we get $$\frac{1}{2}e^xx\left(\sin(x)+\cos(x)\right)-\frac{1}{2}\int e^x\sin(x)dx-\frac{1}{2}\int e^x\cos(x)dx$$

0
On

Consider $$ \int xe^x(\cos x+i\sin x)\,dx=\int xe^{(1+i)x}\,dx $$ With the substitution $t=(1+i)x$, this becomes $$ \frac{1}{(1+i)^2}\int te^t\,dt=\frac{1}{(1+i)^2}e^t(t-1)= -\frac{1}{2}ie^x(\cos x+i\sin x)(x-1+ix) $$ (the antiderivative of $te^t$ is an easy integration by parts). Now compute the real part: disregarding $\frac{1}{2}e^x$, we have $$ (\sin x-i\cos x)(x-1+ix)=(x-1)\sin x+x\cos x+i(x\sin x-(x-1)\cos x) $$ Final answer: $$ \int xe^x\cos x=\frac{e^x}{2}(x\sin x+x\cos x-\sin x)+c $$ and also $$ \int xe^x\sin x=\frac{e^x}{2}(x\sin x-x\cos x+\cos x)+c $$