15.8.3 problem 3

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

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

Maple. Time used: 0.015 (sec). Leaf size: 24
ode:=2*x+y(x)-(x-2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (\operatorname {RootOf}\left (\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )-\textit {\_Z} +2 \ln \left (x \right )+2 c_{1} \right )\right ) x \]
Mathematica. Time used: 0.036 (sec). Leaf size: 32
ode=(2*x+y[x])-(x-2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\log \left (\frac {y(x)^2}{x^2}+1\right )-\arctan \left (\frac {y(x)}{x}\right )=-2 \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 0.989 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x - (x - 2*y(x))*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\sqrt {1 + \frac {y^{2}{\left (x \right )}}{x^{2}}} \right )} + \frac {\operatorname {atan}{\left (\frac {y{\left (x \right )}}{x} \right )}}{2} \]