60.1.296 problem 302

Internal problem ID [10310]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 302
Date solved : Sunday, March 30, 2025 at 03:58:39 PM
CAS classification : [[_homogeneous, `class G`], _rational]

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

Maple. Time used: 0.127 (sec). Leaf size: 137
ode:=(x^2*y(x)^2+x)*diff(y(x),x)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sqrt {2}\, \sqrt {x c_1 \left (2 c_1 +x -\sqrt {x \left (4 c_1 +x \right )}\right )}}{2 c_1 x} \\ y &= \frac {\sqrt {2}\, \sqrt {x c_1 \left (2 c_1 +x -\sqrt {x \left (4 c_1 +x \right )}\right )}}{2 c_1 x} \\ y &= -\frac {\sqrt {2}\, \sqrt {x c_1 \left (2 c_1 +x +\sqrt {x \left (4 c_1 +x \right )}\right )}}{2 c_1 x} \\ y &= \frac {\sqrt {2}\, \sqrt {x c_1 \left (2 c_1 +x +\sqrt {x \left (4 c_1 +x \right )}\right )}}{2 c_1 x} \\ \end{align*}
Mathematica. Time used: 0.297 (sec). Leaf size: 65
ode=(x^2*y[x]^2+x)*D[y[x],x]+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (c_1-\frac {\sqrt {4+c_1{}^2 x}}{\sqrt {x}}\right ) \\ y(x)\to \frac {1}{2} \left (\frac {\sqrt {4+c_1{}^2 x}}{\sqrt {x}}+c_1\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 7.955 (sec). Leaf size: 139
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x**2*y(x)**2 + x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {2} \sqrt {C_{1} + \frac {2}{x} - \frac {\sqrt {C_{1} x^{3} \left (C_{1} x + 4\right )}}{x^{2}}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {2} \sqrt {C_{1} + \frac {2}{x} - \frac {\sqrt {C_{1} x^{3} \left (C_{1} x + 4\right )}}{x^{2}}}}{2}, \ y{\left (x \right )} = - \frac {\sqrt {2} \sqrt {C_{1} + \frac {2}{x} + \frac {\sqrt {C_{1} x^{3} \left (C_{1} x + 4\right )}}{x^{2}}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {2} \sqrt {C_{1} + \frac {2}{x} + \frac {\sqrt {C_{1} x^{3} \left (C_{1} x + 4\right )}}{x^{2}}}}{2}\right ] \]