23.1.315 problem 303

Internal problem ID [4922]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 303
Date solved : Tuesday, September 30, 2025 at 08:58:56 AM
CAS classification : [_separable]

\begin{align*} \left (-x^{2}+1\right ) y^{\prime }&=x y \left (1+a y\right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 22
ode:=(-x^2+1)*diff(y(x),x) = x*y(x)*(1+a*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1}{\sqrt {x -1}\, \sqrt {x +1}\, c_1 -a} \]
Mathematica. Time used: 0.212 (sec). Leaf size: 57
ode=(1-x^2)*D[y[x],x]==x*y[x]*(1+a*y[x]); 
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.012 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-x*(a*y(x) + 1)*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 ] \]