2.1.87 problem 86

Solved as second order nonlinear exact ode
Solved as second order integrable as is ode (ABC method)
Maple step by step solution
Maple trace
Maple dsolve solution
Mathematica DSolve solution

Internal problem ID [8225]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 86
Date solved : Sunday, November 10, 2024 at 03:27:39 AM
CAS classification : [[_2nd_order, _exact, _nonlinear], [_2nd_order, _with_linear_symmetries], [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_y_y1], [_2nd_order, _reducible, _mu_xy]]

Solve

\begin{align*} y^{\prime \prime }&=\frac {1}{y}-\frac {x y^{\prime }}{y^{2}} \end{align*}

Solved as second order nonlinear exact ode

Time used: 33.988 (sec)

An exact non-linear second order ode has the form

\begin{align*} a_{2} \left (x , y, y^{\prime }\right ) y^{\prime \prime }+a_{1} \left (x , y, y^{\prime }\right ) y^{\prime }+a_{0} \left (x , y, y^{\prime }\right )&=0 \end{align*}

Where the following conditions are satisfied

\begin{align*} \frac {\partial a_2}{\partial y} &= \frac {\partial a_1}{\partial y'}\\ \frac {\partial a_2}{\partial x} &= \frac {\partial a_0}{\partial y'}\\ \frac {\partial a_1}{\partial x} &= \frac {\partial a_0}{\partial y} \end{align*}

Looking at the the ode given we see that

\begin{align*} a_2 &= 1\\ a_1 &= \frac {x}{y^{2}}\\ a_0 &= -\frac {1}{y} \end{align*}

Applying the conditions to the above shows this is a nonlinear exact second order ode. Therefore it can be reduced to first order ode given by

\begin{align*} \int {a_2\,d y'} + \int {a_1\,d y} + \int {a_0\,d x} &= c_1 \\ \int {1\,d y'} + \int {\frac {x}{y^{2}}\,d y} + \int {-\frac {1}{y}\,d x} &= c_1 \\ \end{align*}

Which results in

\[ y^{\prime }-\frac {x}{y} = c_1 \]

Which is now solved.

In canonical form, the ODE is

\begin{align*} y' &= F(x,y)\\ &= \frac {c_1 y +x}{y}\tag {1} \end{align*}

An ode of the form \(y' = \frac {M(x,y)}{N(x,y)}\) is called homogeneous if the functions \(M(x,y)\) and \(N(x,y)\) are both homogeneous functions and of the same order. Recall that a function \(f(x,y)\) is homogeneous of order \(n\) if

\[ f(t^n x, t^n y)= t^n f(x,y) \]

In this case, it can be seen that both \(M=c_1 y +x\) and \(N=y\) are both homogeneous and of the same order \(n=1\). Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution \(u=\frac {y}{x}\), or \(y=ux\). Hence

\[ \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u \]

Applying the transformation \(y=ux\) to the above ODE in (1) gives

\begin{align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u &= c_1 +\frac {1}{u}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {c_1 +\frac {1}{u \left (x \right )}-u \left (x \right )}{x} \end{align*}

Or

\[ u^{\prime }\left (x \right )-\frac {c_1 +\frac {1}{u \left (x \right )}-u \left (x \right )}{x} = 0 \]

Or

\[ u^{\prime }\left (x \right ) u \left (x \right ) x +u \left (x \right )^{2}-c_1 u \left (x \right )-1 = 0 \]

Which is now solved as separable in \(u \left (x \right )\).

The ode \(u^{\prime }\left (x \right ) = -\frac {u \left (x \right )^{2}-c_1 u \left (x \right )-1}{u \left (x \right ) x}\) is separable as it can be written as

\begin{align*} u^{\prime }\left (x \right )&= -\frac {u \left (x \right )^{2}-c_1 u \left (x \right )-1}{u \left (x \right ) x}\\ &= f(x) g(u) \end{align*}

Where

\begin{align*} f(x) &= -\frac {1}{x}\\ g(u) &= \frac {-c_1 u +u^{2}-1}{u} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(u)} \,du} &= \int { f(x) \,dx}\\ \int { \frac {u}{-c_1 u +u^{2}-1}\,du} &= \int { -\frac {1}{x} \,dx}\\ \frac {\ln \left (u \left (x \right )^{2}-c_1 u \left (x \right )-1\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {-2 u \left (x \right )+c_1}{\sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}}&=\ln \left (\frac {1}{x}\right )+c_2 \end{align*}

We now need to find the singular solutions, these are found by finding for what values \(g(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or \(\frac {-c_1 u +u^{2}-1}{u}=0\) for \(u \left (x \right )\) gives

\begin{align*} u \left (x \right )&=\frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\\ u \left (x \right )&=\frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2} \end{align*}

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

\begin{align*} \frac {\ln \left (u \left (x \right )^{2}-c_1 u \left (x \right )-1\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {-2 u \left (x \right )+c_1}{\sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} = \ln \left (\frac {1}{x}\right )+c_2\\ u \left (x \right ) = \frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\\ u \left (x \right ) = \frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2} \end{align*}

Converting \(\frac {\ln \left (u \left (x \right )^{2}-c_1 u \left (x \right )-1\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {-2 u \left (x \right )+c_1}{\sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} = \ln \left (\frac {1}{x}\right )+c_2\) back to \(y\) gives

\begin{align*} \frac {\ln \left (\frac {-c_1 y x +y^{2}-x^{2}}{x^{2}}\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {c_1 x -2 y}{x \sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} = \ln \left (\frac {1}{x}\right )+c_2 \end{align*}

Converting \(u \left (x \right ) = \frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\) back to \(y\) gives

\begin{align*} y = x \left (\frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\right ) \end{align*}

Converting \(u \left (x \right ) = \frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2}\) back to \(y\) gives

\begin{align*} y = x \left (\frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2}\right ) \end{align*}

Will add steps showing solving for IC soon.

Summary of solutions found

\begin{align*} \frac {\ln \left (\frac {-c_1 y x +y^{2}-x^{2}}{x^{2}}\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {c_1 x -2 y}{x \sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} &= \ln \left (\frac {1}{x}\right )+c_2 \\ y &= x \left (\frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\right ) \\ y &= x \left (\frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2}\right ) \\ \end{align*}

Solved as second order integrable as is ode (ABC method)

Time used: 34.468 (sec)

Writing the ode as

\[ y^{\prime \prime }-\frac {1}{y}+\frac {x y^{\prime }}{y^{2}} = 0 \]

Integrating both sides of the ODE w.r.t \(x\) gives

\begin{align*} \int \left (y^{\prime \prime }-\frac {1}{y}+\frac {x y^{\prime }}{y^{2}}\right )d x &= 0 \\ y^{\prime }-\frac {x}{y} = c_1 \end{align*}

Which is now solved for \(y\). In canonical form, the ODE is

\begin{align*} y' &= F(x,y)\\ &= \frac {c_1 y +x}{y}\tag {1} \end{align*}

An ode of the form \(y' = \frac {M(x,y)}{N(x,y)}\) is called homogeneous if the functions \(M(x,y)\) and \(N(x,y)\) are both homogeneous functions and of the same order. Recall that a function \(f(x,y)\) is homogeneous of order \(n\) if

\[ f(t^n x, t^n y)= t^n f(x,y) \]

In this case, it can be seen that both \(M=c_1 y +x\) and \(N=y\) are both homogeneous and of the same order \(n=1\). Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution \(u=\frac {y}{x}\), or \(y=ux\). Hence

\[ \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u \]

Applying the transformation \(y=ux\) to the above ODE in (1) gives

\begin{align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u &= c_1 +\frac {1}{u}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {c_1 +\frac {1}{u \left (x \right )}-u \left (x \right )}{x} \end{align*}

Or

\[ u^{\prime }\left (x \right )-\frac {c_1 +\frac {1}{u \left (x \right )}-u \left (x \right )}{x} = 0 \]

Or

\[ u^{\prime }\left (x \right ) u \left (x \right ) x +u \left (x \right )^{2}-c_1 u \left (x \right )-1 = 0 \]

Which is now solved as separable in \(u \left (x \right )\).

The ode \(u^{\prime }\left (x \right ) = -\frac {u \left (x \right )^{2}-c_1 u \left (x \right )-1}{u \left (x \right ) x}\) is separable as it can be written as

\begin{align*} u^{\prime }\left (x \right )&= -\frac {u \left (x \right )^{2}-c_1 u \left (x \right )-1}{u \left (x \right ) x}\\ &= f(x) g(u) \end{align*}

Where

\begin{align*} f(x) &= -\frac {1}{x}\\ g(u) &= \frac {-c_1 u +u^{2}-1}{u} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(u)} \,du} &= \int { f(x) \,dx}\\ \int { \frac {u}{-c_1 u +u^{2}-1}\,du} &= \int { -\frac {1}{x} \,dx}\\ \frac {\ln \left (u \left (x \right )^{2}-c_1 u \left (x \right )-1\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {-2 u \left (x \right )+c_1}{\sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}}&=\ln \left (\frac {1}{x}\right )+c_2 \end{align*}

We now need to find the singular solutions, these are found by finding for what values \(g(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or \(\frac {-c_1 u +u^{2}-1}{u}=0\) for \(u \left (x \right )\) gives

\begin{align*} u \left (x \right )&=\frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\\ u \left (x \right )&=\frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2} \end{align*}

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

\begin{align*} \frac {\ln \left (u \left (x \right )^{2}-c_1 u \left (x \right )-1\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {-2 u \left (x \right )+c_1}{\sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} = \ln \left (\frac {1}{x}\right )+c_2\\ u \left (x \right ) = \frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\\ u \left (x \right ) = \frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2} \end{align*}

Converting \(\frac {\ln \left (u \left (x \right )^{2}-c_1 u \left (x \right )-1\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {-2 u \left (x \right )+c_1}{\sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} = \ln \left (\frac {1}{x}\right )+c_2\) back to \(y\) gives

\begin{align*} \frac {\ln \left (\frac {-c_1 y x +y^{2}-x^{2}}{x^{2}}\right )}{2}+\frac {c_1 \,\operatorname {arctanh}\left (\frac {c_1 x -2 y}{x \sqrt {c_1^{2}+4}}\right )}{\sqrt {c_1^{2}+4}} = \ln \left (\frac {1}{x}\right )+c_2 \end{align*}

Converting \(u \left (x \right ) = \frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\) back to \(y\) gives

\begin{align*} y = x \left (\frac {c_1}{2}-\frac {\sqrt {c_1^{2}+4}}{2}\right ) \end{align*}

Converting \(u \left (x \right ) = \frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2}\) back to \(y\) gives

\begin{align*} y = x \left (\frac {c_1}{2}+\frac {\sqrt {c_1^{2}+4}}{2}\right ) \end{align*}

Will add steps showing solving for IC soon.

Maple step by step solution

Maple trace
`Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
trying 2nd order WeierstrassP 
trying 2nd order JacobiSN 
differential order: 2; trying a linearization to 3rd order 
trying 2nd order ODE linearizable_by_differentiation 
trying 2nd order, 2 integrating factors of the form mu(x,y) 
trying differential order: 2; missing variables 
-> trying 2nd order, dynamical_symmetries, fully reducible to Abel through one integrating factor of the form G(x,y)/(1+H(x,y)*y)^2 
   --- trying a change of variables {x -> y(x), y(x) -> x} and re-entering methods for dynamical symmetries --- 
   -> trying 2nd order, dynamical_symmetries, fully reducible to Abel through one integrating factor of the form G(x,y)/(1+H(x,y)*y) 
trying 2nd order, integrating factors of the form mu(x,y)/(y)^n, only the singular cases 
trying symmetries linear in x and y(x) 
trying differential order: 2; exact nonlinear 
-> Calling odsolve with the ODE`, diff(_b(_a), _a) = -(_b(_a)*c__1-_a)/_b(_a), _b(_a)`   *** Sublevel 2 *** 
   Methods for first order ODEs: 
   --- Trying classification methods --- 
   trying a quadrature 
   trying 1st order linear 
   trying Bernoulli 
   trying separable 
   trying inverse linear 
   trying homogeneous types: 
   trying homogeneous D 
   <- homogeneous successful 
<- differential order: 2; exact nonlinear successful`
 
Maple dsolve solution

Solving time : 0.049 (sec)
Leaf size : 56

dsolve(diff(diff(y(x),x),x) = 1/y(x)-x/y(x)^2*diff(y(x),x), 
       y(x),singsol=all)
 
\[ y = \operatorname {RootOf}\left (\textit {\_Z}^{2}-{\mathrm e}^{\operatorname {RootOf}\left (\left (4 \,{\mathrm e}^{\textit {\_Z}} {\cosh \left (\frac {\sqrt {c_{1}^{2}+4}\, \left (2 c_{2} +\textit {\_Z} +2 \ln \left (x \right )\right )}{2 c_{1}}\right )}^{2}+c_{1}^{2}+4\right ) x^{2}\right )}-1+\textit {\_Z} c_{1} \right ) x \]
Mathematica DSolve solution

Solving time : 0.212 (sec)
Leaf size : 77

DSolve[{D[y[x],{x,2}]==1/y[x]-x/y[x]^2*D[y[x],x],{}}, 
       y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{2} \log \left (-\frac {y(x)^2}{x^2}-\frac {c_1 y(x)}{x}+1\right )-\frac {c_1 \arctan \left (\frac {\frac {2 y(x)}{x}+c_1}{\sqrt {-4-c_1{}^2}}\right )}{\sqrt {-4-c_1{}^2}}=-\log (x)+c_2,y(x)\right ] \]