3

I'm trying to solve this indefinite integral using the integration by parts $$ \int e^{-x} \sin(x) \,dx$$

but I'm stuck on the second iteration, which takes me to:

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

Given the integration by parts formula of $\int u\,dv = uv - \int v\,du$
Which I applied twice, once with $u=\sin(x)$ and $du=e^{-x}$, and once with $u=\cos(x)$ and $du=e^{-x}$.

At this point my only guess was to simplify, having as result:

$$1 = -e^{-x} \sin(x) -e^{-x} \cos(x)-1$$

$$ = -e^{-x} (\sin(x) + \cos(x) + 2) $$

Which however appears to be wrong, since the correct answer should be:

$$ -\frac{1}{2} e^{-x} (\cos(x) + \sin(x))$$

Thanks in advance for your help

Bernard
  • 175,478
Snailer
  • 33
  • That "1" should be an "I" (the letter I,representing the integral to be found). – David Mitra Jul 04 '18 at 16:57
  • Should this allow me to solve it, anyway? – Snailer Jul 04 '18 at 17:00
  • 1
    You seem to have omitted the infinitesimal part of the indefinite integral in the first few lines. Also, an indefinite integral should at the end have a constant $+C$ of integration, right? – hardmath Jul 04 '18 at 17:03
  • $$\text{If } \int e^{-x} \sin(x) ,dx = -e^{-x} \sin(x) -e^{-x} \cos(x)-\int e^{-x}\sin(x) ,dx$$ $$\text{then adding } \int e^{-x}\sin x,dx \text{ to both sides of that yields} $$ $$2\int e^{-x} \sin(x) ,dx = -e^{-x} \sin(x) -e^{-x} \cos(x) + \text{constant}.$$ – Michael Hardy Jul 04 '18 at 17:08

5 Answers5

2

I'm not sure what led you to suspect that $\int e^{-x}\sin x\,dx=1.$ Probably, as David points out in the comments, you were attempting to mimic an approach you'd seen before, but had thought the stand-in $I$ was a $1,$ instead. Also, there should always be something on both sides of an equation, so even if $\int e^{-x}\sin x\,dx=1$ were true, then you'd have $$0=-e^{-x}\sin x-e^{-x}\cos x-2,$$ or $$0=-e^{-x}(\sin x+\cos x)-2.$$ Do you see the differences between this and your last equation, and why this is "correct" under your misunderstanding?

A lot of times, as a space- and time-saving measure, we'll represent integrals as $I$ or $J$ while integrating by parts. We don't even need a stand-in, though, to solve it. Adding $\int e^{-x}\sin x\,dx$ to both sides of your equation, you get $$2\int e^{-x}\sin x\,dx=-e^{-x}\sin x-e^{-x}\cos x.$$ Pulling out the common factor of $-e^{-x}$ on the right-hand side, then multiplying both sides by $\frac12,$ we're done.

Cameron Buie
  • 102,994
  • That was so easy that I'm actually feeling sorry for having asked it – Snailer Jul 04 '18 at 17:03
  • We all miss the "obvious" sometimes. Welcome to math.SE! If my answer is satisfactory, you can "accept" it by clicking the check mark. This gives us both reputation, and signals to other users that the question has been satisfactorily resolved. – Cameron Buie Jul 04 '18 at 17:07
  • This question has several good answers about integration by parts. Some of them even address the "stand-in" idea. – Cameron Buie Jul 04 '18 at 17:20
2

A cool solution, although not necessarily one that answers your question directly, that I came across while in high school was the following one that uses complex numbers.

$$ I=\int{e^{-x}sinx}\mbox{ }dx\\J=\int{e^{-x}cosx\mbox{ }}dx $$

Now we have that: $$ J + iI = \int{e^{-x}\cdot e^{ix}\mbox{ }}dx = \int{e^{x(i-1)}}dx = \frac{e^{x(i-1)}}{i-1} $$

And now we find that $$ \mathcal{Im}\left(\frac{e^{x(i-1)}}{i-1}\right) = I $$

Hence $I = -\frac{1}{2}e^{-x}(\cos x + \sin x)$

1

You can obtain the result with a careful double integration by parts, but the simplest way is to use complex exponential. Indeed $$\mathrm e^{-x}\sin x=\operatorname{Im}(\mathrm e^{-x}\mathrm e^{ix})=\mathrm e^{(-1+i)x},$$ so that, as $$\int \mathrm e^{(-1+i)x}\,\mathrm d x=\frac{\mathrm e^{(-1+i)x}}{-1+i}=-\frac{1+i}{2}\mathrm e^{-x}\mathrm e^{ix},$$ we obtain the required integral (and the integral of $\mathrm e^{-x}\cos x$ for the same price…): \begin{align}\int \mathrm e^{-x}\sin x\,\mathrm d x&=-\frac12\mathrm e^{-x}(\cos x+\sin x),\\ \int \mathrm e^{-x}\cos x\,\mathrm d x&=\frac12\mathrm e^{-x}(\cos x-\sin x). \end{align}

Bernard
  • 175,478
1

but I'm stuck on the second iteration, which takes me to:

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

Use algebra. Add the integral to both sides and divide by 2.

John
  • 191
0

To calculate $\int{e^{-x}\sin{(x)}dx}$ by parts you can choose either exponential or trigonometric function
to integrate but in the second integration you should make the same choice as
you did in the first integration
After second integration by parts you should have integral yo want to calculate on both sides of the equation and all you need to do is add constant multiple of this integral to the both sides of the equation and divide by the constant in front of integral on the left hand side of the equation
And don't forget +C

J Doe
  • 47
  • 6