29.18.26 problem 502

Internal problem ID [5100]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 18
Problem number : 502
Date solved : Sunday, March 30, 2025 at 06:40:14 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.136 (sec). Leaf size: 48
ode:=(a*x+b*y(x))*diff(y(x),x) = b*x+a*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left ({\mathrm e}^{\operatorname {RootOf}\left ({\mathrm e}^{\textit {\_Z}}-x^{\frac {2 b}{a -b}} {\mathrm e}^{\frac {2 c_1 b +\textit {\_Z} a +\textit {\_Z} b}{a -b}}+2\right )}+1\right ) \]
Mathematica. Time used: 0.044 (sec). Leaf size: 48
ode=(a x+b y[x])D[y[x],x]==b x+a y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{2} (a+b) \log \left (1-\frac {y(x)}{x}\right )+\frac {1}{2} (b-a) \log \left (\frac {y(x)}{x}+1\right )=-b \log (x)+c_1,y(x)\right ] \]
Sympy
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)
 
RecursionError : maximum recursion depth exceeded