6.5.41 problem 38

Internal problem ID [1665]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 38
Date solved : Tuesday, September 30, 2025 at 04:48:22 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

\begin{align*} y^{\prime }&=\frac {x y+x^{2}+y^{2}}{x y} \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 23
ode:=diff(y(x),x) = (x*y(x)+x^2+y(x)^2)/x/y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\operatorname {LambertW}\left (-\frac {{\mathrm e}^{-c_1 -1}}{x}\right ) x -x \]
Mathematica. Time used: 1.137 (sec). Leaf size: 31
ode=D[y[x],x]==(x*y[x]+x^2+y[x]^2)/(x*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x \left (1+W\left (-\frac {e^{-1-c_1}}{x}\right )\right )\\ y(x)&\to -x \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x**2 + x*y(x) + y(x)**2)/(x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded