Variation of parameters for a second order ODE

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
fluidistic
Gold Member
Messages
3,934
Reaction score
286

Homework Statement


I must solve ##y''+2y'+2y=e^{-t}\sin t##.
I know variation of parameters might not be the fastest/better way to solve this problem but I wanted to practice it as I never, ever, could solve a DE with it. (Still can't with this one). Though the method is supposed to work.

Homework Equations


Variation of parameters.


The Attempt at a Solution


I quickly solved the homogeneous ODE, the complementary solution is ##y_c (t)=c_1\underbrace{e^{(-1-i)t}}_{y_1(t)}+c_2\underbrace{e^{(-1+i)t}}_{y_2(t)}##, I even manually derivated it twice and plugged it into the ODE, it does satisfy the homogeneous ODE.
I've calculated the Wronskian of ##y_1(t)## and ##y_2(t)##, it's worth ##2ie^{-2t}##.
Now according to all sources of information I found, the particular solution is ##y_p =-y_1(t) \int \frac{y_2(t)e^{-t}\sin t}{W(y_1,y_2)(t)}dt+y_2(t) \int \frac{y_1 e^{-t}\sin t}{W(y_1,y_2)(t)}dt##.
Using a "cheat" taken from Wolfram Alpha, namely that ##\int e^{it}\sin t dt= \frac{it}{2}-\frac{1}{4}e^{2it}##, I reach a total nonsense : ##y_p(t)=e^{(-1-i)t}\left ( \frac{i}{8}- \frac{t}{4} \right ) - e^{(-1+i)t} \left ( \frac{i}{8}+ \frac{t}{4} \right )##. The answer should be ##y_p(t)=-\frac{e^t}{2}t \cos t##.
I'm totally clueless on where is/are my error(s). It's a simple integral's evaluation and I sought help from wolfram alpha ( http://www.wolframalpha.com/input/?i=integral+e^(i*x)sin+x+dx to be exact). There's no reason the method should fail, yet it "seems that it does fail".
 
Physics news on Phys.org
Check your yp. Is not some exponents missing? Write e±it=cos(t)± isin(t). Collect the real and imaginary terms in yp and see what you get.

ehild
 
Last edited:
In terms of real variables, the general solution to the associated homogeneous equation, [itex]y''+ 2y'+ 2y= 0[/itex] is [itex]y= e^{-t}(Acos(t)+ Bsin(t))[/itex].

You will find it simpler to use [itex]y= u(t)e^{-t}sin(t)+ v(t)e^{-t}cos(t)[/itex] as your solution.
 
Thanks guys, the rewriting of the complementary solution did the job. I'll keep this in mind for next time(s).