75.4.2 problem 47

Internal problem ID [16625]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 4. Equations with variables separable and equations reducible to them. Exercises page 38
Problem number : 47
Date solved : Thursday, March 13, 2025 at 08:27:23 AM
CAS classification : [_separable]

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

Maple. Time used: 0.005 (sec). Leaf size: 34
ode:=1+y(x)^2+x*y(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {-x^{2}+c_{1}}}{x} \\ y &= -\frac {\sqrt {-x^{2}+c_{1}}}{x} \\ \end{align*}
Mathematica. Time used: 0.343 (sec). Leaf size: 96
ode=(1+y[x]^2)+(x*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {-x^2+e^{2 c_1}}}{x} \\ y(x)\to \frac {\sqrt {-x^2+e^{2 c_1}}}{x} \\ y(x)\to -i \\ y(x)\to i \\ y(x)\to \frac {x}{\sqrt {-x^2}} \\ y(x)\to \frac {\sqrt {-x^2}}{x} \\ \end{align*}
Sympy. Time used: 0.466 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x)*Derivative(y(x), x) + y(x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\frac {C_{1}}{x^{2}} - 1}, \ y{\left (x \right )} = \sqrt {\frac {C_{1}}{x^{2}} - 1}\right ] \]