# Integral of $\int e^{2x} \sin 3x\, dx$

I am suppose to use integration by parts but I have no idea what to do for this problem $$\int e^{2x} \sin3x dx$$

$u = \sin3x dx$ $du = 3\cos3x$

$dv = e^{2x}$ $v = \frac{ e^{2x}}{2}$

From this I get something really weird that makes it just as complicated

$\frac{e^{2x}\sin3x}{2} - \int \frac{e^{2x}}{2}3\cos2x$

This looks like it will again require integration by parts which from what I saw will require the same again, and it does not help solve the problem.

Another problem I am having is that I do not know what the dx in $u = \sin3x dx$ means. I know it is suppose to be the shorthand representation for the derivative with repsect to x I think but I am not sure when and why it goes away, basically I have just memorized that it dissapears and it not important in the answer so I can ignore it for the most part. It turns into a 1 pretty much.

-
Call your integral $I$. Integrate by parts twice and you'll get $I=$some stuff$+$(constant)$\cdot I$. Now you have an equation. Solve it for $I$. –  David Mitra May 29 '12 at 23:29
Note: the expression for $u$ should not contain $dx$, because $u$ is not a differential; your expressions for $dv$ and for $du$ should, because they are differentials. And the integral you get after applying Integration by Parts should have the $dx$ in it. –  Arturo Magidin May 29 '12 at 23:32
Note to solvers: The $e^{ix} stuff is lovely, but first year calculus it isn't. – André Nicolas May 30 '12 at 0:16 @David I am not seeing this when I do the problem, it just seems to be an infinite loop. – Jordan May 30 '12 at 9:53 possible duplicate of Finding$\int e^{2x} \sin{4x} \, dx$– Jonas Meyer Jun 8 '12 at 17:46 show 1 more comment ## 6 Answers You're correct. The integral does indeed require integration by parts. But, it's a little trick. You have to use the method twice, each time using what you consider the differentiated term the trig one or exp it doesn't matter as long as you're consistent. Here's the sketch of the idea. I'll do it in the general case. $$\int e^{ax}\sin(bx)dx=\frac{1}{a}e^{ax}\sin(bx)-\frac{1}{a}\int be^{ax}\cos(bx)dx$$ Now, we do it again. $$\frac{b}{a} \int e^{ax}\cos(bx)dx=\frac{b}{a}\left(\frac{b}{a^2}e^{ax}\cos(x)-\frac{b^2}{a^2}\int e^{ax}[-\sin(bx)]\right)dx= \dots$$ Now, you take it from here, noticing that that last integral is your original one (with a negative). Set$\displaystyle I=\int e^{ax}\sin(bx)dx$, and solve for$I$after substituting the above expression into the original one. - It most certainly does not require integration by parts. – mrf May 30 '12 at 0:11 @mrf While it does not require by parts, for Jordan's intro calc course, I would restrict the answers to that. You have to keep the OP's level of math in mind when writing answers. Also, the first line in the OP suggests he should only be using integration by parts. – Joe May 30 '12 at 1:24 That's exactly what I meant by that. – Chris Dugale May 30 '12 at 4:51 @JoeL. Absolutely, I would also have given the integration by parts solution since that's what the OP asked for, but it is still misleading to say that it is required. – mrf May 30 '12 at 6:37 I keep getting an infinite loop of integrals and I do not know what to do. – Jordan May 30 '12 at 9:59 show 4 more comments Since you reposted this, I will go ahead and add in an anwer, here, that will hopefully give you a better sense of what is going on. Iterated (repeated) integration by parts does the trick, but first, I want to address your question regarding the differential operator. Now, if I wrote (say) that$\frac{dv}{dx}=x^2$, it means that$v$is some function in the single variable$x$with derivative$x^2$. That means that $$v=\int\,dv=\int\frac{dv}{dx}\,dx=\int x^2dx.$$ In a sense, we are treating$\frac{dv}{dx}$just like a fraction when we "cancel" the$dx$terms for the middle equality, so this suggests that in a way, we may treat$dv$and$dx$as separate entities, and$d$just means "derivative". However, we must be careful about this. Consider the following example: If we let$y=2x$, then$\frac{dy}{dx}=2$, and so$dy=2dx$. It is tempting when starting out to say$dy=d(2x)=2$, since we're used to thinking "the derivative of$2x$is$2$". But hold on...that's the derivative with respect to$x$. There is a difference between$\frac{d}{dx}$and just$d$, in that$d$treats everything like a function of one variable, so we have to remember the chain rule! For example, suppose we had$x=\sin t$. Well, in that case, we'd have$y=2\sin t$, so then$\frac{dy}{dt}=2\cos t=2\frac{dx}{dt}=\frac{dy}{dx}\frac{dx}{dt}$, another way that we treat those things exactly like fractions. Also,$dy=2\cos t dt=2 d(\cos t)=2dx$, as we saw before. In summary, we will never have an equation like$d(\mathrm{something})=\mathrm{nondifferential\: stuff}$.$d(\mathrm{something})$will always be paired somehow with$d(\mathrm{something\: else})$, either as a fraction on one side of the equation ($e.g.$:$\frac{dy}{dt}=2\cos t$), or with one on each side as a multiple ($e.g.$:$du=3\cos 3x\,dx$). Now, let's get back to your problem. I am going to solve a problem very similar to yours. You should be able to apply the same principles to your problem. Let$I=\int e^{5x}\sin 4x\,dx$. Keep in mind that our goal is to solve for$I$. First, we will start as you have, corrected for paired differentials, with$u=\sin 4x$and$dv=e^{5x}\,dx$, so that$I=\int u\,dv$and we can integrate by parts. At this point, we still need to find$du,v$. Since$\frac{du}{dx}=4\cos 4x$, then$du=4\cos 4x dx$. We find$v$as an antiderivative of$dv$, but it could be anything of the form$\frac{1}{5}e^{5x}+C$, couldn't it? In fact, yes! Fortunately, that won't change a thing. If instead of$v$, we chose$v^*=v+C$for some constant$C$, then$\cfrac{dv}{dx}=\cfrac{dv^*}{dx}$, so$dv=dv^*$, and our integration by parts formula is$\begin{eqnarray*}\int u\,dv^* & = & uv^*-\int v^*du\\& = & u(v+C)-\int(v+C)\,du\\& = & uv+uC-\int C\,du-\int v\,du\\& = & uv+Cu-Cu-\int v\,du\\& = & uv-\int v\,du. \end{eqnarray*}$Thus, when choosing our antiderivative$v$for integration by parts, we will always ignore the integration constant (choose it to be$0$), for simplicity. In this case in particular, we take$v=\frac{1}{5}e^{5x}.$By the formula, we have $$I=uv-\int v\,du=\frac{1}{5}e^{5x}\sin 4x-\frac{4}{5}\int e^{5x}\cos 4x\,dx.$$ Now, we will once again use integration by parts on the integral$J=\int e^{5x}\cos 4x\, dx$. This time, we will let$u=\cos 4x$,$dv=e^{5x}\,dx$. From there,$du=-4\sin 4x\,dx$and$v=\frac{1}{5}e^{5x}$, so our integration by parts formula gives us $$J=\frac{1}{5}e^{5x}\cos 4x-\frac{-4}{5}\int e^{5x}\sin 4x\,dx=\frac{1}{5}e^{5x}\cos 4x + \frac{4}{5}\int e^{5x}\sin 4x\, dx.$$ But we've seen the integral on the far right before, haven't we? It's$I$! Thus, we have derived two equations: $$I = \frac{1}{5}e^{5x}\sin 4x-\frac{4}{5}J,$$ and $$J=\frac{1}{5}e^{5x}\cos 4x +\frac{4}{5}I.$$ Subbing in for$J$in the first equation, we have $$I=\frac{1}{5}e^{5x}\sin 4x-\frac{4}{5}\left[\frac{1}{5}e^{5x}\cos 4x +\frac{4}{5}I\right]=\frac{1}{5}e^{5x}\left[\sin 4x-\frac{4}{5}\cos 4x\right]-\frac{16}{25}I.$$ Hence, we have $$\frac{41}{25}I=\frac{1}{5}e^{5x}\left[\sin 4x-\frac{4}{5}\cos 4x\right],$$ and so $$I = \frac{5}{41}e^{5x}\sin 4x - \frac{4}{41}e^{5x}\cos 4x.$$ A quick check by differentiation shows that$\frac{dI}{dx}=e^{5x}\sin 4x$, as desired. There's only one thing missing...the constant of integration! After all,$I$is an indefinite integral, so our final answer is in fact $$\int e^{5x}\sin 4x\,dx=\frac{5}{41}e^{5x}\sin 4x - \frac{4}{41}e^{5x}\cos 4x+C.$$ Note that we can rewrite this in the form $$\int e^{5x}\sin 4x\,dx= e^{5x}\left(\frac{5}{5^2+4^2}\sin 4x - \frac{4}{5^2+4^2}\cos 4x\right)+C.$$ But there's nothing special about the constants$5,4$, so more generally, we can use the exact same approach on any integral of similar form to get $$\int e^{ax}\sin bx\,dx= e^{ax}\left(\frac{a}{a^2+b^2}\sin bx - \frac{b}{a^2+b^2}\cos bx\right)+C,$$ whenever$a,b$are real constants not both zero, as Peter showed you using methods of complex variables, and as Chris got you started with. (Of course, if$a=b=0$, then the integral is easy.) Now, it's nice to know that formula, but you don't have to memorize it! It is far more important that you be comfortable using the method of iterated (repeated) integration by parts. There are many cases where it can come in handy. Generally, you'll use it whenever you've got a "mixed pair" integrand--that is, when your integrand is a product of two functions of the following types:$\mathbf{L}\mathrm{ogarithmic}$($e.g$:$\ln x$),$\mathbf{I}\mathrm{nverse\: trigonometric}$($e.g.$:$\arcsin x$),$\mathbf{A}\mathrm{lgebraic}$(any polynomial),$\mathbf{T}\mathrm{rigonometric}$,$\mathbf{E}\mathrm{xponential}$($e.g.$:$e^x$). A good rule of thumb is to take your$u$to be whichever of the functions is of the type earliest on the LIATE list. For example, in this problem, we let our$u$be the$\mathbf{T}\mathrm{rigonometric}$function, while our$dv$was the$\mathbf{E}\mathrm{xponential}$part of the product. The very nice thing here, is that hitting the exponential with an antiderivative just gives us some constant multiples, and if we hit the sine function twice with a derivative, we just end up with a constant multiple of the sine function, so (as we saw above) we end up having the starting integral show up again! The same thing works with a cosine function instead of a sine function. If we'd had to find$\int p(x)e^{ax}$with$p(x)$some polynomial, we'd possibly have to iterate several times with this, but eventually, the algebraic term would vanish altogether, and leave us with an integral of an exponential function, which we know how to do. Similar with$\int p(x)\sin(ax)\,dx$. Taking derivatives of logarithms or inverse trig functions give us some nice functions, but taking antiderivatives gets nasty. That's why we tend to favor those as our$u$terms. UPSHOT: Remember the LIATE method of choosing parts. Remember that sometimes you'll have to integrate by parts more than once, and it may lead to a nice integral, or it may lead to the integral you started with reappearing--in the first case, we're fine, and in the second, we will do something like what I've done above, in solving for$I$. - add comment David has indicated what to do, in the comments. I'll expand on Arturo's comment on setting up the integration by parts. What you wanted to do was $$u=\sin3x,\quad dv=e^{2x}\,dx$$ Then you get $$du=3\cos3x\,dx,\quad v=(1/2)e^{2x}$$ Now the formula $$\int u\,dv=uv-\int v\,du$$ becomes $$\int e^{2x}\sin3x\,dx=(1/2)e^{2x}\sin3x-\int(1/2)e^{2x}3\cos3x\,dx$$ and all the$du$and$dv$and$dx$terms match up correctly. - This is what I have but I can not get an answer past this. – Jordan May 29 '12 at 23:42 I know that. I wasn't trying to get you to the answer (as I mentioned, I thought David had already given you what you needed, in his comment), I was just trying to show you the correct way of handling the$du$,$dv$, and$dx$so you might understand how they "appear" and "disappear". – Gerry Myerson May 30 '12 at 0:22 They will not disappear because they will never be the same. – Jordan Jun 8 '12 at 18:00 My book gets a whacky and ridiculous answer but by this method I am getting answer answer now which I think it correct. – Jordan Jun 8 '12 at 18:10 What answer does your book get? – Gerry Myerson Jun 9 '12 at 1:06 show 3 more comments Integration by parts will work but you may want to try as follows. $$I = \int \exp(2x) \sin(3x) dx = \int \exp(2x) \text{Imag}(\exp(3ix)) dx = \text{Imag} \left(\int \exp((2+3i)x) dx \right)$$ Move your mouse over the gray area for the answer. $$I = \int \exp(2x) \sin(3x) dx = \int \exp(2x) \text{Imag}(\exp(3ix)) dx = \text{Imag} \left(\int \exp((2+3i)x) dx \right)\\ = \text{Imag} \left( \dfrac{\exp((2+3i)x)}{2+3i} \right) = \text{Imag} \left( \dfrac{\exp((2+3i)x)(2-3i)}{2^2 + 3^2} \right) = \dfrac{\exp(2x)}{13} \left( 2 \sin(3x) - 3 \cos(3x)\right)$$ - What does Imag mean? – Jordan May 30 '12 at 10:06 Imag means the imaginary part of the complex number i.e.$\text{Imag}(5+11i) = 11.\$ –  user17762 May 30 '12 at 15:44
This answer just confuses and complicated the problem and I do not understand any part of it at all. –  Jordan Jun 1 '12 at 14:32
@Jordan : He is giving a computation of the integral using complex functions. If you have not seen complex integrals (which I guess), perhaps you should either have fun and try to learn it if you're willing to, or skip it and focus on your current math. –  Patrick Da Silva Jun 8 '12 at 17:49

Another option is to consider the following integral: $$J=\int e^{(2+3i)x}dx=\frac{e^{(2+3i)x}}{2+3i}=\frac{e^{(2+3i)x}(2-3i)}{(2+3i)(2-3i)}=\frac{e^{2x}}{13}\left[\left(2\cos3x+3\sin3x\right)+i\left(2\sin3x-3\cos3x\right)\right]$$ Your integral is the imaginary part of the above

-
I don't know why people are so insistent on making this an incredibly complex problem. –  Jordan Jun 1 '12 at 14:44
It took me a while to appreciate Jordan's (likely unintentional) joke... –  Ｊ. Ｍ. Jul 27 '12 at 11:40

Another slick trick is noting

$$\int {{e^{ibx}}{e^{ax}}dx} = \int {{e^{ax}}\cos bxdx} + i\int {{e^{ax}}\sin bxdx}$$

Now $$\int {{e^{ibx}}{e^{ax}}dx} = \frac{{{e^{ibx}}{e^{ax}}}}{{a + bi}} = \frac{{{e^{ibx}}{e^{ax}}}}{{{a^2} + {b^2}}}\left( {a - bi} \right) = \frac{{a{e^{ibx}}{e^{ax}}}}{{{a^2} + {b^2}}} - i\frac{{b{e^{ibx}}{e^{ax}}}}{{{a^2} + {b^2}}}$$

Using the Euler Formula

\eqalign{ & \left( {i\sin bx + \cos bx} \right)\left( {\frac{{a{e^{ax}}}}{{{a^2} + {b^2}}} - i\frac{{b{e^{ax}}}}{{{a^2} + {b^2}}}} \right) = i\sin bx\frac{{a{e^{ax}}}}{{{a^2} + {b^2}}} + \cos bx\frac{{a{e^{ax}}}}{{{a^2} + {b^2}}} - i\sin bxi\frac{{b{e^{ax}}}}{{{a^2} + {b^2}}} - i\cos bx\frac{{b{e^{ax}}}}{{{a^2} + {b^2}}} \cr & \left( {i\sin bx + \cos bx} \right)\left( {\frac{{{ae^{ax}}}}{{{a^2} + {b^2}}} - i\frac{{b{e^{ax}}}}{{{a^2} + {b^2}}}} \right) = i\left( {a\sin bx - b\cos bx} \right)\frac{{{e^{ax}}}}{{{a^2} + {b^2}}} + \left( {a\cos bx + b\sin bx} \right)\frac{{{e^{ax}}}}{{{a^2} + {b^2}}} \cr}

and equating real and imaginary parts gives

\eqalign{ & \int {{e^{ax}}\cos bxdx} = {e^{ax}}\left( {\frac{{a\cos bx + b\sin bx}}{{{a^2} + {b^2}}}} \right) + C \cr & \int {{e^{ax}}\sin bxdx} = {e^{ax}}\left( {\frac{{a\sin bx - b\cos bx}}{{{a^2} + {b^2}}}} \right) + C \cr}

-
I have no idea what a euler formula is and I am not very familiar with imaginary numbers, we haven't really covered them in class or in the book so I do not think that this is the way I am suppose to do this problem. –  Jordan May 29 '12 at 23:54
You can check the linked solution then, it works nicely –  Pedro Tamaroff May 30 '12 at 0:03
It just looks like another rarely used trick that I would need to memorize, I have no interest in things like that. –  Jordan Jun 1 '12 at 14:45
Well, that doesn't mean you have to downvote. It is not a rarely used trick, it is really useful and you can learn it, not memorize it. –  Pedro Tamaroff Jun 1 '12 at 18:06
I didn't downvote, I just did not up vote it. I will try and learn it later maybe but I am having enough trouble with the trig and calculus parts from my book. –  Jordan Jun 1 '12 at 19:38