64.4.9 problem 9

Internal problem ID [13219]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.2 (Separable equations). Exercises page 47
Problem number : 9
Date solved : Wednesday, March 05, 2025 at 09:22:52 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.055 (sec). Leaf size: 33
ode:=2*x*y(x)+3*y(x)^2-(2*x*y(x)+x^2)*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.137 (sec). Leaf size: 38
ode=(2*x*y[x]+3*y[x]^2)- (2*x*y[x]+x^2)*D[y[x],x]==0; 
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]=\log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 1.538 (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 ] \]