29.12.10 problem 329

Internal problem ID [4929]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 12
Problem number : 329
Date solved : Sunday, March 30, 2025 at 04:15:16 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Riccati]

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

Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=2*x^2*diff(y(x),x)+1+2*x*y(x)-x^2*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tanh \left (-\frac {\ln \left (x \right )}{2}+\frac {c_1}{2}\right )}{x} \]
Mathematica. Time used: 0.886 (sec). Leaf size: 61
ode=2 x^2 D[y[x],x]+1+2 x y[x]- x^2 y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {i \tan \left (\frac {1}{2} i \log (x)+c_1\right )}{x} \\ y(x)\to \frac {-x+e^{2 i \text {Interval}[\{0,\pi \}]}}{x^2+x e^{2 i \text {Interval}[\{0,\pi \}]}} \\ \end{align*}
Sympy. Time used: 0.198 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*y(x)**2 + 2*x**2*Derivative(y(x), x) + 2*x*y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {i \tan {\left (C_{1} + \frac {i \log {\left (x \right )}}{2} \right )}}{x} \]