62.12.13 problem Ex 14

Internal problem ID [12788]
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 19. Summary. Page 29
Problem number : Ex 14
Date solved : Monday, March 31, 2025 at 07:07:34 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 22
ode:=(-x^2+1)*diff(y(x),x)-x*y(x) = a*x*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{\sqrt {x -1}\, \sqrt {x +1}\, c_1 -a} \]
Mathematica. Time used: 0.352 (sec). Leaf size: 57
ode=(1-x^2)*D[y[x],x]-x*y[x]==a*x*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{K[1] (a K[1]+1)}dK[1]\&\right ]\left [-\frac {1}{2} \log \left (1-x^2\right )+c_1\right ] \\ y(x)\to 0 \\ y(x)\to -\frac {1}{a} \\ \end{align*}
Sympy. Time used: 1.482 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x*y(x)**2 - x*y(x) + (1 - x**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {- C_{1} + \sqrt {C_{1} \left (x^{2} - 1\right )}}{a \left (C_{1} - x^{2} + 1\right )}, \ y{\left (x \right )} = \frac {C_{1} + \sqrt {C_{1} \left (x^{2} - 1\right )}}{a \left (- C_{1} + x^{2} - 1\right )}\right ] \]