6.7.1 problem 1(a)

Internal problem ID [1711]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Integrating factors. Section 2.6 Page 91
Problem number : 1(a)
Date solved : Tuesday, September 30, 2025 at 05:16:24 AM
CAS classification : [[_homogeneous, `class G`], _rational, [_Abel, `2nd type`, `class B`]]

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