23.1.646 problem 641

Internal problem ID [5253]
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 : 641
Date solved : Tuesday, September 30, 2025 at 12:03:05 PM
CAS classification : [_separable]

\begin{align*} x \left (1-y^{2}\right ) y^{\prime }&=\left (x^{2}+1\right ) y \end{align*}
Maple. Time used: 0.049 (sec). Leaf size: 45
ode:=x*(1-y(x)^2)*diff(y(x),x) = (x^2+1)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \,{\mathrm e}^{\frac {x^{2}}{2}+c_1}}{\sqrt {-\frac {x^{2} {\mathrm e}^{x^{2}+2 c_1}}{\operatorname {LambertW}\left (-x^{2} {\mathrm e}^{x^{2}+2 c_1}\right )}}} \]
Mathematica. Time used: 2.727 (sec). Leaf size: 64
ode=x(1-y[x]^2)D[y[x],x]==(1+x^2)y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -i \sqrt {W\left (x^2 \left (-e^{x^2+2-2 c_1}\right )\right )}\\ y(x)&\to i \sqrt {W\left (x^2 \left (-e^{x^2+2-2 c_1}\right )\right )}\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.596 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(1 - y(x)**2)*Derivative(y(x), x) - (x**2 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x e^{- C_{1} + \frac {x^{2}}{2} - \frac {W\left (- x^{2} e^{- 2 C_{1} + x^{2}}\right )}{2}} \]