67.6.1 problem 7.2

Internal problem ID [16427]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 7. The exact form and general integrating fators. Additional exercises. page 141
Problem number : 7.2
Date solved : Thursday, October 02, 2025 at 01:31:30 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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