73.2.10 problem 3.4 j

Internal problem ID [14962]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 3. Some basics about First order equations. Additional exercises. page 63
Problem number : 3.4 j
Date solved : Monday, March 31, 2025 at 01:09:02 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.002 (sec). Leaf size: 62
ode:=diff(y(x),x)+(8-x)*y(x)-y(x)^2 = -8*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {8 i \sqrt {\pi }\, {\mathrm e}^{-32} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (x +8\right )}{2}\right )+2 \,{\mathrm e}^{\frac {x \left (x +16\right )}{2}}+16 c_1}{i \sqrt {\pi }\, {\mathrm e}^{-32} \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (x +8\right )}{2}\right )+2 c_1} \]
Mathematica. Time used: 0.357 (sec). Leaf size: 88
ode=D[y[x],x]+(8-x)*y[x]-y[x]^2==-8*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 8+\frac {e^{\frac {1}{2} x (x+16)}}{-\int _1^xe^{\frac {1}{2} K[1] (K[1]+16)}dK[1]+c_1} \\ y(x)\to 8 \\ y(x)\to 8-\frac {e^{\frac {1}{2} x (x+16)}}{\int _1^xe^{\frac {1}{2} K[1] (K[1]+16)}dK[1]} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(8*x + (8 - x)*y(x) - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : bad operand type for unary -: list