87.6.12 problem 12

Internal problem ID [23329]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 53
Problem number : 12
Date solved : Thursday, October 02, 2025 at 09:37:26 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} y^{\prime }&=\frac {x}{y}+\frac {y}{x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=diff(y(x),x) = x/y(x)+y(x)/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.1 (sec). Leaf size: 36
ode=D[y[x],x]==x/y[x]+y[x]/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.179 (sec). Leaf size: 32
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 )} = - \frac {\sqrt {C_{1} + 2 x^{4}}}{2 x}, \ y{\left (x \right )} = \frac {\sqrt {C_{1} + 2 x^{4}}}{2 x}\right ] \]