29.24.5 problem 667

Internal problem ID [5258]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 24
Problem number : 667
Date solved : Sunday, March 30, 2025 at 07:32:12 AM
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*(a+y(x))^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.567 (sec). Leaf size: 48
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 [a \log \left (\text {$\#$1}^2+a^2\right )+\text {$\#$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.983 (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} \]