29.35.17 problem 1050

Internal problem ID [5615]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 35
Problem number : 1050
Date solved : Sunday, March 30, 2025 at 09:20:14 AM
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.173 (sec). Leaf size: 48
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 -x+c_1 e^x-1 \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.385 (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 ] \]