29.30.38 problem 898

Internal problem ID [5478]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 30
Problem number : 898
Date solved : Sunday, March 30, 2025 at 08:16:42 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _rational]

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

Maple. Time used: 0.132 (sec). Leaf size: 22
ode:=x^2*diff(y(x),x)^2-2*x*diff(y(x),x)*y(x)-x+y(x)*(1+y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= x \\ y &= \sqrt {x}\, c_{1} -\frac {x \,c_{1}^{2}}{4}+x -1 \\ \end{align*}
Mathematica. Time used: 0.124 (sec). Leaf size: 55
ode=x^2 (D[y[x],x])^2-2 x y[x] D[y[x],x]-x+y[x](1+y[x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x+\frac {c_1{}^2 x}{4}-i c_1 \sqrt {x}-1 \\ y(x)\to x+\frac {c_1{}^2 x}{4}+i c_1 \sqrt {x}-1 \\ \end{align*}
Sympy. Time used: 24.749 (sec). Leaf size: 95
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x)**2 - 2*x*y(x)*Derivative(y(x), x) - x + (y(x) + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x e^{C_{1}} + x - 2 \sqrt {- x} e^{\frac {C_{1}}{2}} - 1, \ y{\left (x \right )} = x e^{C_{1}} + x + 2 \sqrt {- x} e^{\frac {C_{1}}{2}} - 1, \ y{\left (x \right )} = x e^{C_{1}} + x - 2 \sqrt {- x} e^{\frac {C_{1}}{2}} - 1, \ y{\left (x \right )} = x e^{C_{1}} + x + 2 \sqrt {- x} e^{\frac {C_{1}}{2}} - 1\right ] \]