29.23.10 problem 641

Internal problem ID [5232]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 23
Problem number : 641
Date solved : Sunday, March 30, 2025 at 07:05:58 AM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

\begin{align*} x \left (1-x^{2}+y^{2}\right ) y^{\prime }+\left (1+x^{2}-y^{2}\right ) y&=0 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 159
ode:=x*(1-x^2+y(x)^2)*diff(y(x),x)+(1+x^2-y(x)^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} \frac {y^{2} \left (x^{2}-1\right )}{x^{2}-y^{2}-1} &= -\frac {x^{2}}{2}+\frac {1}{2} \\ \frac {y^{2} \left (x^{2}-1\right )}{x^{2}-y^{2}-1} &= -\frac {\sqrt {x -1}\, \sqrt {x +1}\, x}{\sqrt {\frac {c_1 \,x^{2}-c_1 +4}{x^{2}-1}}}-\frac {x^{2}}{2}+\frac {1}{2} \\ \frac {y^{2} \left (x^{2}-1\right )}{x^{2}-y^{2}-1} &= \frac {\sqrt {x -1}\, \sqrt {x +1}\, x}{\sqrt {\frac {c_1 \,x^{2}-c_1 +4}{x^{2}-1}}}-\frac {x^{2}}{2}+\frac {1}{2} \\ \end{align*}
Mathematica. Time used: 1.463 (sec). Leaf size: 106
ode=x(1-x^2+y[x]^2)D[y[x],x]+(1+x^2-y[x]^2)y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {-\sqrt {x^2-4 c_1 x^2+4 c_1{}^2}+x-2 c_1 x}{2 c_1} \\ y(x)\to \frac {\sqrt {x^2-4 c_1 x^2+4 c_1{}^2}+x-2 c_1 x}{2 c_1} \\ y(x)\to \text {Indeterminate} \\ y(x)\to -x-1 \\ y(x)\to 1-x \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(-x**2 + y(x)**2 + 1)*Derivative(y(x), x) + (x**2 - y(x)**2 + 1)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out