30.6.38 problem 39

Internal problem ID [7573]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 39
Date solved : Tuesday, September 30, 2025 at 04:54:19 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=3 \\ \end{align*}
Maple. Time used: 0.028 (sec). Leaf size: 15
ode:=diff(y(x),x)-2*y(x)/x = 1/x/y(x); 
ic:=[y(1) = 3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {\sqrt {38 x^{4}-2}}{2} \]
Mathematica. Time used: 3.218 (sec). Leaf size: 22
ode=D[y[x],x]-2*y[x]/x==1/(x*y[x]); 
ic={y[1]==3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sqrt {19 x^4-1}}{\sqrt {2}} \end{align*}
Sympy. Time used: 0.357 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 2*y(x)/x - 1/(x*y(x)),0) 
ics = {y(1): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\sqrt {38 x^{4} - 2}}{2} \]