8.3.17 problem 18

Internal problem ID [693]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.4. Separable equations. Page 43
Problem number : 18
Date solved : Tuesday, March 04, 2025 at 11:32:46 AM
CAS classification : [_separable]

\begin{align*} x^{2} y^{\prime }&=1-x^{2}+y^{2}-x^{2} y^{2} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 19
ode:=x^2*diff(y(x),x) = 1-x^2+y(x)^2-x^2*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\tan \left (\frac {c_1 x +x^{2}+1}{x}\right ) \]
Mathematica. Time used: 0.286 (sec). Leaf size: 17
ode=x^2*D[y[x],x] == 1-x^2+y[x]^2-x^2*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\tan \left (x+\frac {1}{x}-c_1\right ) \]
Sympy. Time used: 0.681 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*y(x)**2 + x**2*Derivative(y(x), x) + x**2 - y(x)**2 - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \tan {\left (C_{1} + x + \frac {1}{x} \right )} \]