Integration by parts order question + integration question

237 Views Asked by At

In integration by parts, does it matter which of your terms is v (or, rather $f(x)$) and which term is du (or, rather $ f'(x) $?

Also, I'm having trouble finding $\int e^{2x} \cos(3x)dx $. I keep getting $$\frac {2e^{2x}(6\sin(3x) - \cos(3x))}{37}$$ when $u=e^{2x}$ and $dv = \cos(3x) dx $.

Thanks!

4

There are 4 best solutions below

0
On

Regarding which term is which: Yes and no. In $\int u \mathrm{d}v$ the strict requirement is that $\mathrm{d}v$ is something you can successfully integrate and $u$ is something you can successfully differentiate. If some other partition of the integrand gives you a pair that you can do these things to, you should be able to proceed. However, it is required that you get something "simpler", otherwise you will never finish. Consider $\int x \mathrm{e}^x \mathrm{d}x$. If in repeated integration by parts you persist in choosing $u = \mathrm{e}^x$ and then integrating the polynomial, the integral will never get simpler. So to ever finish reducing the integral to simpler terms, you must make choices that make the resulting integrals $\int v \mathrm{du}$ simpler (or at least eventually simpler).

In your particular problem, when $u = \mathrm{e}^{2x}$ and $\mathrm{d}v = \cos(3x) \mathrm{d}x$, you should get $\mathrm{d}u = 2 \mathrm{e}^{2x}\mathrm{d}x$ and $v = \frac{1}{3} \sin(3x)$. So, let $I = \int \mathrm{e}^{2x} \cos(3x) \mathrm{d}x$.
$$ I = \frac{1}{3} \mathrm{e}^{2x} \sin(3x) - \frac{2}{3} \int \mathrm{e}^{2x} \sin(3x) \mathrm{d}x $$ We "have a choice". If we set $\mathrm{d}v = \mathrm{e}^{2x} \mathrm{d}x$ and $u = \sin(3x)$, then we exactly undo what we did in the first step, so that will not result in progress. Therefore, we make the choice in the same way as in the first step: $u = \mathrm{e}^{2x}$ and $\mathrm{d}v = \sin(3x) \mathrm{d}x$, giving $\mathrm{d}u = 2 \mathrm{e}^{2x}\mathrm{d}x$ and $v = -\frac{1}{3}\cos(3x)$. Thus, \begin{align*} I &= \frac{1}{3} \mathrm{e}^{2x} \sin(3x) - \frac{2}{3} \left( -\frac{1}{3}\mathrm{e}^{2x}\cos(3x) + \frac{2}{3} \int \mathrm{e}^{2x} \cos(3x) \mathrm{d}x\right) \\ &= \frac{1}{3} \mathrm{e}^{2x} \sin(3x) + \frac{2}{9}\mathrm{e}^{2x}\cos(3x) - \frac{4}{9} I \\ \frac{13}{9}I &= \frac{1}{9} \mathrm{e}^{2x}\left( 3\sin(3x) + 2\cos(3x) \right) \\ I &= \frac{1}{13} \mathrm{e}^{2x}\left( 3\sin(3x) + 2\cos(3x) \right) \end{align*}

0
On

In this case, it doesn't matter whether you choose $e^{2x}$ or $\cos3x$ as $u$: after 2 applications of integration by parts you should get something similar back. Your answer doesn't seem to match Wolfram's answer, so let's give it a go. Given your substitution, we have

$$du=2e^{2x},v=\frac13\sin3x$$

$$\int e^{2x}\cos3xdx=\frac13e^{2x}\sin3x-\frac23\int e^{2x}\sin3xdx$$

We'll use the same $u$ to keep from undoing what we're already done. That leaves

$$dv=\sin3xdx,v=-\frac13\cos3x$$

So we have

$$\int e^2x\cos3xdx=\frac13e^{2x}\sin3x-\frac23(-\frac13e^{2x}\cos3x+\frac23\int e^{2x}\cos3xdx)$$ $$\int e^2x\cos3xdx=\frac13e^{2x}\sin3x+\frac29e^{2x}\cos3x-\frac49\int e^{2x}\cos3xdx$$

Adding $\frac49\int e^{2x}\cos3xdx$ to both sides:

$$\frac{13}9\int e^{2x}\cos3xdx=\frac13e^{2x}\sin3x+\frac29e^{2x}\cos3x$$ $$\int e^{2x}\cos3xdx=\frac3{13}e^{2x}\sin3x+\frac2{13}e^{2x}\cos3x$$

0
On

Yes, it does matter. You can check Wikipedia's page on integration by parts, and in particular the LIATE rule. In general, you want $u$ to be easier to differentiate, whereas $dv$ to be easier to integrate.

In your example, however, if you follow the rule above, both functions should be $u$. You can overcome this by applying the same choice multiple times. For example, let's set $u = e^{2x}$ and $dv = \cos (3x)\ dx$. Then $du = 2e^{2x}\ dx$ and $v = \frac{\sin 3x}{3}$. So: $$\int e^{2x} \cos (3x)\ dx = \frac{1}{3}e^{2x}\sin 3x - \frac{2}{3} \int \sin(3x) e^{2x}\ dx \tag 1$$ Integrating again, with $u = e^{2x}$ and $dv = \sin(3x)\ dx$ we get that $du = 2 e^{2x}\ dx$ and $v = - \frac{1}{3} \cos 3x$. The latter integral becomes: $$\int \sin(3x) e^{2x}\ dx = -\frac{1}{3}e^{2x}\cos 3x + \frac{2}{3}\int e^{2x}\cos(3x)\ dx$$ Substituting back into $(1)$ we get: $$\int e^{2x} \cos (3x)\ dx = \frac{1}{3}e^{2x}\sin 3x - \frac{2}{3} \left ( -\frac{1}{3}e^{2x}\cos 3x + \frac{2}{3}\int e^{2x}\cos(3x)\ dx\right )$$

and then $$\int e^{2x} \cos (3x)\ dx = \frac{1}{3}e^{2x}\sin 3x + \frac{2}{9} e^{2x}\cos 3x - \frac{4}{9} \int e^{2x}\cos(3x)\ dx$$

Adding $\displaystyle \frac{4}{9} \int e^{2x}\cos(3x)\ dx$ to both sides of the equation: $$\frac{13}{9} \int e^{2x} \cos (3x)\ dx = \frac{1}{3}e^{2x}\sin 3x + \frac{2}{9} e^{2x}\cos 3x$$

Finally: $$\begin{align*} \int e^{2x} \cos (3x)\ dx &= \frac{3}{13}e^{2x}\sin 3x + \frac{2}{13} e^{2x}\cos 3x + C = \\ &= \frac{1}{13} e^{2x} (3 \sin 3x + 2 \cos 3x) + C \end{align*}$$.

0
On

Moderately Off Topic, since you are specifically asking for where your IBP went wrong.

There is an easier way of computing the indefinite integral. Use elementary complex analysis. This approach allows you to completely avoid using integration by parts.

Let :

  • $\displaystyle C=\int e^{2x}\cos 3x \,dx.$

  • $\displaystyle S=\int e^{2x}\sin3x \,dx.$

Your goal is to compute the anti-derivative of $~C.$

Instead of attempting to compute the anti-derivative of $~C,~$ perform the easier task of computing the anti-derivative of $~(C + iS). ~$

When this computation is complete, and the result is $~f(x) + i[g(x)],~$ then $~f(x)~$ will equal the anti-derivative of $~C,~$ and $~g(x)~$ will equal the anti-derivative of $~S.~$

Here, I am assuming that $~f ~: \Bbb{R} \to \Bbb{R},~$ and $~g ~: \Bbb{R} \to \Bbb{R}.$

To view the analysis involved in computing the anti-derivative of $~(C + iS),~$ you can review this answer. In the linked answer, the posted question is actually interested (instead) in definite integrals. This is irrelevant, for your purposes.

As a reference, I will repeat all of the necessary analysis below.


In all of the analysis below, the Constant of Integration is omitted, for convenience.

$$C + iS = \int e^{2x}\cos 3x \,dx + i \left[ ~\int e^{2x}\sin3x \,dx ~\right]$$

$$= \int e^{2x}\cos 3x \,dx + \left[ ~\int e^{2x} \times i \times \sin3x \,dx ~\right]$$

$$= \int e^{2x} \,[ ~\cos 3x + i\sin 3x ~] \,dx $$

$$= \int e^{2x} \,[ ~e^{i3x} ~] \,dx = \int e^{\{ ~x \times [2 + 3i] ~\}} \,dx. \tag1 $$

There is a rule in real analyis, that for any $~k \in \Bbb{R_{\neq 0}},~$ $~\displaystyle \int e^{kx} \,dx = \frac{1}{k} e^{kx}.~$

This rule carries over into complex analysis. This implies that the expression in (1) above equals

$$\frac{1}{2 + 3i} \times e^{\{ ~x \times [2 + 3i] ~\}}. \tag2 $$

Note that

$$\frac{1}{2 + 3i} \times \frac{2 - 3i}{2 - 3i} = \frac{2 - 3i}{13}.$$

Therefore, the expression in (2) above equals

$$\frac{2 - 3i}{13} \times e^{\{ ~x \times [2 + 3i] ~\}} = \frac{2 - 3i}{13} \times e^{2x} \times e^{i3x} \\ = \frac{e^{2x}}{13} \left[ ~(2 - 3i) \,e^{i3x} ~\right] \\ = \frac{e^{2x}}{13} \left\{ ~(2 - 3i) \,[ ~(\cos(3x) + i\sin(3x) ~] ~\right\} \\ = \frac{e^{2x}}{13} \left\{ ~[ ~2\cos(3x) + 3\sin(3x) ~] + i \,[ ~2 \sin(3x) - 3\cos(3x) ~] ~\right\}. $$

So, you have that

$$C + iS = f(x) + i\,g(x)$$

where

  • $\displaystyle f(x) = \frac{e^{2x}}{13} \times [ ~2\cos(3x) + 3\sin(3x) ~]$

  • $\displaystyle g(x) = \frac{e^{2x}}{13} \times [ ~2 \sin(3x) - 3\cos(3x) ~].$

Therefore,

$$\displaystyle \int e^{2x}\cos 3x \,dx = C = f(x) = \frac{e^{2x}}{13} \times [ ~2\cos(3x) + 3\sin(3x) ~].$$


The remainder of this answer is a sanity check that $~f'(x) = e^{2x} \cos 3x.$

Note that

$$\frac{d \,[ ~2\cos(3x) + 3\sin(3x) ~]}{dx} = [ ~-6\sin(3x) + 9\cos(3x) ~].$$

So, $~f'(x)~$ equals

$$\frac{d \,\left\{ ~\frac{e^{2x}}{13} ~[ ~2\cos(3x) + 3\sin(3x) ~] ~\right\} }{dx} \\ = \left\{ ~\frac{2e^{2x}}{13} ~[ ~2\cos(3x) + 3\sin(3x) ~] ~\right\} + \left\{ ~\frac{e^{2x}}{13} ~[ ~-6\sin(3x) + 9\cos(3x) ~] ~\right\} \\ = \frac{e^{2x}}{13} \times \left\{ ~[ ~4\cos(3x) + 6\sin(3x) ~] + [ ~-6\sin(3x) + 9\cos(3x) ~] ~\right\} \\ = \frac{e^{2x}}{13} \times \{ ~13\cos(3x) ~\} = e^{2x} \,\cos(3x). $$