6

I'm trying to solve the integral of $\left(\int e^x\,\sin x\,\,dx\right)$ (My solution):

$\int e^x\sin\left(x\right)\,\,dx=$

$\int \sin\left(x\right) \,e^x\,\,dx=$

$\left(\sin(x)\,\int e^x\right)-\left(\int\sin^{'}(x)\,\left(\int e^x\right)\right)$

$\left(\sin(x)\,e^x\right)-\left(\int\cos(x)\,e^x\right)$

$\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(\int-\sin\left(x\right)\,e^x\right)\right)$

$\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(-\sin\left(x\right)\,e^x-\int-\cos\left(x\right)\,e^x\right)\right)$

I don't know how to complete because the solution gonna be very complicated.

  • 2
    See the accepted answer here: http://math.stackexchange.com/questions/159115/evaluating-int-0-frac-pi2-ex2-sinx-dx – Amzoti Jul 07 '13 at 21:55
  • 3
    Put I=$\int e^x,\sin x,dx$, you'll obtain an equation in $I$. Solve it, you'll find $I=\frac{1}{2}e^x\left(\sin x-\cos x\right)$ – user5402 Jul 07 '13 at 21:55
  • 3
    Look at your next to last line, and call the integral you are looking for $I$. The line says $I=\text{stuff} -I$. So $2I=\text{stuff}$ and it's over. – André Nicolas Jul 07 '13 at 21:57
  • @AndréNicolas I'd have written my answer like that if I had had the creativity. – Git Gud Jul 07 '13 at 22:00

5 Answers5

8

Notice that you got

$$\begin{align}\int e^x\sin (x) \, dx=&\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(\int-\sin\left(x\right)\,e^x\,dx\right)\right)\\=&\sin(x)\,e^x-\left(\cos(x)\,e^x+\int\sin\left(x\right)e^x\,dx\right)\\=&e^x\sin (x)-e^x\cos(x)-\int e^x\sin(x)\, dx\end{align}$$

This implies $\displaystyle \int e^x\sin (x) \, dx+\int e^x\sin (x) \, dx=e^x(\sin(x)-\cos(x))$.

Conclude.

Git Gud
  • 31,356
7

Denote $B=\int e^x\sin\left(x\right)\,\,dx$ and $A=\int e^x\cos\left(x\right)\,\,dx$. Then consider $I=A+iB$. The integral you are looking for is the imaginary part of $I$. So you have $I=\int e^x(\cos\left(x\right)+i\sin\left(x\right))\,\,dx=\int e^x\cdot e^{ix}\,\,dx=\int e^{x(1+i)}\,\,dx=\frac{1}{1+i}e^{x(1+i)}+C$. The imaginary part of $\frac{1}{1+i}e^{x(1+i)}+C=\frac{1}{2}e^x(1-i)(\cos(x)+i\sin(x))+C$ is exactly $\frac{1}{2}e^x(\sin(x)-\cos(x))+C$.

4

Hint

$$\sin x =\mathrm{Im}(e^{ix})$$

  • Neat. I haven't done too much with complex numbers, so it took me a bit to realize that the key to this approach is that $e^x$ is real. – dfeuer Jul 07 '13 at 22:03
3

You’re fine down through the fifth line, apart from the missing $dx$’s, which at this level I consider essential:

$$\int e^x\sin x\,dx=e^x\sin x-\left(e^x\cos x-\int(-\sin x)e^x\,dx\right)\;.$$

Now just expand the righthand side,

$$\int e^x\sin x\,dx=e^x\sin x-e^x\cos x-\int e^x\sin x\,dx\;,$$

and combine the terms containing the integral:

$$2\int e^x\sin x\,dx=e^x\sin x-e^x\cos x\;.$$

Now solve, not forgetting to insert a constant of integration:

$$\int e^x\sin x\,dx=\frac12e^x(\sin x-\cos x)+C\;.$$

This technique of doing two integrations by parts and then solving for the integral crops up rather often.

Brian M. Scott
  • 616,228
0

Another way via leibniz theorem,

$$ \frac{d^4 (e^x \sin x)}{dx^4} =e^x \left[\binom{4}{0} \sin x+ \binom{4}{1} \cos x - \binom{4}{2} \sin x - \binom{4}{3} \cos x+ \binom{4}{4} \sin x\right]$$

Or,

$$ \frac{1}{ \sum_{k=0}^2 \binom{4}{2k} } \frac{d^4 (e^x \sin x)}{dx^4} = e^x \sin x$$

Integrate both sides and apply leibniz for third derivative again,

$$ \int e^x \sin x dx = \frac{1}{ \sum_{k=0}^2 (-1)^k \binom{4}{2k} } \int \frac{d^4 (e^x \sin x)}{dx^4} dx=e^x \frac{\sum_{j=0}^3 \binom{3}{j} \sin( x + j \frac{\pi}{2})}{ \sum_{k=0}^2 (-1)^k \binom{4}{2k} } $$

Since,

$$ \frac{d^i}{dx^i} \sin x = \sin( x +i \frac{\pi}{2} )$$