23.1.627 problem 621

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

\begin{align*} \left (x +y\right )^{2} y^{\prime }&=\left (2+x +y\right )^{2} \end{align*}
Maple. Time used: 0.105 (sec). Leaf size: 28
ode:=(x+y(x))^2*diff(y(x),x) = (2+x+y(x))^2; 
dsolve(ode,y(x), singsol=all);
 
\[ -c_1 +x -y+\ln \left (\left (x +y\right )^{2}+2 x +2 y+2\right ) = 0 \]
Mathematica. Time used: 0.11 (sec). Leaf size: 31
ode=(x+y[x])^2*D[y[x],x]== (2+x+y[x])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [y(x)-\log \left ((y(x)+x+2)^2-2 (y(x)+x+2)+2\right )-x=c_1,y(x)\right ] \]
Sympy. Time used: 1.049 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x))**2*Derivative(y(x), x) - (x + y(x) + 2)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x}{2} - \frac {y{\left (x \right )}}{2} + \frac {\log {\left (2 x + \left (- x - y{\left (x \right )}\right )^{2} + 2 y{\left (x \right )} + 2 \right )}}{2} = 0 \]