10.6.9 problem 9

Internal problem ID [1226]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Miscellaneous problems, end of chapter 2. Page 133
Problem number : 9
Date solved : Saturday, March 29, 2025 at 10:48:15 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class A`]]

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

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