75.6.31 problem 164

Internal problem ID [16716]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 164
Date solved : Monday, March 31, 2025 at 03:07:35 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.008 (sec). Leaf size: 113
ode:=(x^2+y(x)^2+1)*diff(y(x),x)+x*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {-x^{2}-1-\sqrt {x^{4}+2 x^{2}-4 c_1}} \\ y &= \sqrt {-x^{2}-1+\sqrt {x^{4}+2 x^{2}-4 c_1}} \\ y &= -\sqrt {-x^{2}-1-\sqrt {x^{4}+2 x^{2}-4 c_1}} \\ y &= -\sqrt {-x^{2}-1+\sqrt {x^{4}+2 x^{2}-4 c_1}} \\ \end{align*}
Mathematica. Time used: 2.513 (sec). Leaf size: 146
ode=(x^2+y[x]^2+1)*D[y[x],x]+x*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {-x^2-\sqrt {x^4+2 x^2+1+4 c_1}-1} \\ y(x)\to \sqrt {-x^2-\sqrt {x^4+2 x^2+1+4 c_1}-1} \\ y(x)\to -\sqrt {-x^2+\sqrt {x^4+2 x^2+1+4 c_1}-1} \\ y(x)\to \sqrt {-x^2+\sqrt {x^4+2 x^2+1+4 c_1}-1} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 2.990 (sec). Leaf size: 102
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + (x**2 + y(x)**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {- x^{2} - \sqrt {C_{1} + x^{4} + 2 x^{2}} - 1}, \ y{\left (x \right )} = \sqrt {- x^{2} - \sqrt {C_{1} + x^{4} + 2 x^{2}} - 1}, \ y{\left (x \right )} = - \sqrt {- x^{2} + \sqrt {C_{1} + x^{4} + 2 x^{2}} - 1}, \ y{\left (x \right )} = \sqrt {- x^{2} + \sqrt {C_{1} + x^{4} + 2 x^{2}} - 1}\right ] \]