42.4.20 problem Problem 3.33

Internal problem ID [8848]
Book : THEORY OF DIFFERENTIAL EQUATIONS IN ENGINEERING AND MECHANICS. K.T. CHAU, CRC Press. Boca Raton, FL. 2018
Section : Chapter 3. Ordinary Differential Equations. Section 3.6 Summary and Problems. Page 218
Problem number : Problem 3.33
Date solved : Tuesday, September 30, 2025 at 05:57:46 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

\begin{align*} x y^{\prime }-y&=x^{2}+y^{2} \end{align*}
Maple. Time used: 0.003 (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.049 (sec). Leaf size: 28
ode=x*D[y[x],x]-y[x]==(x^2+y[x]^2); 
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.191 (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}} \]