73.5.6 problem 6.3 (b)

Internal problem ID [15038]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 6. Simplifying through simplifiction. Additional exercises. page 114
Problem number : 6.3 (b)
Date solved : Thursday, March 13, 2025 at 05:30:57 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} y^{\prime }&=\frac {y}{x}+\frac {x}{y} \end{align*}

Maple. Time used: 0.029 (sec). Leaf size: 28
ode:=diff(y(x),x) = y(x)/x+x/y(x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {2 \ln \left (x \right )+c_{1}}\, x \\ y &= -\sqrt {2 \ln \left (x \right )+c_{1}}\, x \\ \end{align*}
Mathematica. Time used: 0.171 (sec). Leaf size: 36
ode=D[y[x],x]==y[x]/x+x/y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x \sqrt {2 \log (x)+c_1} \\ y(x)\to x \sqrt {2 \log (x)+c_1} \\ \end{align*}
Sympy. Time used: 0.282 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x/y(x) + Derivative(y(x), x) - y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x \sqrt {C_{1} + 2 \log {\left (x \right )}}, \ y{\left (x \right )} = x \sqrt {C_{1} + 2 \log {\left (x \right )}}\right ] \]