1. Not finding help here? Sign up for a free 30min 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!

Solving a differential equation using integrating factor

  1. Jul 5, 2016 #1
    1. The problem statement, all variables and given/known data
    Solve ##{dy/dx}-2xy=2x##


    2. Relevant equations


    3. The attempt at a solution

    Let ##P= -2x ## and Q= 2x,
    Integrating factor =## e^{-x^2} ##
    ##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
    ##y.e^{-x^2}={x^2} e^{-x^2}+∫ 2{x^3} e^{-x^2}dx##
    since ##y.e^{-x^2} = ∫ 2x.e^{-x^2} dx##
    then ##y.e^{-x^2}={x^2}e^{-x^2}+{x^2}.y.e^{-x^2}## dividing through by ##e^{-x^2}, ## we have
    ##y={x^2}+{x^2}y.##
    ##y= {x^2}({1+y})##
    now textbook says answer is ##y+1=c{x^2} ## where have i gone wrong?
     
    Last edited: Jul 5, 2016
  2. jcsd
  3. Jul 5, 2016 #2

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Use substitution u=x2 to find the integral. Do not forget the integration constant.
     
    Last edited: Jul 5, 2016
  4. Jul 5, 2016 #3
    thanks i am getting
    ## du= 2x dx##
    on substitution to the right hand side of the integral:, we get
    ##ye^{-x^2} = ∫2xe^{-x^2} dx##
    ##ye^{-x^2}= ∫(2xe^{-u})/(2x)du##
    ##ye^{-x^2} = -e^{-u} + c##
    ##y= -e^{-x^2}+c##
    ## y +1 = ce^{x^2} ## looks like text book answer is wrong...am i right?
     
    Last edited: Jul 5, 2016
  5. Jul 5, 2016 #4
    I would just let $$u=-x^2$$

    Does not really matter, but it is easier to remember the negative sign.
    Also, depending on the teacher they may want to see the arbitrary constants of integration. Even tho we can ignore them throughout the problem and just tack them onto the final solution. Ask your instructor. Mine was very picky when I took this course.
     
  6. Jul 5, 2016 #5

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Yes, the answer in the book is wrong. You can check your solution and that from the book if you substitute them into the original equation.
     
  7. Jul 5, 2016 #6
    right.
    ##y= ce^{x^2}-1##
    ##\frac {dy} {dx}= ce^{x^2}2x ##
    substituting this in
    ##\frac {dy} {dx}-2xy=2x##
    we have:,
    ##ce^{x^2}2x-2x(ce^{x^2}-1)= ce^{x^2}2x-2xce^{x^2}+2x= 2x##
    thus shown
     
  8. Jul 6, 2016 #7

    ehild

    User Avatar
    Homework Helper
    Gold Member

    OK, so your solution is correct. What about the formula from the book?
     
  9. Jul 6, 2016 #8
    The book does not show the method used, it only indicates solutions.
     
  10. Jul 6, 2016 #9

    ehild

    User Avatar
    Homework Helper
    Gold Member

    Well, but you can substitute it into the differential equation and see if it is really solution.
     
  11. Jul 15, 2016 #10
    yes, it is a solution.
     
  12. Jul 15, 2016 #11
    Another approach
    dy/dx = 2x(y+1)
    dy/(y+1) = 2xdx
    y+1 = Cex2
     
  13. Jul 15, 2016 #12

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper


    Multiplying both sides of your DE by ##e^{-x^2}## we have
    [tex] \frac{d}{dx} e^{-x^2} y = e^{-x^2} 2x \Longrightarrow e^{-x^2} y(x) = k + \int_0^x e^{-t^2} 2t \, dt = k - e^{-x^2}+1, [/tex]
    or
    [tex] y(x) = e^{x^2} (c - e^{-x^2}) = -1 + c e^{x^2}, [/tex]
    where ##c = k-1##. Basically, ##k=y(0)## is a constant of integration.

    I urge you to ALWAYS use definite integration when you solve DE's like you tried to do, and ALWAYS make a distinction between ##x## outside the integral and the dummy variable of integration; that is why I used ##\int \cdots \, dt## instead of ##\int \cdots \, dx##. Doing that makes everything clearer and reduces the chance of making elementary blunders.

    Both your solutions and those of the book are incorrect, although the book's solution is correct in the special case that ##c = 0## (giving the trivial solution ##y(x) = -1## for all ##x##).
     
    Last edited: Jul 15, 2016
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Solving a differential equation using integrating factor
Loading...