72.5.25 problem 5

Internal problem ID [19454]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 9 (Integrating Factors). Problems at page 80
Problem number : 5
Date solved : Thursday, October 02, 2025 at 04:28:24 PM
CAS classification : [[_homogeneous, `class G`]]

\begin{align*} y^{\prime }&=\frac {2 y}{x}+\frac {x^{3}}{y}+x \tan \left (\frac {y}{x^{2}}\right ) \end{align*}
Maple. Time used: 0.622 (sec). Leaf size: 38
ode:=diff(y(x),x) = 2*y(x)/x+x^3/y(x)+x*tan(1/x^2*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ \ln \left (x \right )-c_1 -\ln \left (\frac {\cos \left (\frac {y}{x^{2}}\right ) x^{2}+y \sin \left (\frac {y}{x^{2}}\right )}{x^{2}}\right ) = 0 \]
Mathematica. Time used: 0.226 (sec). Leaf size: 36
ode=D[y[x],x]==2*y[x]/x+x^3/y[x]+x*Tan[y[x]/x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [3 \log (x)-\log \left (y(x) \sin \left (\frac {y(x)}{x^2}\right )+x^2 \cos \left (\frac {y(x)}{x^2}\right )\right )=c_1,y(x)\right ] \]
Sympy. Time used: 153.041 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3/y(x) - x*tan(y(x)/x**2) + Derivative(y(x), x) - 2*y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + 2 \log {\left (x \right )} - 2 \log {\left (1 + \frac {y{\left (x \right )} \tan {\left (\frac {y{\left (x \right )}}{x^{2}} \right )}}{x^{2}} \right )} + \log {\left (\tan ^{2}{\left (\frac {y{\left (x \right )}}{x^{2}} \right )} + 1 \right )} = 0 \]