23.1.675 problem 670

Internal problem ID [5282]
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 : 670
Date solved : Tuesday, September 30, 2025 at 12:06:54 PM
CAS classification : [_separable]

\begin{align*} x^{2} \left (a +y\right )^{2} y^{\prime }&=\left (x^{2}+1\right ) \left (y^{2}+a^{2}\right ) \end{align*}
Maple. Time used: 0.014 (sec). Leaf size: 92
ode:=x^2*(y(x)+a)^2*diff(y(x),x) = (x^2+1)*(y(x)^2+a^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\operatorname {RootOf}\left (\textit {\_Z}^{2} a^{2} x^{2}-2 c_1 \textit {\_Z} a \,x^{2}-2 \textit {\_Z} a \,x^{3}+c_1^{2} x^{2}+2 c_1 \,x^{3}+a^{2} x^{2}+x^{4}-{\mathrm e}^{\textit {\_Z}} x^{2}+2 \textit {\_Z} a x -2 c_1 x -2 x^{2}+1\right ) a x +c_1 x +x^{2}-1}{x} \]
Mathematica. Time used: 0.299 (sec). Leaf size: 59
ode=x^2 (a+y[x])^2 D[y[x],x]==(1+x^2)(a^2+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 {(a+K[1])^2}{a^2+K[1]^2}dK[1]\&\right ]\left [x-\frac {1}{x}+c_1\right ]\\ y(x)&\to -i a\\ y(x)&\to i a \end{align*}
Sympy. Time used: 0.641 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(x**2*(a + y(x))**2*Derivative(y(x), x) - (a**2 + y(x)**2)*(x**2 + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ a \log {\left (a^{2} + y^{2}{\left (x \right )} \right )} - x + y{\left (x \right )} + \frac {1}{x} = C_{1} \]