56.9.6 problem Ex 6

Internal problem ID [14118]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 16. Integrating factors by inspection. Page 23
Problem number : Ex 6
Date solved : Thursday, October 02, 2025 at 09:14:54 AM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

\begin{align*} x y^{\prime }-y&=x^{2}+y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 10
ode:=-y(x)+x*diff(y(x),x) = x^2+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (x +c_1 \right ) x \]
Mathematica. Time used: 0.112 (sec). Leaf size: 12
ode=x*D[y[x],x]-y[x]==x^2+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x \tan (x+c_1) \end{align*}
Sympy. Time used: 0.195 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*Derivative(y(x), x) - 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^{2 i x}\right )}{C_{1} - e^{2 i x}} \]