15.2.6 problem 6

Internal problem ID [2876]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 6, page 25
Problem number : 6
Date solved : Sunday, March 30, 2025 at 12:38:03 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} x +y y^{\prime }&=2 y \end{align*}

Maple. Time used: 0.011 (sec). Leaf size: 18
ode:=x+y(x)*diff(y(x),x) = 2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \left (\operatorname {LambertW}\left (c_1 x \right )+1\right )}{\operatorname {LambertW}\left (c_1 x \right )} \]
Mathematica. Time used: 0.116 (sec). Leaf size: 33
ode=x+y[x]*D[y[x],x]==2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\log \left (\frac {y(x)}{x}-1\right )-\frac {1}{\frac {y(x)}{x}-1}=-\log (x)+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + y(x)*Derivative(y(x), x) - 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded