23.1.624 problem 618

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

\begin{align*} \left (x -y\right )^{2} y^{\prime }&=a^{2} \end{align*}
Maple. Time used: 0.019 (sec). Leaf size: 36
ode:=(x-y(x))^2*diff(y(x),x) = a^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (a \ln \left ({\mathrm e}^{\textit {\_Z}}+2 a \right )-\textit {\_Z} a -2 \,{\mathrm e}^{\textit {\_Z}}+2 c_1 -2 a -2 x \right )}+a +x \]
Mathematica. Time used: 0.102 (sec). Leaf size: 129
ode=(x-y[x])^2 *D[y[x],x]==a^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x\left (\frac {a}{2 (-a+K[1]-y(x))}-\frac {a}{2 (a+K[1]-y(x))}\right )dK[1]+\int _1^{y(x)}\left (-\frac {a}{2 (-a-x+K[2])}+\frac {a}{2 (a-x+K[2])}-\int _1^x\left (\frac {a}{2 (-a+K[1]-K[2])^2}-\frac {a}{2 (a+K[1]-K[2])^2}\right )dK[1]-1\right )dK[2]=c_1,y(x)\right ] \]
Sympy. Time used: 1.048 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a**2 + (x - y(x))**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} - \frac {a \left (\log {\left (- a + x - y{\left (x \right )} \right )} - \log {\left (a + x - y{\left (x \right )} \right )}\right )}{2} + y{\left (x \right )} = 0 \]