12.6.11 problem 11

Internal problem ID [1690]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Section 2.5 Page 79
Problem number : 11
Date solved : Saturday, March 29, 2025 at 11:31:50 PM
CAS classification : [_separable]

\begin{align*} \frac {1}{x}+2 x +\left (\frac {1}{y}+2 y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.433 (sec). Leaf size: 56
ode:=1/x+2*x+(1/y(x)+2*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{-x^{2}-c_1} \sqrt {2}}{2 \sqrt {\frac {{\mathrm e}^{-2 x^{2}-2 c_1}}{x^{2} \operatorname {LambertW}\left (\frac {2 \,{\mathrm e}^{-2 x^{2}-2 c_1}}{x^{2}}\right )}}\, x} \]
Mathematica. Time used: 5.84 (sec). Leaf size: 71
ode=(1/x+2*x)+(1/y[x]+2*y[x])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {\sqrt {W\left (\frac {2 e^{-2 x^2+2 c_1}}{x^2}\right )}}{\sqrt {2}} \\ y(x)\to \frac {\sqrt {W\left (\frac {2 e^{-2 x^2+2 c_1}}{x^2}\right )}}{\sqrt {2}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.092 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (2*y(x) + 1/y(x))*Derivative(y(x), x) + 1/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{C_{1} - x^{2} - \frac {W\left (\frac {2 e^{2 C_{1} - 2 x^{2}}}{x^{2}}\right )}{2}}}{x} \]