75.12.23 problem 297

Internal problem ID [16818]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 12. Miscellaneous problems. Exercises page 93
Problem number : 297
Date solved : Monday, March 31, 2025 at 03:22:54 PM
CAS classification : [_separable]

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

Maple. Time used: 0.119 (sec). Leaf size: 2397
ode:=(x-1)*(y(x)^2-y(x)+1) = (-1+y(x))*(x^2+x+1)*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ \text {Expression too large to display} \]
Mathematica. Time used: 0.425 (sec). Leaf size: 77
ode=((x-1)*(y[x]^2-y[x]+1))==((y[x]-1)*(x^2+x+1))*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {K[1]-1}{K[1]^2-K[1]+1}dK[1]\&\right ]\left [\int _1^x\frac {K[2]-1}{K[2]^2+K[2]+1}dK[2]+c_1\right ] \\ y(x)\to \sqrt [3]{-1} \\ y(x)\to -(-1)^{2/3} \\ \end{align*}
Sympy. Time used: 0.887 (sec). Leaf size: 65
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 1)*(y(x)**2 - y(x) + 1) - (y(x) - 1)*(x**2 + x + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \frac {\log {\left (x^{2} + x + 1 \right )}}{2} + \frac {\log {\left (y^{2}{\left (x \right )} - y{\left (x \right )} + 1 \right )}}{2} + \sqrt {3} \operatorname {atan}{\left (\frac {\sqrt {3} \left (2 x + 1\right )}{3} \right )} - \frac {\sqrt {3} \operatorname {atan}{\left (\frac {\sqrt {3} \left (2 y{\left (x \right )} - 1\right )}{3} \right )}}{3} = C_{1} \]