56.12.4 problem Ex 4

Internal problem ID [14131]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 19. Summary. Page 29
Problem number : Ex 4
Date solved : Thursday, October 02, 2025 at 09:15:37 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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