60.1.152 problem 155

Internal problem ID [10166]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 155
Date solved : Wednesday, March 05, 2025 at 08:34:42 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

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

Maple. Time used: 0.003 (sec). Leaf size: 14
ode:=(x^2-1)*diff(y(x),x)+y(x)^2-2*x*y(x)+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x +\frac {1}{-\operatorname {arctanh}\left (x \right )+c_{1}} \]
Mathematica. Time used: 0.256 (sec). Leaf size: 36
ode=(x^2-1)*D[y[x],x]+ y[x]^2 - 2*x*y[x] + 1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x+\frac {1}{-\int _1^x\frac {1}{1-K[1]^2}dK[1]+c_1} \\ y(x)\to x \\ \end{align*}
Sympy. Time used: 0.459 (sec). Leaf size: 134
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) + (x**2 - 1)*Derivative(y(x), x) + y(x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- 3 x^{5} \log {\left (x - 1 \right )} + 3 x^{5} \log {\left (x + 1 \right )} + 10 x^{4} + 6 x^{3} \log {\left (x - 1 \right )} - 6 x^{3} \log {\left (x + 1 \right )} - 22 x^{2} - 3 x \log {\left (x - 1 \right )} + 3 x \log {\left (x + 1 \right )} + 16}{- 3 x^{4} \log {\left (x - 1 \right )} + 3 x^{4} \log {\left (x + 1 \right )} - 6 x^{3} + 6 x^{2} \log {\left (x - 1 \right )} - 6 x^{2} \log {\left (x + 1 \right )} + 10 x - 3 \log {\left (x - 1 \right )} + 3 \log {\left (x + 1 \right )}} \]