62.12.4 problem Ex 4

Internal problem ID [12771]
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 : Wednesday, March 05, 2025 at 08:28:18 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} \left (y-x \right )^{2} y^{\prime }&=1 \end{align*}

Maple. Time used: 0.276 (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.156 (sec). Leaf size: 117
ode=(y[x]-x)^2*D[y[x],x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^x\left (\frac {1}{2 (K[1]-y(x)+1)}-\frac {1}{2 (K[1]-y(x)-1)}\right )dK[1]+\int _1^{y(x)}\left (-\int _1^x\left (\frac {1}{2 (K[1]-K[2]+1)^2}-\frac {1}{2 (K[1]-K[2]-1)^2}\right )dK[1]+\frac {1}{2 (-x+K[2]-1)}-\frac {1}{2 (-x+K[2]+1)}+1\right )dK[2]=c_1,y(x)\right ] \]
Sympy. Time used: 1.027 (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 \]