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

How to solve this second-order nonlinear ordinary differential equation?

  1. Sep 14, 2011 #1
    I was trying to solve a calculus problem (about the equation of the curve traced by a dog chasing a postman) and I came across the following equation. I would like to know how to solve it.


  2. jcsd
  3. Sep 14, 2011 #2
    You have got to remove all that clutter. It just makes it way more confussing. And what's with all those extra letters. Need to absorb them into one another for now. How about start with writing it as:


    See what I mean?
    Now, itsn't that an equation with the independent variable missing? You know the kind where you let:


    Now, make all those substitutions, solve it for p in terms of y, and then integrate one more time.
    Last edited: Sep 14, 2011
  4. Sep 15, 2011 #3
    But I tried that and got

    [tex]p=\int {(\frac{dy}{dx})}^{2}(\frac{c-\sqrt{1+{y}^{2}}}{k}+1)dx[/tex]

    which is equivalent to

    [tex]y=\int \int {(\frac{dy}{dx})}^{2}(\frac{c-\sqrt{1+{y}^{2}}}{k}+1)dx\; dx[/tex]

    but I have no idea how to solve that...
  5. Sep 15, 2011 #4
    Let's solve this one:

    [tex]k\left(1-\frac{yy''}{(y')^2}\right)=\sqrt{1+y^2}-c,\quad y(0)=1,\quad y'(0)=1[/tex]

    [tex]\frac{dy}{dt}=p,\quad \frac{d^2y}{dy^2}=p\frac{dp}{dy}[/tex]



    at this point, separate the variables first, then let [itex]u=k+c[/itex] and then integrate to obtain:

    [tex]\int_{1}^{y'} k\frac{dp}{p}=\int_0^y \frac{u-\sqrt{1+y^2}}{y}dy[/tex]


    so that:


    then we integrate again:

    [tex]\int_{1}^{y} e^{-f(y)}dy=\int_0^t dt[/tex]

    to obtain the implicit answer:




    Now, ain't that beautiful or what?

    and we can check this numerically in Mathematica by first solving the IVP numerically, then integrate our analytic solution numerically and compare the two. Note in the Table command below, I implicitly "invert" the function h(y) by reversing the calculated values {t(y),y}:

    Code (Text):
    w = 0.5;
    v = 1.7;
    k = w/v;
    c2 = 1.5;
    c = Sqrt[1 + c2^2];
    y0 = 1;
    y1 = 1;
    u = k + c;
    k2 = Log[1 + Sqrt[2]] - Sqrt[2]

    mysol = NDSolve[{k*(1 - (y[t]*Derivative[2][y][t])/Derivative[1][y][t]^2) == Sqrt[1 + y[t]^2] - c,
        y[0] == y0, Derivative[1][y][0] == y1}, y, {t, 0, 5}]

    p1 = Plot[y[t] /. mysol, {t, 0, 5}, PlotStyle -> Red]

    f[y_] := Exp[(-k^(-1))*(u*Log[y] + Log[1 + Sqrt[1 + y^2]] - Log[y] - Sqrt[1 + y^2] - k2)]

    myt[y_] := NIntegrate[f[s], {s, y0, y}]

    mysol = Table[{myt[y], y}, {y, y0, 5, 0.1}];

    p2 = ListPlot[mysol, Joined -> True, PlotStyle -> Blue]
    Show[{p1, p2}]
    There may however be a better way to solve this.
    Last edited: Sep 15, 2011
  6. Sep 16, 2011 #5
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook