Results 1 to 3 of 3

Thread: 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.

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

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

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

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

    and
    $\displaystyle v=\int{e^{-2x}cos(e^{-x})dx}$
    $\displaystyle v=e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}-\int{-2e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}dx}$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2\int{e^{-x}sin(e^{-x})dx}$
    $\displaystyle 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}]$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2\int{cos(e^{-x})dx}$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2sin(e^{-x})\frac{1}{-e^{-x}}$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2cos(e^{-x})-2e^{x}sin(e^{-x})$

    and so
    $\displaystyle 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})$
    $\displaystyle y_p=-2e^{3x}sin(e^{-x})-e^{2x}cos(e^{-x})$

    and finally the general solution
    $\displaystyle 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
    $\displaystyle 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,470
    Thanks
    83
    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.

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

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

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

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

    and
    $\displaystyle v=\int{e^{-2x}cos(e^{-x})dx}$
    $\displaystyle v=e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}-\int{-2e^{-2x}sin(e^{-x})\frac{1}{-e^{-x}}dx}$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2\int{e^{-x}sin(e^{-x})dx}$
    $\displaystyle 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}]$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2\int{cos(e^{-x})dx}$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2cos(e^{-x})+2sin(e^{-x})\frac{1}{-e^{-x}}$
    $\displaystyle v=-e^{-x}sin(e^{-x})-2cos(e^{-x})-2e^{x}sin(e^{-x})$

    and so
    $\displaystyle 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})$
    $\displaystyle y_p=-2e^{3x}sin(e^{-x})-e^{2x}cos(e^{-x})$

    and finally the general solution
    $\displaystyle 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
    $\displaystyle 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

    $\displaystyle w = e^{-x}$

    your two integrals becomes

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

    which integrate easily giving

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

    and thus

    $\displaystyle 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: Jan 14th 2012, 12:01 PM
  2. Variation of Parameters
    Posted in the Differential Equations Forum
    Replies: 4
    Last Post: Feb 11th 2010, 04:16 PM
  3. variation of parameters
    Posted in the Differential Equations Forum
    Replies: 0
    Last Post: Nov 24th 2009, 01:27 PM
  4. Variation of Parameters
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Jul 4th 2007, 08:46 PM
  5. Variation of Parameters
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Jul 4th 2007, 08:44 PM

Search Tags


/mathhelpforum @mathhelpforum