23.1.446 problem 436

Internal problem ID [5053]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 436
Date solved : Tuesday, September 30, 2025 at 11:30:31 AM
CAS classification : [_separable]

\begin{align*} \left (1+y\right ) y^{\prime }&=x^{2} \left (1-y\right ) \end{align*}
Maple. Time used: 0.014 (sec). Leaf size: 20
ode:=(1+y(x))*diff(y(x),x) = x^2*(1-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 \operatorname {LambertW}\left (\frac {c_1 \,{\mathrm e}^{-\frac {x^{3}}{6}-\frac {1}{2}}}{2}\right )+1 \]
Mathematica. Time used: 0.074 (sec). Leaf size: 41
ode=(1+y[x])*D[y[x],x]==x^2*(1-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {K[1]+1}{K[1]-1}dK[1]\&\right ]\left [-\frac {x^3}{3}+c_1\right ]\\ y(x)&\to 1 \end{align*}
Sympy. Time used: 6.643 (sec). Leaf size: 180
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*(1 - y(x)) + (y(x) + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = 2 W\left (- \frac {\sqrt [6]{C_{1} e^{- x^{3}}}}{2 e^{\frac {1}{2}}}\right ) + 1, \ y{\left (x \right )} = 2 W\left (\frac {\sqrt [6]{C_{1} e^{- x^{3}}}}{2 e^{\frac {1}{2}}}\right ) + 1, \ y{\left (x \right )} = 2 W\left (\frac {\sqrt [6]{C_{1} e^{- x^{3}}} \left (-1 - \sqrt {3} i\right )}{4 e^{\frac {1}{2}}}\right ) + 1, \ y{\left (x \right )} = 2 W\left (\frac {\sqrt [6]{C_{1} e^{- x^{3}}} \left (-1 + \sqrt {3} i\right )}{4 e^{\frac {1}{2}}}\right ) + 1, \ y{\left (x \right )} = 2 W\left (\frac {\sqrt [6]{C_{1} e^{- x^{3}}} \left (1 - \sqrt {3} i\right )}{4 e^{\frac {1}{2}}}\right ) + 1, \ y{\left (x \right )} = 2 W\left (\frac {\sqrt [6]{C_{1} e^{- x^{3}}} \left (1 + \sqrt {3} i\right )}{4 e^{\frac {1}{2}}}\right ) + 1\right ] \]