71.6.14 problem 14

Internal problem ID [14349]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.3.2, page 63
Problem number : 14
Date solved : Monday, March 31, 2025 at 12:18:48 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.017 (sec). Leaf size: 71
ode:=diff(y(x),x) = -y(x)*(y(x)+2*x)/x/(2*y(x)+x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-x^{2} c_1^{2}+\sqrt {c_1 x \left (c_1^{3} x^{3}+4\right )}}{2 x \,c_1^{2}} \\ y &= \frac {-x^{2} c_1^{2}-\sqrt {c_1 x \left (c_1^{3} x^{3}+4\right )}}{2 x \,c_1^{2}} \\ \end{align*}
Mathematica. Time used: 0.12 (sec). Leaf size: 40
ode=D[y[x],x]==-y[x]*(2*x+y[x])/(x*(2*y[x]+x)); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {2 K[1]+1}{K[1] (K[1]+1)}dK[1]=-3 \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 1.340 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + (2*x + y(x))*y(x)/(x*(x + 2*y(x))),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (\sqrt {\frac {C_{1}}{x^{3}} + 1} - 1\right )}{2}, \ y{\left (x \right )} = \frac {x \left (- \sqrt {\frac {C_{1}}{x^{3}} + 1} - 1\right )}{2}\right ] \]