80.3.35 problem 38

Internal problem ID [21199]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 38
Date solved : Thursday, October 02, 2025 at 07:26:16 PM
CAS classification : [_separable]

\begin{align*} x y y^{\prime }+1+y^{2}&=0 \end{align*}
Maple. Time used: 0.003 (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.196 (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.291 (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 ] \]