Quantcast ODE trouble at integration step Text - Physics Forums Library

PDA

View Full Version : ODE trouble at integration step


Somefantastik
Aug24-08, 01:42 PM
x' = -2x + cos(t)

dx/dt + 2x = cos(t)

integrating factor = e^2t =>

e^{2t} \ \frac{dx}{dt} \ + 2 \ e^{2t} \ x \ = \ e^{2t} \cos(t) =>

\int \frac{d}{dt}\left(e^{2t} \ x \right) \ = \ \int e^{2t}\cos(t)\ dt =>


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 \ =>


\int e^{2t} / cos(t) / dt = 0 + 2 \int cos(t) / e^{2t} / dt =>

?? My integration must have gone wrong somewhere. Any explanations?

I was shown on an earlier thread how to transform the trig function into its complex form and solve that way, and the answer that resulted was that which agreed with good ole matlab : (1/5)*(2*cos(t) + sin(t)).

I'm grateful to be shown how to do this by using the transform, but my overwhelming curiosity pushes me to have this shown to me using integration by parts. I'm more likely to use that method on an exam. Any takers?

Thanks,
Candio

HallsofIvy
Aug24-08, 02:32 PM
\int e^{2t}cos(t)dt
Let u= e2t, dv= cos(t)dt.
Then du= 2e2tdt, v= sin(t)
\int e^{2t}cos(t)dt= e^{2t}sin(t)- 2\int e^{2t}sin(t)dt
To do that second integral, let u= e2t, dv= sin(t)dt.
Then du= 2e2t, v= -cos(t)dt
\int e^{2t}sin(t)dt= -e^{2t}cos(t)+ 2\int e^{2t}cos(t)dt

Putting that into the previous integral,
\int e^{2t}cos(t)dt= e^{2t}sin(t)- 2(-e{2t}cos(t)+ 2\int e^{2t}cos(t)dt)
\int e^{2t}cos(t)dt= e^{2t}sin(t)+ 2e^{2t}cos(t)- 4\int e^{2t}cos(t)dt

Now add 4\int e^{2t}cos(t)dt to both sides of the equation.

Somefantastik
Aug24-08, 02:34 PM
Ok thanks so much. When you have the type of int. by parts where you integrate by parts twice, must you be consistent when choosing u, dv?

HallsofIvy
Aug24-08, 04:45 PM
Oh yes! If you switch in the middle, you will just reverse what you did the first time and everything will cancel!

Somefantastik
Aug24-08, 04:59 PM
oh my goodness :(

thank you so much.