23.1.347 problem 333

Internal problem ID [4954]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 333
Date solved : Tuesday, September 30, 2025 at 09:04:13 AM
CAS classification : [[_homogeneous, `class D`], _Riccati]

\begin{align*} 2 x^{2} y^{\prime }&=2 x y+\left (1-x \cot \left (x \right )\right ) \left (x^{2}-y^{2}\right ) \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 21
ode:=2*x^2*diff(y(x),x) = 2*x*y(x)+(1-x*cot(x))*(x^2-y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\tanh \left (\frac {\ln \left (\sin \left (x \right )\right )}{2}-\frac {\ln \left (x \right )}{2}+\frac {c_1}{2}\right ) x \]
Mathematica. Time used: 0.168 (sec). Leaf size: 45
ode=2*x^2*D[y[x],x]==2*x*y[x]+(1-x*Cot[x])*(x^2-y[x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{(K[1]-1) (K[1]+1)}dK[1]=-\frac {\log (x)}{2}+\frac {1}{2} \log (\sin (x))+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**2*Derivative(y(x), x) - 2*x*y(x) - (x**2 - y(x)**2)*(-x/tan(x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out