85.33.73 problem 74

Internal problem ID [22696]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 74
Date solved : Thursday, October 02, 2025 at 09:10:50 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x +3 y}{x -3 y} \end{align*}
Maple. Time used: 0.150 (sec). Leaf size: 51
ode:=diff(y(x),x) = (3*y(x)+x)/(x-3*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \left (\sqrt {2}\, \tan \left (\operatorname {RootOf}\left (\sqrt {2}\, \ln \left (x^{2} \sec \left (\textit {\_Z} \right )^{2}\right )-\sqrt {2}\, \ln \left (3\right )+\sqrt {2}\, \ln \left (2\right )+2 \sqrt {2}\, c_1 -4 \textit {\_Z} \right )\right )-1\right )}{3} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 58
ode=D[y[x],{x,1}]==(x+3*y[x])/(x-3*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{2} \log \left (\frac {3 y(x)^2}{x^2}+\frac {2 y(x)}{x}+1\right )-\sqrt {2} \arctan \left (\frac {\frac {3 y(x)}{x}+1}{\sqrt {2}}\right )=-\log (x)+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x + 3*y(x))/(x - 3*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded