1.87 problem 86

1.87.1 Solved as second order nonlinear exact ode
1.87.2 Solved as second order integrable as is ode (ABC method)
1.87.3 Maple step by step solution
1.87.4 Maple trace
1.87.5 Maple dsolve solution
1.87.6 Mathematica DSolve solution

Internal problem ID [7779]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 86
Date solved : Monday, October 21, 2024 at 04:19:10 PM
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*}

1.87.1 Solved as second order nonlinear exact ode

Time used: 34.024 (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.

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

Time used: 34.048 (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.

1.87.3 Maple step by step solution

1.87.4 Maple trace
Methods for second order ODEs:
 
1.87.5 Maple dsolve solution

Solving time : 0.021 (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 (x^{2} \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 )\right )}-1+c_1 \textit {\_Z} \right ) x \]
1.87.6 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 ] \]