6.9.47 problem 39 part(e)

Internal problem ID [1803]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.6 Reduction or order. Page 253
Problem number : 39 part(e)
Date solved : Tuesday, September 30, 2025 at 05:19:38 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} x^{2} \left (y^{\prime }+y^{2}\right )+x y+x^{2}-\frac {1}{4}&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 40
ode:=x^2*(diff(y(x),x)+y(x)^2)+x*y(x)+x^2-1/4 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-4 c_1 x -{\mathrm e}^{-2 i x}-2 i {\mathrm e}^{-2 i x} x -2 i c_1}{2 x \left ({\mathrm e}^{-2 i x}+2 i c_1 \right )} \]
Mathematica. Time used: 0.245 (sec). Leaf size: 22
ode=x^2*(D[y[x],x]+y[x]^2)+x*y[x]+x^2-1/4==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{2 x}-\tan (x-c_1) \end{align*}
Sympy. Time used: 0.343 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*(y(x)**2 + Derivative(y(x), x)) + x**2 + x*y(x) - 1/4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- 2 i C_{1} x - C_{1} - 2 i x e^{2 i x} + e^{2 i x}}{2 x \left (C_{1} - e^{2 i x}\right )} \]