23.1.167 problem 167

Internal problem ID [4774]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 167
Date solved : Tuesday, September 30, 2025 at 08:31:07 AM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

\begin{align*} x y^{\prime }&=x^{2}+y \left (1+y\right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 10
ode:=x*diff(y(x),x) = x^2+y(x)*(1+y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (x +c_1 \right ) x \]
Mathematica. Time used: 0.048 (sec). Leaf size: 28
ode=x*D[y[x],x]==x^2+y[x]*(1+y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{K[1]^2+1}dK[1]=x+c_1,y(x)\right ] \]
Sympy. Time used: 0.193 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*Derivative(y(x), x) - (y(x) + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \left (i C_{1} + i e^{2 i x}\right )}{C_{1} - e^{2 i x}} \]