25.3.2 problem 4

Internal problem ID [6867]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 4
Problem number : 4
Date solved : Tuesday, September 30, 2025 at 03:58:48 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \frac {1}{x}+\frac {y^{\prime }}{y}+\frac {2}{y}-\frac {2 y^{\prime }}{x}&=0 \end{align*}
Maple. Time used: 0.020 (sec). Leaf size: 51
ode:=1/x+1/y(x)*diff(y(x),x)+2/y(x)-2/x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {c_1 x -\sqrt {5 x^{2} c_1^{2}+4}}{2 c_1} \\ y &= \frac {c_1 x +\sqrt {5 x^{2} c_1^{2}+4}}{2 c_1} \\ \end{align*}
Mathematica. Time used: 0.269 (sec). Leaf size: 102
ode=1/x+1/y[x]*D[y[x],x]+2*(1/y[x]-1/x*D[y[x],x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (x-\sqrt {5 x^2-4 e^{c_1}}\right )\\ y(x)&\to \frac {1}{2} \left (x+\sqrt {5 x^2-4 e^{c_1}}\right )\\ y(x)&\to \frac {1}{2} \left (x-\sqrt {5} \sqrt {x^2}\right )\\ y(x)&\to \frac {1}{2} \left (\sqrt {5} \sqrt {x^2}+x\right ) \end{align*}
Sympy. Time used: 0.837 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x)/y(x) + 2/y(x) - 2*Derivative(y(x), x)/x + 1/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x}{2} - \frac {\sqrt {C_{1} + 5 x^{2}}}{2}, \ y{\left (x \right )} = \frac {x}{2} + \frac {\sqrt {C_{1} + 5 x^{2}}}{2}\right ] \]