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.


Solution 1:

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.

Solution 2:

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$.

Solution 3:

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.

Solution 4:

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)$$

Solution 5:

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