Integrate $\int x e^{x} \sin x dx$

11.2k Views Asked by At

Evaluate:

$$\int x e^{x} \sin x dx$$

Have you ever come across such an integral? I have no idea how to start with the calculation.

6

There are 6 best solutions below

1
On BEST ANSWER

Solution without complex numbers:

Let $I=\int e^x x\sin xdx$ Integrating by parts:

$$I=e^x x\sin x-\int e^x x\cos xdx-\int e^x\sin xdx$$

Then one more time by parts:

$$\int e^x x\cos xdx=e^x x\cos x + I-\int e^x\cos xdx$$

So:

$$2I=e^x x\sin x-e^x x\cos x+\int e^x(\cos x-\sin x)dx$$

Now (by parts again or by direct observation):

$$\int e^x(\cos x-\sin x)dx=e^x \cos x$$

So:

$$I=\frac{e^x x\sin x-e^x x\cos x+e^x \cos x}{2}$$

8
On

If one may recall that $\sin(x)=\Im e^{ix}$, then

$$\int x\sin(x)e^x\ dx=\Im\int xe^{(1+i)x}\ dx$$

With a quick integration by parts, we have

$$=\Im\left(\frac1{1+i}xe^{(1+i)x}-\frac1{1+i}\int e^{(1+i)x}\ dx\right)\\=\Im\left(\frac1{1+i}xe^{(1+i)x}-\frac1{(1+i)^2}e^{(1+i)x}+C\right)\\=\frac12\left(x\sin(x)e^x-x\cos(x)e^x+\cos(x)e^x\right)$$

0
On

HINTS:

Use Euler's Formula to write $$x\sin(x)e^x=\text{Im}(xe^{(1+i)x})$$Integrate $\int xe^{(1+i)x}\,dx$ by parts with $u=x$ and $v=\frac{e^{(1+i)x}}{1+i}$ and finish by taking the imaginary part.

0
On

First integrate $\sin(x) \exp(x),$ by parts, with the exponential as $d v.$ (you will need to do the integration by parts twice), then use the same method for the original integral.

0
On

This solution doesn't use integration by parts. We start with

$$\int\exp(x) dx = \exp(x)$$

Substituting $x = \lambda t$ yields:

$$\int\exp(\lambda t) dt = \frac{\exp(\lambda t)}{\lambda}$$

Substitute $\lambda = 1+\epsilon + i$ and expand both sides to first order in $\epsilon$. Equating the coefficient of $\epsilon$ of both sides yields:

$$\begin{split}\int t\exp(t)\exp(i t) dt &= \exp(t)\exp(it)\left[\frac{1-i}{2}t + \frac{i}{2}\right]\\ & = \exp(t)\left[\frac{\exp(i(t-\frac{\pi}{4}))}{\sqrt{2}}t + \frac{\exp(i(t+\frac{\pi}{2}))}{2}\right] \end{split} $$

Finally, take the imaginary part of both sides:

$$\int t\exp(t)\sin(t) dt = \exp(t)\left[\frac{\sin\left(t-\frac{\pi}{4}\right)}{\sqrt{2}}t + \frac{\cos(t)}{2}\right]$$

0
On

By indeterminate coefficients:

A term like $xe^x\sin x$ can be generated by the derivative of itself (due to $e^x$), which will also generate $xe^x\cos x$ and $e^x\sin x$.

Then we are tempted to try

$$f(x)=e^x(x(A\sin x+B\cos x)+(C\sin x+D\cos x)),$$

and

$$f'(x)=e^x(x(A\sin x+B\cos x)+(C\sin x+D\cos x)+(A\sin x+B\cos x)+x(A\cos x-B\sin x)+(C\cos x-D\sin x)).$$

We identify,

$$A-B=1,\\A+B=0,\\C+A-D=0,\\D+B+C=0$$

and obtain

$$\frac12xe^x(\sin x-\cos x)+\frac12\cos x.$$