64.7.3 problem 3

Internal problem ID [13298]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Section 2.4. Special integrating factors and transformations. Exercises page 67
Problem number : 3
Date solved : Wednesday, March 05, 2025 at 09:41:38 PM
CAS classification : [_rational, [_Abel, `2nd type`, `class B`]]

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

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