56.10.2 problem Ex 2

Internal problem ID [14120]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 17. Other forms which Integrating factors can be found. Page 25
Problem number : Ex 2
Date solved : Thursday, October 02, 2025 at 09:15:00 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

\begin{align*} \left (x^{2}+2 y+y^{2}\right ) y^{\prime }+2 x&=0 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 17
ode:=2*x+(x^2+y(x)^2+2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \left (x^{2}+y^{2}\right ) {\mathrm e}^{y}+c_1 = 0 \]
Mathematica. Time used: 0.108 (sec). Leaf size: 24
ode=(2*x)+(x^2+y[x]^2+2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x^2 e^{y(x)}+e^{y(x)} y(x)^2=c_1,y(x)\right ] \]
Sympy. Time used: 0.685 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (x**2 + y(x)**2 + 2*y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {x^{2} e^{y{\left (x \right )}}}{2} + \frac {y^{2}{\left (x \right )} e^{y{\left (x \right )}}}{2} = 0 \]