29.23.7 problem 638

Internal problem ID [5229]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 23
Problem number : 638
Date solved : Tuesday, March 04, 2025 at 08:40:35 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.018 (sec). Leaf size: 21
ode:=x*(1-y(x)^2)*diff(y(x),x) = (x^2+1)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {1}{\sqrt {-\frac {1}{\operatorname {LambertW}\left (-{\mathrm e}^{x^{2}} c_{1} x^{2}\right )}}} \]
Mathematica. Time used: 4.405 (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.904 (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}} \]