62.2.3 problem Ex 3

Internal problem ID [12734]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 9. Variables searated or separable. Page 13
Problem number : Ex 3
Date solved : Monday, March 31, 2025 at 06:56:41 AM
CAS classification : [_separable]

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

Maple. Time used: 0.014 (sec). Leaf size: 61
ode:=2*(1-y(x)^2)*x*y(x)+(x^2+1)*(1+y(x)^2)*diff(y(x),x) = 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: 0.482 (sec). Leaf size: 62
ode=2*(1-y[x]^2)*x*y[x]+(1+x^2)*(1+y[x]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {K[1]^2+1}{(K[1]-1) K[1] (K[1]+1)}dK[1]\&\right ]\left [\log \left (x^2+1\right )+c_1\right ] \\ y(x)\to -1 \\ y(x)\to 0 \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 11.154 (sec). Leaf size: 71
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(2 - 2*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 ] \]