1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Variation of parameters for a second order ODE

  1. Nov 30, 2012 #1


    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    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.

    2. Relevant equations
    Variation of parameters.

    3. 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".
  2. jcsd
  3. Dec 1, 2012 #2


    User Avatar
    Homework Helper

    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.

    Last edited: Dec 1, 2012
  4. Dec 1, 2012 #3


    User Avatar
    Science Advisor

    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.
  5. Dec 1, 2012 #4


    User Avatar
    Gold Member

    Thanks guys, the rewriting of the complementary solution did the job. I'll keep this in mind for next time(s).
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook