73.3.19 problem 4.5 (c)

Internal problem ID [14982]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 4. SEPARABLE FIRST ORDER EQUATIONS. Additional exercises. page 90
Problem number : 4.5 (c)
Date solved : Monday, March 31, 2025 at 01:10:06 PM
CAS classification : [_separable]

\begin{align*} y y^{\prime }&=x y^{2}+x \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=-2 \end{align*}

Maple. Time used: 0.092 (sec). Leaf size: 16
ode:=y(x)*diff(y(x),x) = x*y(x)^2+x; 
ic:=y(0) = -2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\sqrt {5 \,{\mathrm e}^{x^{2}}-1} \]
Mathematica. Time used: 6.997 (sec). Leaf size: 20
ode=y[x]*D[y[x],x]==x*y[x]^2+x; 
ic={y[0]==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\sqrt {5 e^{x^2}-1} \]
Sympy. Time used: 0.641 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x)**2 - x + y(x)*Derivative(y(x), x),0) 
ics = {y(0): -2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \sqrt {5 e^{x^{2}} - 1} \]