# How do I solve this integral? $\int e^{-t/2}\sin(3t) dt$? [duplicate]

I might have missed a technique from Calc 2, but this integral is holding me up. When I checked with WolframAlpha, it used a formula I didn't recognise.

How do I solve $\int e^{-t/2}\sin(3t) dt$?

The formula WolframAlpha uses is this:

$$\int e^{\alpha t}\sin(\beta t)dt=\frac{e^{\alpha t}(-\beta \cos(\beta t)+\alpha \sin(\beta t)}{\alpha ^2+\beta ^2}$$

I don't know where this formula comes from.

-

## marked as duplicate by Pedro Tamaroff♦, DonAntonio, William, Sasha, ArgonSep 14 '12 at 21:23

I have answered this before. Let me search. – Pedro Tamaroff Sep 14 '12 at 16:48
Try integrating by parts twice? – Dilip Sarwate Sep 14 '12 at 16:52
@PeterTamaroff Reading that, I see that the question is not a duplicate, but indeed you did answer this question there (where it was not asked). – rschwieb Sep 14 '12 at 20:49

The trick is to integrate by parts twice, and note that you have "cycled" back to the start". Here's a simpler example, which you can mimic to solve your problem:

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

Looking at the first part and the last part and solving for $\int e^x\sin x\,dx$ you get the answer:

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

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

Your problem will be slightly more difficult because it contains coefficients in the exponential and trig function. If you are careful and apply the chain rule correctly and carefully, you will have no problem.

-
The OP is asking for the general case which is a little trickier. – Pedro Tamaroff Sep 14 '12 at 16:54
@PeterTamaroff Yes, that is what I said in the solution. I wrote it as a hint to mimic. Pedagogically this is a little better than just handing over the answer. – rschwieb Sep 14 '12 at 16:57

In general, if you want to find $$\int e^{ax}\cdot \sin{bx}\cdot dx$$ you can argue as follows:

Note that for any $\alpha$ or $\beta$, you have

\eqalign{ & \frac{d}{{dx}}\left( {{e^{\alpha x}}\sin \beta x} \right) = \alpha {e^{\alpha x}}\sin \beta x + \beta {e^{\alpha x}}\cos \beta x \cr & \frac{d}{{dx}}\left( {{e^{\alpha x}}\cos \beta x} \right) = \alpha {e^{\alpha x}}\cos \beta x - \beta {e^{\alpha x}}\sin \beta x \cr}

so that any integral of the form

$$\int e^{\alpha x}\cdot \sin{\beta x}\cdot dx$$

is a linear combination of the former functions. Let's then find $c_1$ and $c_2$ such that

$$\frac{d}{{dx}}\left( {{c_1}{e^{\alpha x}}\sin \beta x + {c_2}{e^{\alpha x}}\cos \beta x} \right) = {e^{\alpha x}}\sin \beta x$$

$${c_1}\alpha {e^{\alpha x}}\sin \beta x + {c_1}\beta {e^{\alpha x}}\cos \beta x + {c_2}\alpha {e^{\alpha x}}\cos \beta x - {c_2}\beta {e^{\alpha x}}\sin \beta x = {e^{\alpha x}}\sin \beta x$$

This means we need

\eqalign{ & {c_1}\alpha - {c_2}\beta = 1 \cr & {c_1}\beta + {c_2}\alpha = 0 \cr}

This will yield with little work

\eqalign{ & {c_1} = \frac{\alpha }{{{\alpha ^2} + {\beta ^2}}} \cr & {c_2} = - \frac{\beta }{{{\alpha ^2} + {\beta ^2}}} \cr}

which means that, in general:

$$\int {{e^{\alpha x}}} \cdot\sin \beta x\cdot dx = {e^{\alpha x}}\frac{{\alpha \sin \beta x - \beta \cos \beta x}}{{{\alpha ^2} + {\beta ^2}}} + C$$

Analogously, you will get that

$$\int {{e^{\alpha x}}} \cdot\cos \beta x\cdot dx = {e^{\alpha x}}\frac{{\alpha \cos \beta x + \beta \sin \beta x}}{{{\alpha ^2} + {\beta ^2}}} + C$$

This is the same as here but the system won't let me link.

-
Interesting alternative, although it doesn't seem to generalize to other situations. – rschwieb Sep 14 '12 at 20:52
@rschwieb Generalize to other situations? What do you mean? It is true the solution is motivated by the "closed" nature of the integral, I mean the part when I say "so that any integral of the form..." – Pedro Tamaroff Sep 14 '12 at 23:06