29.18.25 problem 501

Internal problem ID [5099]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 18
Problem number : 501
Date solved : Sunday, March 30, 2025 at 06:40:09 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.016 (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.904 (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.749 (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 ] \]