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

Click For Summary
SUMMARY

The discussion focuses on solving the second-order nonlinear ordinary differential equation represented as k(1 - (yy'')/(y')²) = √(1 + y²) - c, with initial conditions y(0) = 1 and y'(0) = 1. Participants suggest simplifying the equation by substituting variables, specifically letting dy/dx = p and d²y/dx² = p(dp/dy). The solution involves separating variables, integrating, and checking results numerically using Mathematica's NDSolve function. The final implicit solution is expressed as h(y) = t, or y = h⁻¹(t).

PREREQUISITES
  • Understanding of second-order nonlinear ordinary differential equations
  • Familiarity with calculus concepts such as integration and differentiation
  • Experience with variable substitution techniques in differential equations
  • Knowledge of numerical methods and tools like Mathematica for solving initial value problems
NEXT STEPS
  • Explore variable substitution methods in solving differential equations
  • Learn about numerical methods for solving ordinary differential equations using Mathematica
  • Investigate the implications of initial conditions on the solutions of differential equations
  • Study the properties and applications of nonlinear ordinary differential equations in real-world scenarios
USEFUL FOR

Mathematicians, physics students, engineers, and anyone interested in solving complex differential equations or applying numerical methods in calculus.

dimension10
Messages
371
Reaction score
0
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.

\frac{w}{v}(1-\frac{y(x)y''(x)}{{y'(x)}^{2}})=\sqrt{1+{y(x)}^{2}}-\sqrt{1+{C}^{2}}

Thanks.
 
Physics news on Phys.org
dimension10 said:
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.

\frac{w}{v}(1-\frac{y(x)y''(x)}{{y'(x)}^{2}})=\sqrt{1+{y(x)}^{2}}-\sqrt{1+{C}^{2}}

Thanks.

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:

k\left(1-\frac{yy''}{(y')^2}\right)=\sqrt{1+y^2}-c

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

\frac{dy}{dx}=p
\frac{d^2y}{dx^2}=p\frac{dp}{dy}

Now, make all those substitutions, solve it for p in terms of y, and then integrate one more time.
 
Last edited:
jackmell said:
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:

k\left(1-\frac{yy''}{(y')^2}\right)=\sqrt{1+y^2}-c

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

\frac{dy}{dx}=p
\frac{d^2y}{dx^2}=p\frac{dp}{dy}

Now, make all those substitutions, solve it for p in terms of y, and then integrate one more time.

But I tried that and got

p=\int {(\frac{dy}{dx})}^{2}(\frac{c-\sqrt{1+{y}^{2}}}{k}+1)dxwhich is equivalent to

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

but I have no idea how to solve that...
 
Let's solve this one:

k\left(1-\frac{yy''}{(y')^2}\right)=\sqrt{1+y^2}-c,\quad y(0)=1,\quad y'(0)=1
Letting:

\frac{dy}{dt}=p,\quad \frac{d^2y}{dy^2}=p\frac{dp}{dy}

then:

k\left(1-\frac{ypp'}{p^2}\right)=\sqrt{1+y^2}-c

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

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

k\log(y')=\left(u\log(y)+\log(1+\sqrt{1+y^2})-\log(y)-\sqrt{1+y^2}\right)-k2

so that:

<br /> \begin{align*}<br /> \frac{dy}{dt}&amp;=\exp\left\{\frac{1}{k}\biggr[u\log(y)+\log(1+\sqrt{1+y^2}-\log(y)-\sqrt{1+y^2}-k2\biggr]\right\}\\<br /> &amp;=e^{f(y)}<br /> \end{align*}<br />

then we integrate again:

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

to obtain the implicit answer:

h(y)=t

or:

y=h^{-1}(t)

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:
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:
jackmell said:
Let's solve this one:

k\left(1-\frac{yy&#039;&#039;}{(y&#039;)^2}\right)=\sqrt{1+y^2}-c,\quad y(0)=1,\quad y&#039;(0)=1
Letting:

\frac{dy}{dt}=p,\quad \frac{d^2y}{dy^2}=p\frac{dp}{dy}

then:

k\left(1-\frac{ypp&#039;}{p^2}\right)=\sqrt{1+y^2}-c

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

\int_{1}^{y&#039;} k\frac{dp}{p}=\int_0^y \frac{u-\sqrt{1+y^2}}{y}dy

k\log(y&#039;)=\left(u\log(y)+\log(1+\sqrt{1+y^2})-\log(y)-\sqrt{1+y^2}\right)-k2

so that:

<br /> \begin{align*}<br /> \frac{dy}{dt}&amp;=\exp\left\{\frac{1}{k}\biggr[u\log(y)+\log(1+\sqrt{1+y^2}-\log(y)-\sqrt{1+y^2}-k2\biggr]\right\}\\<br /> &amp;=e^{f(y)}<br /> \end{align*}<br />

then we integrate again:

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

to obtain the implicit answer:

h(y)=t

or:

y=h^{-1}(t)

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:
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.

Thanks.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K