62.10.2 problem Ex 2

Internal problem ID [12760]
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 : Wednesday, March 05, 2025 at 08:26:23 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x)*G(y),0]`]]

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

Maple. Time used: 0.008 (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.155 (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: 1.079 (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 \]