20.4.20 problem Problem 29(a)

Internal problem ID [3655]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 29(a)
Date solved : Sunday, March 30, 2025 at 02:01:38 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x +a y}{a x -y} \end{align*}

Maple. Time used: 0.194 (sec). Leaf size: 25
ode:=diff(y(x),x) = (x+a*y(x))/(a*x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left (\operatorname {RootOf}\left (-2 \textit {\_Z} a +\ln \left (x^{2} \sec \left (\textit {\_Z} \right )^{2}\right )+2 c_1 \right )\right ) x \]
Mathematica. Time used: 0.04 (sec). Leaf size: 34
ode=D[y[x],x]==(x+a*y[x])/(a*x-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [a \arctan \left (\frac {y(x)}{x}\right )-\frac {1}{2} \log \left (\frac {y(x)^2}{x^2}+1\right )=\log (x)+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (a*y(x) + x)/(a*x - y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out