10.6.30 problem 30

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

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

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