23.2.286 problem 305

Internal problem ID [5641]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 2. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF SECOND OR HIGHER DEGREE, page 278
Problem number : 305
Date solved : Tuesday, September 30, 2025 at 01:24:01 PM
CAS classification : [_quadrature]

\begin{align*} {y^{\prime }}^{3}-\left (2 x +y^{2}\right ) {y^{\prime }}^{2}+\left (x^{2}-y^{2}+2 x y^{2}\right ) y^{\prime }-\left (x^{2}-y^{2}\right ) y^{2}&=0 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 35
ode:=diff(y(x),x)^3-(y(x)^2+2*x)*diff(y(x),x)^2+(x^2-y(x)^2+2*x*y(x)^2)*diff(y(x),x)-(x^2-y(x)^2)*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {1}{-x +c_1} \\ y &= -x -1+{\mathrm e}^{x} c_1 \\ y &= x -1+{\mathrm e}^{-x} c_1 \\ \end{align*}
Mathematica. Time used: 0.086 (sec). Leaf size: 60
ode=(D[y[x],x])^3 -(2*x+y[x]^2)*(D[y[x],x])^2 +(x^2 -y[x]^2+2* x* y[x]^2)* D[y[x],x]-(x^2-y[x]^2)*y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{x+c_1}\\ y(x)&\to x+c_1 e^{-x}-1\\ y(x)&\to e^x \left (\int _1^xe^{-K[1]} K[1]dK[1]+c_1\right )\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.241 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-2*x - y(x)**2)*Derivative(y(x), x)**2 - (x**2 - y(x)**2)*y(x)**2 + (x**2 + 2*x*y(x)**2 - y(x)**2)*Derivative(y(x), x) + Derivative(y(x), x)**3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {1}{C_{1} + x}, \ y{\left (x \right )} = C_{1} e^{- x} + x - 1, \ y{\left (x \right )} = C_{1} e^{x} - x - 1\right ] \]