23.1.626 problem 620

Internal problem ID [5233]
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 : 620
Date solved : Tuesday, September 30, 2025 at 11:56:49 AM
CAS classification : [[_homogeneous, `class C`], _rational]

\begin{align*} \left (x -y\right )^{2} y^{\prime }&=\left (1-x -y\right )^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 47
ode:=(x-y(x))^2*diff(y(x),x) = (1-x-y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{2}-\frac {\operatorname {RootOf}\left (\int _{}^{\textit {\_Z}}\frac {\left (\textit {\_a} +1\right )^{2}}{\textit {\_a}^{3}+3 \textit {\_a}^{2}-\textit {\_a} +1}d \textit {\_a} +\ln \left (2 x -1\right )+c_1 \right ) \left (2 x -1\right )}{2} \]
Mathematica. Time used: 0.102 (sec). Leaf size: 110
ode=(x-y[x])^2*D[y[x],x]== (1-x-y[x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\text {RootSum}\left [-2 \text {$\#$1}^3+4 \text {$\#$1}^2 y(x)-2 \text {$\#$1}^2-8 \text {$\#$1} y(x)^2+8 \text {$\#$1} y(x)-2 \text {$\#$1}+8 y(x)^3-12 y(x)^2+6 y(x)-1\&,\frac {\text {$\#$1}^2 \log (-\text {$\#$1}+y(x)+x-1)}{3 \text {$\#$1}^2-4 \text {$\#$1} y(x)+2 \text {$\#$1}+4 y(x)^2-4 y(x)+1}\&\right ]=c_1,y(x)\right ] \]
Sympy. Time used: 1.090 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - y(x))**2*Derivative(y(x), x) - (x - y(x) + 1)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {3 x}{4} + \frac {\left (x - y{\left (x \right )}\right )^{2}}{4} + \frac {y{\left (x \right )}}{4} + \frac {\log {\left (2 x - 2 y{\left (x \right )} + 1 \right )}}{8} = 0 \]