# Integration by parts; the error of my ways

1. Aug 23, 2008

### Somefantastik

Hi all,

I'm working on an ODE and ran into this integration by parts. My calculus is terrible. Can someone help?

$$e^{2t}x = \int e^{2t}cos(t) \ dt = \frac{1}{2}cos(t) \ e^{2t} + \frac{1}{2}\int e^{2t}sin(t)\ dt = \frac{1}{2}cos(t)\ e^{2t} + \frac{1}{2}\left(-e^{2t}cos(t) + 2\int cos(t)\ e^{2t} \right) = \frac{1}{2}cos(t) \e^{2t} - \frac{1}{2}cos(t)\ e^{2t} + 2\int cos(t)\ e^{2t} dt$$

Now that can't be right. Where did I go wrong?

2. Aug 23, 2008

### rock.freak667

$$\int u \frac{dv}{dt} \ dt=uv- \int v \frac{du}{dt} \ dt$$

$$\int e^{2t}cos(t) \ dt$$

u=e-2t so that $du=-2e^{-2t}dt$
dv=cos(t) dt => v=-sin(t).

So it should be -2e-2tsin(t). I think the mistake you kept on making is when you put back the functions into the formula. It's uv, you kept putting 'u*dv' if you get what I'm saying.

Last edited: Aug 23, 2008
3. Aug 23, 2008

### snipez90

I'm not sure where x comes in, but I think you want to calculate

$$\int e^{2t}cos(t) \ dt$$

Anyways I found the antiderivative but I let u = e^(2x) and dv = cos(t)dt whereas you choose differently. I'm not sure if my way is easier or less messier but I will try to find out where you went wrong.

4. Aug 23, 2008

### snipez90

OK, I did the problem letting u be the trig function and dv be the exponential and got the same antiderivative (as I should). It wasn't that much messier.

Anyways

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

is correct.

Actually here:

$$\frac{1}{2}cos(t) \ e^{2t} + \frac{1}{2}\int e^{2t}sin(t)\ dt = \frac{1}{2}cos(t)\ e^{2t} + \frac{1}{2}\left(-e^{2t}cos(t) + 2\int cos(t)\ e^{2t} \right)$$

it looks as though you're still correct

Hmmmm, does it have to do with inconsistency in choosing u's and dv's?

FINAL EDIT:

Hmm ok I think I finally get it. Well to be honest I only know how to derive the integration by parts formula and apply it in simple situations. But it looks like you first let u = cos(t) and dv = e^(2t) dt. But then for the next integration by parts, you choose u = e^(2t) and dv = sin(t) dt.

This inconsistency leads to a true statement. In fact you end up with 0 = 0. But this is a pretty trivial result. I'm not sure why this happens but I think to find the actual antiderivative in this case, you have to be consistent (let u be be e^(2x) both times or let u be the trig function both times). If you're consistent, I guarantee you'll find the antiderivative if you can do the algebra. I guess it's not really an error since you end up with 0 = 0 but perhaps someone else could explain why it happened.

Last edited: Aug 23, 2008
5. Aug 24, 2008

### Marin

Hi everybody!

Somefantastik, there's a way to calculate this integral without using integration by parts!

Just transform the cos-function in the complex e-function, do the calculations and take the real part of the final solution! - Here's how it works:

$$\displaystyle{\int}e^{2t}\cos t dt=\displaystyle{\int}e^{2t} Re(e^{it}) dt=Re\displaystyle}{(\int}e^{(2+i)t} dt)=Re(\frac{e^{(2+i)t}}{2+i})$$

now, taking the real part of it:

$$Re(\frac{e^{(2+i)t}}{2+i})=Re(\frac{2-i}{4+1}e^{2t}e^{it})=Re(\frac{e^{2t}}{5}(2-i)(cost+i\sin t))=\frac{e^{2t}}{5}Re((2-i)(\cos t+i\sin t))=\frac{e^{2t}}{5}(2\cos t+\sin t)$$

In the end, adding the arbitrary constant we finally get:

$$\displaystyle{\int}e^{2t}\cos t dt=\frac{e^{2t}}{5}(2\cos t+\sin t)+C$$

** How does one make the parenthesis big? And how does one get the following type of brackets "{ }"? (Thanks a lot)

6. Aug 24, 2008

### schroder

Right. And because that started out being equal to x*e^2t, then:
x = 1/5 sin(t) + 2/5 cos(t) + Ae^-2t
You can also get this by using cyclic integration by parts and an algebraic
substitution for the integral.

My latex is Much worse than yours, sorry can't help you there!:uhh:

7. Aug 24, 2008

### tiny-tim

LaTeX

Hi Marin!

You use \left and \right before each bracket (but it only make them large enough to fit what you've typed inside, so it makes no difference if it's all on one line):

$$\frac{e^{2t}}{5}\left(2\cos t+\sin t\right)$$

$${e^{2t}\left(\frac{2\cos t+\sin t}{5}\right)$$

$${e^{2t}\left[\frac{2\cos t+\sin t}{5}\right]$$

$${e^{2t}\left<\frac{2\cos t+\sin t}{5}\right>$$

$${e^{2t}\left|\frac{2\cos t+\sin t}{5}\right|$$

And you must put \ in front to get { or }:

$${e^{2t}\left\{\frac{2\cos t+\sin t}{5}\right\}$$

see http://www.physics.udel.edu/~dubois/lshort2e/node54.html#SECTION00830000000000000000 [Broken]

Last edited by a moderator: May 3, 2017
8. Aug 24, 2008

### Marin

Thanks a lot, tiny-tim!

I've been using LaTeX for a month and it's quite extraordinary to me still :)

but I'm gonna get used to it :) - I caught up the main commands but there are still some I'm missing out :)

9. Aug 24, 2008

### snipez90

Whoa that's pretty cool Marin. It's probably a lot shorter than cyclic IBP and then solving for the original integral. Anyways I never learned that in my high school calc class. Is this a topic in complex analysis?

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook