23.1.514 problem 504

Internal problem ID [5121]
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 : 504
Date solved : Tuesday, September 30, 2025 at 11:42:46 AM
CAS classification : [[_homogeneous, `class A`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (a x +b y\right ) y^{\prime }+b x +a y&=0 \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 75
ode:=(a*x+b*y(x))*diff(y(x),x)+b*x+a*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-a x c_1 +\sqrt {x^{2} \left (a^{2}-b^{2}\right ) c_1^{2}+b}}{b c_1} \\ y &= \frac {-a x c_1 -\sqrt {x^{2} \left (a^{2}-b^{2}\right ) c_1^{2}+b}}{b c_1} \\ \end{align*}
Mathematica. Time used: 15.75 (sec). Leaf size: 143
ode=(a*x+b*y[x])*D[y[x],x]+b*x+a*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {a x+\sqrt {a^2 x^2-b^2 x^2+b e^{2 c_1}}}{b}\\ y(x)&\to \frac {-a x+\sqrt {a^2 x^2-b^2 x^2+b e^{2 c_1}}}{b}\\ y(x)&\to -\frac {\sqrt {x^2 \left (a^2-b^2\right )}+a x}{b}\\ y(x)&\to \frac {\sqrt {x^2 \left (a^2-b^2\right )}-a x}{b} \end{align*}
Sympy. Time used: 1.084 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*y(x) + b*x + (a*x + b*y(x))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (- a + \sqrt {\frac {C_{1} b}{x^{2}} + a^{2} - b^{2}}\right )}{b}, \ y{\left (x \right )} = \frac {x \left (- a - \sqrt {\frac {C_{1} b}{x^{2}} + a^{2} - b^{2}}\right )}{b}\right ] \]