10.6.5 problem 5

Internal problem ID [1222]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 5
Date solved : Saturday, March 29, 2025 at 10:48:06 PM
CAS classification : [_rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.003 (sec). Leaf size: 59
ode:=diff(y(x),x) = (-1-2*x*y(x)-y(x)^2)/(x^2+2*x*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-x^{2}+\sqrt {x \left (x^{3}-4 c_1 -4 x \right )}}{2 x} \\ y &= \frac {-x^{2}-\sqrt {x \left (x^{3}-4 c_1 -4 x \right )}}{2 x} \\ \end{align*}
Mathematica. Time used: 0.512 (sec). Leaf size: 67
ode=D[y[x],x] == (-1-2*x*y[x]-y[x]^2)/(x^2+2*x*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {x^2+\sqrt {x \left (x^3-4 x+4 c_1\right )}}{2 x} \\ y(x)\to \frac {-x^2+\sqrt {x \left (x^3-4 x+4 c_1\right )}}{2 x} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (-2*x*y(x) - y(x)**2 - 1)/(x**2 + 2*x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out