Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Math Help - First-order linear ode

  1. #1
    Member
    Joined
    Apr 2010
    Posts
    156

    First-order linear ode

    Solve the ordinary differential equation:

    xy^2 + 4\frac{dy}{dx} = 4x

    Attempt:

    \frac{dy}{dx} + \frac{xy^2}{4} = x

    (I tried to get it into the form of \frac{dy}{dx} + p(x)y = q(x) of a first-order linear ode, but in this case the y is y^2)

    I then found e^{P(x)}, where P(x) is an anti-derivative of p(x)

    In this case p(x) = \frac{x}{4} therefore I got e^{P(x)} =e^{\frac{x^2}{8}}

    e^\frac{x^2}{8}\frac{dy}{dx} + \frac{xy^2e^{\frac{x^2}{8}}}{4} = xe^{\frac{x^2}{8}}
    <br />
\frac{d}{dx}(ye^\frac{x^2}{8}) = xe^{\frac{x^2}{8}}

    but this doesnt seem correct
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    It's separable.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Math Engineering Student
    Krizalid's Avatar
    Joined
    Mar 2007
    From
    Santiago, Chile
    Posts
    3,654
    Thanks
    13
    Quote Originally Posted by SyNtHeSiS View Post
    but this doesnt seem correct
    'cause it's not linear.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Apr 2010
    Posts
    156
    Oh ok. How do you know when a differential equation is separable or linear?

    Here is my working out:
    <br />
xy^2 + 4\frac{dy}{dx} = 4x
    \frac{dy}{dx} + \frac{xy^2}{4} = x
    \frac{dy}{dx} = x - \frac{xy^2}{4}
    \frac{dy}{dx} = x(1- \frac{y^2}{4})
    dy = x(1 - \frac{y^2}{4})dx
    \int \frac{1}{(1 - \frac{y^2}{4})}dy = \int x dx
    \int\frac{1}{(1 - \frac{y}{2})(1 + \frac{y}{2})}dy = \frac{1}{2}x^2 + C

    I then used partial fractions to get:

    \int \frac{\frac{1}{2}}{(1 - \frac{y}{2})} + \frac{\frac{1}{2}}{(1 + \frac{y}{2})}dy = \frac{1}{2}x^2 + C

    but this obviously isnt right
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by SyNtHeSiS View Post
    Oh ok. How do you know when a differential equation is separable or linear?

    Here is my working out:
    <br />
xy^2 + 4\frac{dy}{dx} = 4x
    \frac{dy}{dx} + \frac{xy^2}{4} = x
    \frac{dy}{dx} = x - \frac{xy^2}{4}
    \frac{dy}{dx} = x(1- \frac{y^2}{4})
    dy = x(1 - \frac{y^2}{4})dx
    \int \frac{1}{(1 - \frac{y^2}{4})}dy = \int x dx
    \int\frac{1}{(1 - \frac{y}{2})(1 + \frac{y}{2})}dy = \frac{1}{2}x^2 + C

    I then used partial fractions to get:

    \int \frac{\frac{1}{2}}{(1 - \frac{y}{2})} + \frac{\frac{1}{2}}{(1 + \frac{y}{2})}dy = \frac{1}{2}x^2 + C

    but this obviously isnt right Mr F asks: Why so you say that?
    Why not simplify to


    \displaystyle \int \frac{1}{(2 - y)} + \frac{1}{(2 + y)}dy = \frac{1}{2}x^2 + C

    (assuming there are no careless arithmetic errors - I haven't checked closely but it all looks OK).
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Member
    Joined
    Apr 2010
    Posts
    156
    I am not getting the right answer in my book:

    y = -2 or y = 2\frac{1 - ke^{\frac{-x^2}{2}}}{1 +ke^{\frac{-x^2}{2}}}

    From \displaystyle \int \frac{1}{(2 - y)} + \frac{1}{(2 + y)}dy = \frac{1}{2}x^2 + C I got:

    <br />
ln|2 - y| + ln|2 + y| = \frac{1}{2}x^2 + C
    ln|4 - y^2| = \frac{1}{2}x^2 + C
    4 - y^2 = e^{\frac{1}{2}x^2}e^c
    y = \pm\sqrt{4 - Ke^{\frac{1}{2}x^2}}<br />
    Follow Math Help Forum on Facebook and Google+

  7. #7
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    \ln|2 - y| + \ln|2 + y| = \dfrac{1}{2}x^{2} + C
    You have an error in there that might change things. Correction:

    -\ln|2 - y| + \ln|2 + y| = \dfrac{1}{2}x^{2} + C

    What does that give you?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Master Of Puppets
    pickslides's Avatar
    Joined
    Sep 2008
    From
    Melbourne
    Posts
    5,236
    Thanks
    28
    Quote Originally Posted by SyNtHeSiS View Post
    y = \pm\sqrt{4 - Ke^{\frac{1}{2}x^2}}<br />
    Looks good to me. Have you checked the answer works? i.e. taking its first derivative and substituting it back into the original DE.

    Are you looking at the right answer in your book?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Apr 2010
    Posts
    156
    Quote Originally Posted by Ackbeet View Post
    You have an error in there that might change things. Correction:

    -\ln|2 - y| + \ln|2 + y| = \dfrac{1}{2}x^{2} + C

    What does that give you?
    Why is it -\ln|2 - y|? I cant seem to find a minus sign that I overlooked in my working.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Why is it -\ln|2 - y|? I cant seem to find a minus sign that I overlooked in my working.
    Because

    \displaystyle \int \frac{1}{2 - y}\,dy=-\int\frac{1}{y-2}\,dy=-\ln|y-2|+C.

    The logarithm rule only works if the variable of integration is positive in the denominator.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Member
    Joined
    Apr 2010
    Posts
    156
    Quote Originally Posted by Ackbeet View Post
    Because

    \displaystyle \int \frac{1}{2 - y}\,dy=-\int\frac{1}{y-2}\,dy=-\ln|y-2|+C.

    The logarithm rule only works if the variable of integration is positive in the denominator.
    I tried it the long way:

    \int \frac{1}{2 - y}dy

    u = 2 -y
    du = -dy
    dy = -du

    \int -\frac{1}{u}dy
    = -ln|2 - y| + C

    I dont understand why I got a different answer to yours, since my steps seem fine
    Follow Math Help Forum on Facebook and Google+

  12. #12
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Your steps are fine. Your answer is not different from mine, since |y-2| = |2-y|.
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Member
    Joined
    Apr 2010
    Posts
    156
    Oh ok. Using what you said, this is the working I got:

    -\int \frac{1}{(y - 2)} + \frac{1}{(y + 2)} dy = \frac{1}{2}x^2 + C

    -ln|y - 2| + ln|y + 2| = \frac{1}{2}x^2 + C

    ln|\frac{y + 2}{y - 2}| = \frac{1}{2}x^2 + C

    \frac{y + 2}{y -2} = Ke^{\frac{1}{2}x^2}

    y + 2 = (y - 2)Ke^{\frac{1}{2}x^2}

    y(1 - Ke^{\frac{1}{2}x^2}) = -2Ke^{\frac{1}{2}x^2} - 2

    y = \frac{-2Ke^{\frac{1}{2}x^2} - 2}{1 - Ke^{\frac{1}{2}x^2}}

    y = -2\frac{(1 + Ke^{\frac{1}{2}x^2} )}{(1 - Ke^{\frac{1}{2}x^2})}

    but I am still not getting:

    y = 2\frac{1 - ke^{\frac{-x^2}{2}}}{1 +ke^{\frac{-x^2}{2}}}
    Follow Math Help Forum on Facebook and Google+

  14. #14
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Multiply top and bottom by e^{-x^{2}/2}. You're still not going to have the same signs as the answer you're aiming for. But, since k is an arbitrary constant, replace k with -k, and I think you'll get the final answer.
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Member
    Joined
    Apr 2010
    Posts
    156
    y = -2\frac{(Ke^{\frac{1}{2}x^2} -2)}{(1 - Ke^{\frac{1}{2}x^2})}

    = -2\frac{(1 + Ke^{\frac{1}{2}x^2})}{(1 - Ke^{\frac{1}{2}x^2})}

    Multiplying the top and bottom by e^{-\frac{1}{2}x^2} I got:

    =-2\frac{(e^{-\frac{1}{2}x^2} + K)}{(e^{-\frac{1}{2}x^2} - K)}

    If you change the K in the denominator to +K, then the answer is y = -2 (which was one of the solutions), but how else would you manipulate it to get:

    y = 2\frac{(1 - ke^{\frac{-x^2}{2}})}{(1 +ke^{\frac{-x^2}{2}})}
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. First-Order Linear PDE
    Posted in the Differential Equations Forum
    Replies: 0
    Last Post: September 19th 2011, 01:48 AM
  2. Linear program with higher order non-linear constraints.
    Posted in the Advanced Math Topics Forum
    Replies: 2
    Last Post: September 12th 2010, 02:36 AM
  3. 2nd Order Linear O.D.E. Help
    Posted in the Differential Equations Forum
    Replies: 15
    Last Post: October 20th 2008, 12:22 AM
  4. Replies: 4
    Last Post: August 12th 2008, 04:46 AM
  5. Replies: 1
    Last Post: May 11th 2007, 03:01 AM

Search Tags


/mathhelpforum @mathhelpforum