12.9.45 problem 39 part(c)

Internal problem ID [1801]
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(c)
Date solved : Tuesday, March 04, 2025 at 01:42:36 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=(2*x+1)*(diff(y(x),x)+y(x)^2)-2*y(x)-2*x-3 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{2 x} x +{\mathrm e}^{2 x}-c_1}{{\mathrm e}^{2 x} x +c_1} \]
Mathematica. Time used: 0.373 (sec). Leaf size: 41
ode=(2*x+1)*(D[y[x],x]+y[x]^2)-2*y[x]-(2*x+3)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {e^{2 x+1} (x+1)-c_1}{e^{2 x+1} x+c_1} \\ y(x)\to -1 \\ \end{align*}
Sympy. Time used: 0.374 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + (2*x + 1)*(y(x)**2 + Derivative(y(x), x)) - 2*y(x) - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + x e^{2 x} + e^{2 x}}{- C_{1} + x e^{2 x}} \]