2.1.23 Problem 24

2.1.23.1 Solved using first_order_ode_homog_type_G
2.1.23.2 Solved using first_order_ode_parametric method
2.1.23.3 Maple
2.1.23.4 Mathematica
2.1.23.5 Sympy

Internal problem ID [10009]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 24
Date solved : Monday, December 08, 2025 at 07:03:40 PM
CAS classification : [_separable]

2.1.23.1 Solved using first_order_ode_homog_type_G

0.155 (sec)

Entering first order ode homog type G solver

\begin{align*} y&=y^{\prime } x +x^{2} {y^{\prime }}^{2} \\ \end{align*}
Multiplying the right side of the ode, which is \(\frac {-\frac {1}{2}+\frac {\sqrt {1+4 y}}{2}}{x}\) by \(\frac {x}{y}\) gives
\begin{align*} y^{\prime } &= \left (\frac {x}{y}\right ) \frac {-\frac {1}{2}+\frac {\sqrt {1+4 y}}{2}}{x}\\ &= \frac {-1+\sqrt {1+4 y}}{2 y}\\ &= F(x,y) \end{align*}

Since \(F \left (x , y\right )\) has \(y\), then let

\begin{align*} f_x&= x \left (\frac {\partial }{\partial x}F \left (x , y\right )\right )\\ &= 0\\ f_y&= y \left (\frac {\partial }{\partial y}F \left (x , y\right )\right )\\ &= \frac {-1-2 y +\sqrt {1+4 y}}{2 \sqrt {1+4 y}\, y}\\ \alpha &= \frac {f_x}{f_y} \\ &=0 \end{align*}

Since \(\alpha \) is independent of \(x,y\) then this is Homogeneous type G.

Let

\begin{align*} y&=\frac {z}{x^ \alpha }\\ &=\frac {z}{1} \end{align*}

Substituting the above back into \(F(x,y)\) gives

\begin{align*} F \left (z \right ) &=\frac {-1+\sqrt {1+4 z}}{2 z} \end{align*}

We see that \(F \left (z \right )\) does not depend on \(x\) nor on \(y\). If this was not the case, then this method will not work.

Therefore, the implicit solution is given by

\begin{align*} \ln \left (x \right )- c_1 - \int ^{y x^\alpha } \frac {1}{z \left (\alpha + F(z)\right ) } \,dz & = 0 \end{align*}

Which gives

\[ \ln \left (x \right )-c_1 +\int _{}^{y}-\frac {2}{-1+\sqrt {1+4 z}}d z = 0 \]
Multiplying the right side of the ode, which is \(\frac {-\frac {1}{2}-\frac {\sqrt {1+4 y}}{2}}{x}\) by \(\frac {x}{y}\) gives
\begin{align*} y^{\prime } &= \left (\frac {x}{y}\right ) \frac {-\frac {1}{2}-\frac {\sqrt {1+4 y}}{2}}{x}\\ &= -\frac {1+\sqrt {1+4 y}}{2 y}\\ &= F(x,y) \end{align*}

Since \(F \left (x , y\right )\) has \(y\), then let

\begin{align*} f_x&= x \left (\frac {\partial }{\partial x}F \left (x , y\right )\right )\\ &= 0\\ f_y&= y \left (\frac {\partial }{\partial y}F \left (x , y\right )\right )\\ &= \frac {1+2 y +\sqrt {1+4 y}}{2 y \sqrt {1+4 y}}\\ \alpha &= \frac {f_x}{f_y} \\ &=0 \end{align*}

Since \(\alpha \) is independent of \(x,y\) then this is Homogeneous type G.

Let

\begin{align*} y&=\frac {z}{x^ \alpha }\\ &=\frac {z}{1} \end{align*}

Substituting the above back into \(F(x,y)\) gives

\begin{align*} F \left (z \right ) &=-\frac {1+\sqrt {1+4 z}}{2 z} \end{align*}

We see that \(F \left (z \right )\) does not depend on \(x\) nor on \(y\). If this was not the case, then this method will not work.

Therefore, the implicit solution is given by

\begin{align*} \ln \left (x \right )- c_1 - \int ^{y x^\alpha } \frac {1}{z \left (\alpha + F(z)\right ) } \,dz & = 0 \end{align*}

Which gives

\[ \ln \left (x \right )-c_2 +\int _{}^{y}\frac {2}{1+\sqrt {1+4 z}}d z = 0 \]

Summary of solutions found

\begin{align*} \ln \left (x \right )-c_1 +\int _{}^{y}-\frac {2}{-1+\sqrt {1+4 z}}d z &= 0 \\ \ln \left (x \right )-c_2 +\int _{}^{y}\frac {2}{1+\sqrt {1+4 z}}d z &= 0 \\ \end{align*}
2.1.23.2 Solved using first_order_ode_parametric method

1.114 (sec)

Entering first order ode parametric solver

\begin{align*} y&=y^{\prime } x +x^{2} {y^{\prime }}^{2} \\ \end{align*}
Let \(y^{\prime }\) be a parameter \(\lambda \). The ode becomes
\begin{align*} -x^{2} \lambda ^{2}-\lambda x +y = 0 \end{align*}

Isolating \(y\) gives

\begin{align*} y&=x^{2} \lambda ^{2}+\lambda x\\ &=x^{2} \lambda ^{2}+\lambda x\\ &=F \left (x , \lambda \right ) \end{align*}

Now we generate an ode in \(x \left (\lambda \right )\) using

\begin{align*} \frac {d}{d \lambda }x \left (\lambda \right ) &= \frac { \frac {\partial F}{\partial \lambda }} { \lambda -\frac {\partial F}{\partial x} } \\ &= -\frac {2 \lambda \,x^{2}+x}{2 \lambda ^{2} x}\\ &= \frac {-2 \lambda x \left (\lambda \right )-1}{2 \lambda ^{2}} \end{align*}

Which is now solved for \(x\).

Entering first order ode linear solverIn canonical form a linear first order is

\begin{align*} \frac {d}{d \lambda }x \left (\lambda \right ) + q(\lambda )x \left (\lambda \right ) &= p(\lambda ) \end{align*}

Comparing the above to the given ode shows that

\begin{align*} q(\lambda ) &=\frac {1}{\lambda }\\ p(\lambda ) &=-\frac {1}{2 \lambda ^{2}} \end{align*}

The integrating factor \(\mu \) is

\begin{align*} \mu &= e^{\int {q\,d\lambda }}\\ &= {\mathrm e}^{\int \frac {1}{\lambda }d \lambda }\\ &= \lambda \end{align*}

The ode becomes

\begin{align*} \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\lambda }}\left ( \mu x\right ) &= \mu p \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\lambda }}\left ( \mu x\right ) &= \left (\mu \right ) \left (-\frac {1}{2 \lambda ^{2}}\right ) \\ \frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}\lambda }} \left (\lambda x\right ) &= \left (\lambda \right ) \left (-\frac {1}{2 \lambda ^{2}}\right ) \\ \mathrm {d} \left (\lambda x\right ) &= \left (-\frac {1}{2 \lambda }\right )\, \mathrm {d} \lambda \\ \end{align*}
Integrating gives
\begin{align*} \lambda x&= \int {-\frac {1}{2 \lambda } \,d\lambda } \\ &=-\frac {\ln \left (\lambda \right )}{2} + c_1 \end{align*}

Dividing throughout by the integrating factor \(\lambda \) gives the final solution

\[ x \left (\lambda \right ) = \frac {-\frac {\ln \left (\lambda \right )}{2}+c_1}{\lambda } \]
Now that we found solution \(x\) we have two equations with parameter \(\lambda \). They are
\begin{align*} y &= x^{2} \lambda ^{2}+\lambda x \\ x &= \frac {-\frac {\ln \left (\lambda \right )}{2}+c_1}{\lambda } \\ \end{align*}
Eliminating \(\lambda \) gives the solution for \(y\).
\[ 2 \operatorname {RootOf}\left (-y+\textit {\_Z} +\textit {\_Z}^{2}\right )+\ln \left (\frac {\operatorname {RootOf}\left (-y+\textit {\_Z} +\textit {\_Z}^{2}\right )}{x}\right )-2 c_1 \]
Which can be written as
\begin{align*} -y+{\mathrm e}^{-\operatorname {LambertW}\left (2 x \,{\mathrm e}^{2 c_1}\right )+2 c_1} x +{\mathrm e}^{-2 \operatorname {LambertW}\left (2 x \,{\mathrm e}^{2 c_1}\right )+4 c_1} x^{2} &= 0 \\ \end{align*}
Simplifying the above gives
\begin{align*} y &= \frac {\operatorname {LambertW}\left (2 x \,{\mathrm e}^{2 c_1}\right ) \left (\operatorname {LambertW}\left (2 x \,{\mathrm e}^{2 c_1}\right )+2\right )}{4} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= \frac {\operatorname {LambertW}\left (2 x \,{\mathrm e}^{2 c_1}\right ) \left (\operatorname {LambertW}\left (2 x \,{\mathrm e}^{2 c_1}\right )+2\right )}{4} \\ \end{align*}
2.1.23.3 Maple. Time used: 0.115 (sec). Leaf size: 97
ode:=y(x) = diff(y(x),x)*x+x^2*diff(y(x),x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \ln \left (x \right )-\sqrt {1+4 y}-\frac {\ln \left (\sqrt {1+4 y}-1\right )}{2}+\frac {\ln \left (1+\sqrt {1+4 y}\right )}{2}-\frac {\ln \left (y\right )}{2}-c_1 &= 0 \\ \ln \left (x \right )+\sqrt {1+4 y}+\frac {\ln \left (\sqrt {1+4 y}-1\right )}{2}-\frac {\ln \left (1+\sqrt {1+4 y}\right )}{2}-\frac {\ln \left (y\right )}{2}-c_1 &= 0 \\ \end{align*}

Maple trace

Methods for first order ODEs: 
-> Solving 1st order ODE of high degree, 1st attempt 
trying 1st order WeierstrassP solution for high degree ODE 
trying 1st order WeierstrassPPrime solution for high degree ODE 
trying 1st order JacobiSN solution for high degree ODE 
trying 1st order ODE linearizable_by_differentiation 
trying differential order: 1; missing variables 
trying dAlembert 
trying simple symmetries for implicit equations 
<- symmetries for implicit equations successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y \left (x \right )=x \left (\frac {d}{d x}y \left (x \right )\right )+x^{2} \left (\frac {d}{d x}y \left (x \right )\right )^{2} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \left [\frac {d}{d x}y \left (x \right )=\frac {-\frac {1}{2}-\frac {\sqrt {1+4 y \left (x \right )}}{2}}{x}, \frac {d}{d x}y \left (x \right )=\frac {-\frac {1}{2}+\frac {\sqrt {1+4 y \left (x \right )}}{2}}{x}\right ] \\ \square & {} & \textrm {Solve the equation}\hspace {3pt} \frac {d}{d x}y \left (x \right )=\frac {-\frac {1}{2}-\frac {\sqrt {1+4 y \left (x \right )}}{2}}{x} \\ {} & \circ & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d x}y \left (x \right )}{-\frac {1}{2}-\frac {\sqrt {1+4 y \left (x \right )}}{2}}=\frac {1}{x} \\ {} & \circ & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {\frac {d}{d x}y \left (x \right )}{-\frac {1}{2}-\frac {\sqrt {1+4 y \left (x \right )}}{2}}d x =\int \frac {1}{x}d x +\textit {\_C1} \\ {} & \circ & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\ln \left (y \left (x \right )\right )}{2}-\sqrt {1+4 y \left (x \right )}-\frac {\ln \left (-1+\sqrt {1+4 y \left (x \right )}\right )}{2}+\frac {\ln \left (1+\sqrt {1+4 y \left (x \right )}\right )}{2}=\ln \left (x \right )+\textit {\_C1} \\ \square & {} & \textrm {Solve the equation}\hspace {3pt} \frac {d}{d x}y \left (x \right )=\frac {-\frac {1}{2}+\frac {\sqrt {1+4 y \left (x \right )}}{2}}{x} \\ {} & \circ & \textrm {Separate variables}\hspace {3pt} \\ {} & {} & \frac {\frac {d}{d x}y \left (x \right )}{-\frac {1}{2}+\frac {\sqrt {1+4 y \left (x \right )}}{2}}=\frac {1}{x} \\ {} & \circ & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \frac {\frac {d}{d x}y \left (x \right )}{-\frac {1}{2}+\frac {\sqrt {1+4 y \left (x \right )}}{2}}d x =\int \frac {1}{x}d x +\textit {\_C1} \\ {} & \circ & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & \frac {\ln \left (y \left (x \right )\right )}{2}+\sqrt {1+4 y \left (x \right )}+\frac {\ln \left (-1+\sqrt {1+4 y \left (x \right )}\right )}{2}-\frac {\ln \left (1+\sqrt {1+4 y \left (x \right )}\right )}{2}=\ln \left (x \right )+\textit {\_C1} \\ \bullet & {} & \textrm {Set of solutions}\hspace {3pt} \\ {} & {} & \left \{\frac {\ln \left (y \left (x \right )\right )}{2}-\sqrt {1+4 y \left (x \right )}-\frac {\ln \left (-1+\sqrt {1+4 y \left (x \right )}\right )}{2}+\frac {\ln \left (1+\sqrt {1+4 y \left (x \right )}\right )}{2}=\ln \left (x \right )+\mathit {C1} , \frac {\ln \left (y \left (x \right )\right )}{2}+\sqrt {1+4 y \left (x \right )}+\frac {\ln \left (-1+\sqrt {1+4 y \left (x \right )}\right )}{2}-\frac {\ln \left (1+\sqrt {1+4 y \left (x \right )}\right )}{2}=\ln \left (x \right )+\mathit {C1} \right \} \end {array} \]
2.1.23.4 Mathematica. Time used: 12.805 (sec). Leaf size: 72
ode=y[x]==x*D[y[x],x]+x^2*(D[y[x],x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} W\left (-e^{-1-2 c_1} x\right ) \left (2+W\left (-e^{-1-2 c_1} x\right )\right )\\ y(x)&\to \frac {1}{4} W\left (e^{-1+2 c_1} x\right ) \left (2+W\left (e^{-1+2 c_1} x\right )\right )\\ y(x)&\to 0 \end{align*}
2.1.23.5 Sympy. Time used: 0.448 (sec). Leaf size: 65
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*Derivative(y(x), x)**2 - x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ \frac {\sqrt {4 y{\left (x \right )} + 1}}{2} + \frac {\log {\left (x \right )}}{2} - \frac {\log {\left (\sqrt {4 y{\left (x \right )} + 1} + 1 \right )}}{2} = C_{1}, \ - \frac {\sqrt {4 y{\left (x \right )} + 1}}{2} + \frac {\log {\left (x \right )}}{2} - \frac {\log {\left (\sqrt {4 y{\left (x \right )} + 1} - 1 \right )}}{2} = C_{1}\right ] \]