Results 1 to 3 of 3

Math Help - ODE using variation of parameters

  1. #1
    Newbie
    Joined
    Jan 2009
    Posts
    18

    ODE using variation of parameters

    I've worked this problem several times. I know I am making some sign errors along the way but I don't think that can account for the difference between my solution and the one in my text book.

    y''-3y'+2y=cos(e^{-x})

    I obtained solutions to homogeneous equation y_1 = e^x; y_2=e^{2x} and so the Wronskian is W(x) = e^{3x}

    the particular solution takes the form y_p=uy_1+vy_2 where u'=-\frac{y_2f}{W} and v'=\frac{y_1f}{W} where the driving force f=cos(e^{-x})

    so,
    u=-\int{e^{-x}cos(e^{-x})dx}
    u=-[e^{-x}sin(e^{-x})\frac{1}{-e^{-x}}-\int{-e^{-x}sin(e^{-x})\frac{1}{-e^{-x}}dx}]
    u=sin(e^{-x})+\int{sin(e^{-x})dx}
    u=sin(e^{-x})+(-cos(e^{-x}))\frac{1}{-e^{-x}}
    u=sin(e^{-x})+e^xcos(e^{-x})

    and
    v=\int{e^{-2x}cos(e^{-x})dx}
    v=e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}-\int{-2e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}dx}
    v=-e^{-x}sin(e^{-x})-2\int{e^{-x}sin(e^{-x})dx}
    v=-e^{-x}sin(e^{-x})-2[e^{-x}(-cos(e^{-x}))\frac{1}{-e^{-x}}-\int{-e^{-x}(-cos(e^{-x}))\frac{1}{-e^{-x}}dx}]
    v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2\int{cos(e^{-x})dx}
    v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2sin(e^{-x})\frac{1}{-e^{-x}}
    v=-e^{-x}sin(e^{-x})-2cos(e^{-x})-2e^{x}sin(e^{-x})

    and so
    y_p = e^{x}sin(e^{-x})+e^{2x}cos(e^{-x})-e^xsin(e^{-x})-2e^{2x}cos(e^{-x})-2e^{3x}sin(e^{-x})
    y_p=-2e^{3x}sin(e^{-x})-e^{2x}cos(e^{-x})

    and finally the general solution
    y=c_1e^x+c_2e^{2x} -2e^{3x}sin(e^{-x})-e^{2x}cos(e^{-x})

    but the solution in my text book is
    y=c_1e^x+c_2e^{2x}-e^{2x}cos(e^{-x})

    and I can't figure out where the sin term was supposed to disappear.

    Any pointers will be very appreciated.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Jester's Avatar
    Joined
    Dec 2008
    From
    Conway AR
    Posts
    2,392
    Thanks
    56
    Quote Originally Posted by stevedave View Post
    I've worked this problem several times. I know I am making some sign errors along the way but I don't think that can account for the difference between my solution and the one in my text book.

    y''-3y'+2y=cos(e^{-x})

    I obtained solutions to homogeneous equation y_1 = e^x; y_2=e^{2x} and so the Wronskian is W(x) = e^{3x}

    the particular solution takes the form y_p=uy_1+vy_2 where u'=-\frac{y_2f}{W} and v'=\frac{y_1f}{W} where the driving force f=cos(e^{-x})

    so,
    u=-\int{e^{-x}cos(e^{-x})dx}
    u=-[e^{-x}sin(e^{-x})\frac{1}{-e^{-x}}-\int{-e^{-x}sin(e^{-x})\frac{1}{-e^{-x}}dx}]
    u=sin(e^{-x})+\int{sin(e^{-x})dx}
    u=sin(e^{-x})+(-cos(e^{-x}))\frac{1}{-e^{-x}}
    u=sin(e^{-x})+e^xcos(e^{-x})

    and
    v=\int{e^{-2x}cos(e^{-x})dx}
    v=e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}-\int{-2e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}dx}
    v=-e^{-x}sin(e^{-x})-2\int{e^{-x}sin(e^{-x})dx}
    v=-e^{-x}sin(e^{-x})-2[e^{-x}(-cos(e^{-x}))\frac{1}{-e^{-x}}-\int{-e^{-x}(-cos(e^{-x}))\frac{1}{-e^{-x}}dx}]
    v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2\int{cos(e^{-x})dx}
    v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2sin(e^{-x})\frac{1}{-e^{-x}}
    v=-e^{-x}sin(e^{-x})-2cos(e^{-x})-2e^{x}sin(e^{-x})

    and so
    y_p = e^{x}sin(e^{-x})+e^{2x}cos(e^{-x})-e^xsin(e^{-x})-2e^{2x}cos(e^{-x})-2e^{3x}sin(e^{-x})
    y_p=-2e^{3x}sin(e^{-x})-e^{2x}cos(e^{-x})

    and finally the general solution
    y=c_1e^x+c_2e^{2x} -2e^{3x}sin(e^{-x})-e^{2x}cos(e^{-x})

    but the solution in my text book is
    y=c_1e^x+c_2e^{2x}-e^{2x}cos(e^{-x})

    and I can't figure out where the sin term was supposed to disappear.

    Any pointers will be very appreciated.
    I think there's a problem with your integration to get u and v. Note, if you make the substitution

    w = e^{-x}

    your two integrals becomes

    u = \int \cos w\, dw,\;\;\; \int w \cos w\, dw

    which integrate easily giving

    u = \sin w,\;\;\; v = \cos w + w \sin w

    and thus

    u = \sin e^{-x},\;\;\; v = \cos e^{-x} + e^{-x} \sin e^{-x}

    Things should work OK from here.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2009
    Posts
    18
    That worked out so much easier than what I was trying to do. Thank you very much. The terms of v are actually both negative but I noticed that when I worked through it again using the substitution.

    *sigh* I stink at integration, I need to be able to see alternative options better when my first attempts don't work so great.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Variation of Parameters
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: January 14th 2012, 01:01 PM
  2. Variation of Parameters
    Posted in the Differential Equations Forum
    Replies: 4
    Last Post: February 11th 2010, 05:16 PM
  3. variation of parameters
    Posted in the Differential Equations Forum
    Replies: 0
    Last Post: November 24th 2009, 02:27 PM
  4. Variation of Parameters
    Posted in the Calculus Forum
    Replies: 1
    Last Post: July 4th 2007, 09:46 PM
  5. Variation of Parameters
    Posted in the Calculus Forum
    Replies: 1
    Last Post: July 4th 2007, 09:44 PM

Search Tags


/mathhelpforum @mathhelpforum