29.24.6 problem 668

Internal problem ID [5259]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 24
Problem number : 668
Date solved : Sunday, March 30, 2025 at 07:32:15 AM
CAS classification : [_separable]

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

Maple. Time used: 0.015 (sec). Leaf size: 61
ode:=(x^2+1)*(1+y(x)^2)*diff(y(x),x)+2*x*y(x)*(1-y(x)^2) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {c_1 \,x^{2}}{2}+\frac {c_1}{2}-\frac {\sqrt {4+\left (x^{2}+1\right )^{2} c_1^{2}}}{2} \\ y &= \frac {c_1 \,x^{2}}{2}+\frac {c_1}{2}+\frac {\sqrt {4+\left (x^{2}+1\right )^{2} c_1^{2}}}{2} \\ \end{align*}
Mathematica. Time used: 7.968 (sec). Leaf size: 98
ode=(1+x^2)(1+y[x]^2)D[y[x],x]+2 x y[x](1-y[x]^2)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (-e^{c_1} \left (x^2+1\right )-\sqrt {4+e^{2 c_1} \left (x^2+1\right )^2}\right ) \\ y(x)\to \frac {1}{2} \left (\sqrt {4+e^{2 c_1} \left (x^2+1\right )^2}-e^{c_1} \left (x^2+1\right )\right ) \\ y(x)\to -1 \\ y(x)\to 0 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 12.857 (sec). Leaf size: 71
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*(1 - y(x)**2)*y(x) + (x**2 + 1)*(y(x)**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x^{2} e^{C_{1}}}{2} - \frac {\sqrt {C_{1} x^{4} + 2 C_{1} x^{2} + C_{1} + 4}}{2} + \frac {e^{C_{1}}}{2}, \ y{\left (x \right )} = \frac {x^{2} e^{C_{1}}}{2} + \frac {\sqrt {C_{1} x^{4} + 2 C_{1} x^{2} + C_{1} + 4}}{2} + \frac {e^{C_{1}}}{2}\right ] \]