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!

First order separable Equation ODE

  1. Jan 11, 2017 #1
    1. The problem statement, all variables and given/known data
    [tex] \frac{dy}{dx}\:+\:ycosx\:=\:5cosx [/tex]
    I get two solutions for y however only one of them is correct according to my online homework
    (see attempt at solution)

    2. Relevant equations
    y(0) = 7 is initial condition

    3. The attempt at a solution
    [tex]\int \:\frac{1}{5-y}dy\:=\:\int \:cosxdx\:+\:C [/tex]
    [tex] -ln\left|5-7\right|\:=\:sinx\:+C [/tex]
    [tex] \left|5-y\right|\:=\:De^{-sinx}\:where\:D\:=\:e^{-C} [/tex]
    [tex] \left|5-y\right|\:=\:5-y\:,\:if\:5-y\:>\:0\:and\:\left|5-y\right|\:=\:-\left(5-y\right)\:if\:5-y<0 [/tex]
    using initial conditions for both equations
    [tex] y=5\:-De^{-sinx}\:\:and\:\:y\:=\:5+De^{-sinx}[/tex]
    [tex] y=5\:-2e^{-sinx}\:\:and\:\:y\:=\:5+2e^{-sinx} [/tex]

    however the first solution is incorrect I dont understand why
     
    Last edited by a moderator: Jan 11, 2017
  2. jcsd
  3. Jan 11, 2017 #2

    Mark44

    Staff: Mentor

    Did you mean 5 - y above? If you really meant 5 -7, I wouldn't substitute in the initial condition yet.
    I'm not totally clear on what you're doing above. Since y(0) = 7, you can assume that y -7 < 0 for solutions near the initial condition.
     
  4. Jan 11, 2017 #3

    fresh_42

    Staff: Mentor

    Why don't you apply the initial condition on ##\left|5-y\right|\:=\:De^{-sinx}\,##? That gives ##\left|5-y\right|\:=\:2e^{-sinx} > 0##. Now check your signs again.
     
  5. Jan 11, 2017 #4
    Since 2e^−sinx>0 you can drop the absolute sign correct?
    then it becomes
    y=5−2e^−sinx?
     
  6. Jan 11, 2017 #5

    fresh_42

    Staff: Mentor

    No you can't, because inside the absolute sign can still happen both possibilities. Just consider the cases ##y(x) > 5## and ##y(x) \leq 5##.

    Edit: Sorry, I think I made a sign error myself.
     
  7. Jan 11, 2017 #6
    if y(x) > 5 then |y-5| = (y-5)
    and if y(x) <= 5 we get |y-5| = -(y-5) ?
    then we get two solutions that i posted above again? Am i missing something here
     
  8. Jan 11, 2017 #7

    fresh_42

    Staff: Mentor

    Now, that I've seen my sign error, I did what you should do as well with all of these kind of equations: check them by differentiation. (I think you were right in the first place.)
     
  9. Jan 11, 2017 #8
    both solutions work, but my webwork says the first one is wrong
     
  10. Jan 11, 2017 #9

    fresh_42

    Staff: Mentor

    Maybe you've had a typo in your other solution. Or some additional information is hidden somewhere in your text.
     
  11. Jan 11, 2017 #10

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    They satisfy the differential equation, but I do not see how your negative multiplier solution satisfies the initial condition.
     
  12. Jan 11, 2017 #11
    I just noticed this as well. BTW I was just wondering the way I got rid of my absolute values was correct right, regardless of the general problem i stated?
     
  13. Jan 11, 2017 #12

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    I was not quite sure what you did. I would substitute x=0, y=7 with still |y-5| to find D=2. Then you get y=5+/-2e-sin(x), then reuse the initial condition to rule out the -2 case.
     
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: First order separable Equation ODE
  1. First Order ODE (Replies: 11)

Loading...