29.23.14 problem 645

Internal problem ID [5236]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 23
Problem number : 645
Date solved : Sunday, March 30, 2025 at 07:06:45 AM
CAS classification : [_separable]

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

Maple. Time used: 0.033 (sec). Leaf size: 33
ode:=x*(a+y(x))^2*diff(y(x),x) = b*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left (\ln \left (x \right ) b \,{\mathrm e}^{\textit {\_Z}}+c_1 b \,{\mathrm e}^{\textit {\_Z}}-2 \textit {\_Z} a \,{\mathrm e}^{\textit {\_Z}}-{\mathrm e}^{2 \textit {\_Z}}+a^{2}\right )} \]
Mathematica. Time used: 0.43 (sec). Leaf size: 37
ode=x(a+y[x])^2 D[y[x],x]==b y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [-\frac {a^2}{\text {$\#$1}}+2 a \log (\text {$\#$1})+\text {$\#$1}\&\right ][b \log (x)+c_1] \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.543 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-b*y(x)**2 + x*(a + y(x))**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \frac {a^{2}}{y{\left (x \right )}} + 2 a \log {\left (y{\left (x \right )} \right )} - b \log {\left (x \right )} + y{\left (x \right )} = C_{1} \]