72.5.16 problem 4 (e)

Internal problem ID [19445]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 2. First order equations. Section 9 (Integrating Factors). Problems at page 80
Problem number : 4 (e)
Date solved : Thursday, October 02, 2025 at 04:27:23 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

\begin{align*} x y^{\prime }&=y+x^{2}+9 y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 15
ode:=x*diff(y(x),x) = y(x)+x^2+9*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tan \left (3 x +3 c_1 \right ) x}{3} \]
Mathematica. Time used: 0.161 (sec). Leaf size: 17
ode=x*D[y[x],x] == y[x]+x^2+9*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} x \tan (3 (x+c_1)) \end{align*}
Sympy. Time used: 0.204 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*Derivative(y(x), x) - 9*y(x)**2 - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \left (i C_{1} + i e^{6 i x}\right )}{3 \left (C_{1} - e^{6 i x}\right )} \]