85.69.4 problem 4 (b)

Internal problem ID [22920]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. C Exercises at page 217
Problem number : 4 (b)
Date solved : Thursday, October 02, 2025 at 09:16:36 PM
CAS classification : [_rational, _Riccati]

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