6.9.44 problem 39 part(b)

Internal problem ID [1800]
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(b)
Date solved : Tuesday, September 30, 2025 at 05:19:30 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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