85.14.3 problem 2

Internal problem ID [22519]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. C Exercises at page 41
Problem number : 2
Date solved : Thursday, October 02, 2025 at 08:45:19 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.614 (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.23 (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: 150.246 (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 \]