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: Ordinary DE using integrating factor?

  1. Apr 2, 2010 #1
    1. The problem statement, all variables and given/known data
    solve the following initial condition problem
    [tex]x (d/dx) y(x) + 4xy(x) = -8-y(x) [/tex]
    [tex]y(4)=-6 [/tex]

    2. Relevant equations



    3. The attempt at a solution
    first i rearranged

    [tex]xy'+y+4xy=-8 [/tex]
    [tex]xy'+y(1+4x)=-8 [/tex]
    [tex]y'+y(1/x+4)=-8/x[/tex]

    integrating factor:[tex]e^\int(1/x+4)[/tex]
    [tex]e^(lnx+4x)[/tex]
    [tex]x+e^4x[/tex]

    multiplying integrating factor:
    [tex]d/dx(x+e^4x) y'+(1/x+4)(x+e^4x)y=-8/x(x+e^4x)[/tex]
    [tex]d/dx(x+e^4x])y=-8/x(x+e^4x)[/tex]
    [tex]\int d/dx(x+e^4x])y=\int-8/x(x+e^4x)[/tex]
    [tex](x+e^4x)y=\int(-8-8e^4x/x)[/tex]

    just wondering if im going alright so far... and if i am how do you integrate
    [tex] \int (8e^4x/x) [/tex]
     
    Last edited: Apr 2, 2010
  2. jcsd
  3. Apr 2, 2010 #2

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Careful, [itex]e^{a+b}=e^a e^b \neq e^a+e^b[/itex]:wink:
     
  4. Apr 2, 2010 #3
    so instead of
    [tex]x+e^(4x)[/tex] its
    [tex]xe^(4x)[/tex]?
     
  5. Apr 2, 2010 #4

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Yup.:smile:

    On a side note, to get exponents with more than one character to display properly in [itex]\LaTeX[/itex], simply enclose them in curly brackets. For example, [itex]xe^{4x}[/itex] is generated using xe^{4x}.
     
  6. Apr 2, 2010 #5
    haha cheers for both advices, this should make things easier
     
  7. Apr 2, 2010 #6
    ok after using:
    [tex]xe^{4x}[/tex] as an integrating factor
    i got
    [tex]xe^{4x} y(x)=\int-8e^{4x}[/tex]
    [tex]xe^{4x} y(x)= -2e^{4x} +C [/tex]
    [tex]y(x)=-2e^{4x}/xe^{4x} + C [/tex]
    [tex]y(x)=-2/x +C [/tex]

    using initial conditions:
    [tex]y(4) = -2/4+C = -6 [/tex]
    [tex]c=-11/2[/tex]
    [tex]y(x)=-2/x-11/2[/tex]

    and it doesnt seem to be the right answer
     
  8. Apr 2, 2010 #7

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Shouldn't you also divide [itex]C[/itex] by [itex]xe^{4x}[/itex] here? :wink:
     
  9. Apr 2, 2010 #8
    hmmmm tried doing that before but still didnt get the right answer
     
  10. Apr 2, 2010 #9
    using:

    [tex]y(x) = -2/x + C/(xe^{4x})[/tex]

    and by substituing initial conditions i got:

    [tex]y(4)=-2/4+C/(4e^{16})=-6[/tex]
    [tex]-11/2=C/(4e^{16})[/tex]
    [tex]C=(-22e^16)/2[/tex]

    is this right or did i miss something...
     
    Last edited: Apr 2, 2010
  11. Apr 2, 2010 #10

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    11*4=44, not 22:wink:
     
  12. Apr 2, 2010 #11
    sorry there wasnt supposed to be
    [tex]C=(-22e^16)/2[/tex]
    divide 2 there, i just simplified and got
    [tex]C=(-22e^16)[/tex]
     
  13. Apr 2, 2010 #12

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Okay, that looks correct then:approve:
     
  14. Apr 3, 2010 #13
    ok i must have done algebra somewhere incorrect then, cant get the right answer out
     
  15. Apr 3, 2010 #14

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    What was your final answer, and what is the answer "supposed" to be according to your assignment sheet/text?
     
  16. Apr 3, 2010 #15
    my answer is [tex] y(x) = -2/x -22e^{-16} [/tex]
    as for the solution i dont know since its a computer entered assignment
     
  17. Apr 3, 2010 #16

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    What happened to the [itex]xe^{4x}[/itex] in [itex]y(x) = -2/x + C/(xe^{4x})[/itex]?
     
  18. Apr 3, 2010 #17
    i substituted the initial conditions into the equation and found what the value of C was and entered my answer as that, maybe i'll try keeping the constant and see if thats right
     
  19. Apr 3, 2010 #18
    didnt think ordinary differential equations could be so annoying
    haha...
     
  20. Apr 3, 2010 #19

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    You had [itex]y(x) = -2/x + C/(xe^{4x})[/itex] as your general solution, substituting your initial condition gave you [itex]C=-22e^{16}[/itex], so your particular solution should be

    [tex]y(x)=-\frac{2}{x}-\frac{22e^{16}}{xe^{4x}}[/tex]

    Not what you had in post #15. You need to pay more attention to basic algebra steps like substitution.
     
  21. Apr 3, 2010 #20
    ohhhh... C was over [tex] xe^{4x} [/tex]
    keep making stupid mistakes... looks like i need to look at things with more care
    thanks a lot :)
     
    Last edited: Apr 3, 2010
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook