26.5.24 problem Exercise 11.26, page 97

Internal problem ID [6997]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.26, page 97
Date solved : Tuesday, September 30, 2025 at 04:08:13 PM
CAS classification : [_rational, _Riccati]

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