Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

First attempt at Diff Eq

  1. Apr 12, 2005 #1
    This is probably too hard to be the first problem I try for diff eq. I'm trying to learn this stuff. Question, whats the difference between a homogenous and nonhomogenous one? What problem does this pose in solving the problem?

    I wanna try this one (jacked from Naeem's post, but I posted separately to avoid hijacking), but I know itll be wrong so here goes:

    [tex]y \ dx + (2x - ye^y) \ dy = 0[/tex]

    [tex] M(x)dx + N(y)dy = 0 [/tex]

    [tex] M(x) = y \mbox{ and } N(y) = 2x - ye^y [/tex]

    So then [itex] M_y = 1 \mbox{ and } N_x = 2 [/tex]

    We need them to be the same ( why? ) so we need some factor [itex] \mu[/tex] that will make the partial derivatives [itex] M_y = N_x[/itex].

    So I'm going on a limb here:

    [tex] M(x)_y\mu = N(y)_x\mu [/tex]

    [tex] \int{M(x)_y\mu}{dy} = \int{N(y)_x\mu}{dx} [/tex]

    [tex] \int{y\mu}{dy} = \int{(2x-ye^y)\mu}{dx} [/tex]

    Im stuck here, but I thought of this, will it work?

    [tex]y \ dx + (2x - ye^y) \ dy = 0[/tex]

    [tex](2x - ye^y) \ dy = -ydx[/tex]

    [tex] \ dy = \frac{-ydx}{(2x - ye^y)}[/tex]

    [tex] \int dy = \int \frac{y}{2x-ye^y}dx [/tex]

    [tex] y = y\int{\frac{1}{2x-ye^y}dx[/tex]

    [tex] u = 2x-ye^y \mbox{ and } du = 2 dx [/tex]

    [tex] y = \frac{y}{2}\int{1/u}{du} [/tex]

    [tex]y = \frac{ln(2x-ye^y)}{2} [/tex]

    I messed something up pretty bad, obviously my second idea didnt work. Can someone look over my first attempt and tell me how to continue? Do I treat mu as a function of x? y? both? cosntant?
  2. jcsd
  3. Apr 12, 2005 #2


    User Avatar
    Science Advisor
    Homework Helper

    Nope,u can't integrate the way you did.I believe i solved this equation thrugh other method than finding an integating factor...

  4. Apr 12, 2005 #3
    Well I dont know ANY methods, can you tell me its name?
    What exactly is the reason I cant integrate like that? Did I make amistake, or is the whole setup bad?

    I tried the integrating factor because of what Data said in the post, and because I read an overview of it yesterday (as you know).
  5. Apr 12, 2005 #4


    User Avatar
    Science Advisor
    Homework Helper

    U cannot integrate like u did,because the variables are not completely separated.In the RHS,u should integrate wrt "x" a function depending only of x .

  6. Apr 12, 2005 #5
    Is it possible in this problem to satisfy that requirement?

    Also, What do I do to find mu in my first attempt?
  7. Apr 12, 2005 #6


    User Avatar
    Science Advisor
    Homework Helper


    Please, allow me to make a kind suggestion: Get a good differential equations book and start doing the problems starting from the first page. Don't jump to equations since the theory is build up. Start with the easy ones, the techniques you learn there are the foundations for the more involved ones. Personally, I feel one needs to work all the problems in one section before going to the next section. Don't jump around in the problem set. If you want to work on #10, do the first 9 first. I used Rainville and Bedient in school and found it easy to follow. We can help you here too.
  8. Apr 12, 2005 #7
    Well I read the first two pages of the Diff Eq guide stickied here, and the first page seemed like cake, and they introduce integrating factors in the second. I agree with you, but I want to do this more on the side than commit to it (thats just the way I am, I know its a terrible idea).

    Is this that far into diff eq theory? Should I step back a bit?
  9. Apr 12, 2005 #8


    User Avatar
    Science Advisor
    Homework Helper

    No. It's not far but it takes lots (usually) of practice to get good with math and that practice is most effectively performed in an orderly progression from simple to advanced: Solving one or two problems of a specific type is not enough. Techniques are learned working with other problems of the same type. You'll miss out on this valuable resource if you just do a few problems like this and a few like that.
  10. Apr 13, 2005 #9
    Alright then. i stepped back.

    successfully completed:

    [tex]y' + 2y = 3[/tex]

    [tex]y' + (1/2)y = 2 + t[/tex]

    did this one, but I'm not sure if its right:

    [tex] 1.) y' + 3y = t + e^{-2t} [/tex] from ExtravagantDream's guide to diff eq.

    Here goes:

    [tex] p(t) = 3, g(t) = t+e^{-2t}, \mu(t) = e^{\int p(t)dt} = e^{3t} [/tex]

    [tex] e^{3t}y' + 3ye^{3t} = (t+e^{-2t})(e^{3t}) [/tex]
    Left is the derivative of [itex]y(t)e^{3t}[/tex]. When we integrate both sides we'll get:

    [tex] y(t)e^{3t} = e^t + \int{te^{3t}dt [/tex]

    I did this by parts with [itex]u = t, du = dt, v = e^{3t}/3, dv = e^{3t}[/itex] and got:

    [tex] e^{3t}y(t) = e^t+\frac{e^{3t}}{3} ( t-\frac{1}{3} )[/tex]

    Dividing through

    [tex] y(t) = e^{-2t} - (1/9) + \frac{t}{3} + ce^{-3t} [/tex]
  11. Apr 13, 2005 #10
    #3) Same thing

    [tex] t^3\frac{dy}{dt} + 4t^2y = e^{-t} [/tex]

    [tex] \frac{dy}{dt} + \frac{4y}{t} = e^{-t}t^{-3} [/tex]

    [tex] \mu(t) = e^{\int p(t) dt} = e^{\int{\frac{4}{t}}dt} = e^{4ln(t)} = t^4 [/tex]

    [tex] t^4\frac{dy}{dt} + 4t^3y = te^{-t} [/tex]

    LHS is the derivative of [itex] y(t)t^4 [/itex] so aftre integrating:

    [tex] y(t)t^4 = \int{te^{-t}}{dt} [/tex]

    [tex] u = t, du = dt, v = -e^{-t}, dv = e^{-t}dt [/tex]

    [tex] y(t)t^4 = \frac{-t}{e^t} - \int{-e^{-t}}{dt} [/tex]

    [tex] y(t)t^4 = \frac{-t}{e^t} - e^{-t}[/tex]

    [tex] y(t) = \frac{-1}{e^tt^3} - \frac{1}{e^tt^4} = \frac{-1}{e^tt^3}(1+\frac{1}{t})[/tex]
  12. Apr 13, 2005 #11


    User Avatar
    Science Advisor
    Homework Helper

    The last integration, you didn't include a constant of integration. That changes the results. After the last integration, it should be:




    Sometimes it's a good idea to back-substitute the solution into the ODE to check it (I didn't above) but if you have a math package, that's easy.

    Everything else looks ok to me. Also, there's something about dividing by zero above, or [itex]x^3[/itex]. The solution has a singularity there. I think it's a good idea to routinely plot the solutions to obtain a visual result that you can check against the ODE. The solution will often support assumptions, suspicions, other conclusions drawn during the analysis.
  13. Apr 13, 2005 #12
    Did you mean

    [tex]y(t)=-\frac{1}{t^3e^t}-\frac{1}{t^4e^t}+Kt^{-4}[/tex] ? the last term.

    Since I am dividing by t^4, there would be a singularity at t=0, how do I go about this? Avoid it? Separate the intervals?
  14. Apr 13, 2005 #13


    User Avatar
    Science Advisor
    Homework Helper

    Yes, I'm sorry. I do like to be as precise as possible with my math. Anyway, the singularity is exhibited as an asymptote at x=0. See attached plot. Don't avoid the singularities; it's part of the overall behavior of the solution. Learn to become comfortable with things like this.

    Oh yea, for the plot I just let K=1. It's a good idea, if you want to study the solutions, just let the various constants be 0 or 1 or something else that's simple.

    Attached Files:

    Last edited: Apr 13, 2005
  15. Apr 13, 2005 #14
    I understand, but I'm not sure how to interpret you telling me there was a singularity. Is there anything wrong with this? Or is my solution to the DE correct? What does the singularity mean over all? I know what one is so I dont need that, but does it mean something as a DE solution

    I'm very comfortable with singularities :D
  16. Apr 13, 2005 #15


    User Avatar
    Science Advisor
    Homework Helper

    Hum . . . a singularity. I don't think I can give a rigorous definition. Perhaps someone here can. My understanding is that a "qualitative" change occurred, from continuous to discontinuous, from finite slope to infinite slope. Also, a point is called singular when the coefficient in front of the highest derivative is zero there (as in 3 above). With non-linear equations, solutions which are not part of the general solution are called "singular solutions".
  17. Apr 13, 2005 #16
    Ok, did a few more:

    Successfully completed:

    [tex] \frac{dy}{dx} = \frac{x^2}{1-y^2} \textit{ to be } y-\frac{y^3}{3} = \frac{x^3}{3}+c [/tex] Should I solve this? Does it really make a difference?

    [tex] \frac{dy}{dt} = \frac{ycos(t)}{1+2y^2} \textit{ to be } lny+y^2 = sin(t)+c [/tex]

    [tex]\frac{dy}{dx} = \frac{x^2}{y} \textit{ to be } y=\sqrt{2x^3/3+c} [/tex]

    These I'm not sure:

    [tex] xdx + ye^{-x}dy = 0, y(0) = 1 [/tex]

    [tex] x+ye^{-x}\frac{dy}{dx} = 0 [/tex]

    [tex] ydy = -xe^xdx [/tex]

    [tex] \frac{y^2}{2} = -\int{xe^x}dx [/tex]

    [tex] u = x, du = dx, v = e^x, dv = e^xdx[/tex]

    [tex]\frac{y^2}{2} = -(xe^x-e^x+c) = e^x(1-x)+c [/tex]

    [tex]y = \sqrt{2e^x(1-x)+c} [/tex]

    [tex] 1 = \sqrt{2e^0(1-0)+c} = \sqrt{(2(1)+c} [/tex]

    [tex] 1 = c+2, c=-1 [/tex]

    [tex] y=\sqrt{2e^x(1-x)-1} [/tex]

    And last one

    [tex] y^2(1+x^2)^{\frac{1}{2}} +arcsin(x)dx [/tex]

    I assumed it was equal to 0, so I solved as well as I could:

    [tex] y^2 = \frac{-arcsin(x)dx}{(1+x^2)^{\frac{1}{2}}} [/tex]

    Theres a dy missing, I don't think I can just drop one in there from nowhere, and I couldnt see any ways to induce one into the equation. If I multiplied through by dy, I could integrate both sides, the RHS with an iterated integral by Fubini's thm, but I thought that was a stretch for this kind of problem.

    Either way, the integration of the RHS doesnt look easy. Can someone give me some feedback? Thanks alot.
    Last edited: Apr 13, 2005
  18. Apr 14, 2005 #17
    Can anyone look at these? I showed the last one to a friend of mine and he said that it isnt even a DE.
  19. Apr 15, 2005 #18


    User Avatar
    Science Advisor
    Homework Helper

    In case it was a typo and the "dy" was missing,then u can be sure that

    [tex] \int \frac{\arcsin x}{\sqrt{1+x^{2}}} \ dx [/tex] is given by the following picture


    Attached Files:

  20. Apr 15, 2005 #19
    Is it then safe to assume that that wasnt the intended problem? I don't think a textbook would assign a problem with that solution when introducing DE.
  21. Apr 15, 2005 #20


    User Avatar
    Science Advisor
    Homework Helper


Share this great discussion with others via Reddit, Google+, Twitter, or Facebook