10.5.6 problem 6

Internal problem ID [1198]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.6. Page 100
Problem number : 6
Date solved : Thursday, March 13, 2025 at 03:54:20 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.229 (sec). Leaf size: 47
ode:=diff(y(x),x) = (-a*x+b*y(x))/(b*x-c*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {RootOf}\left (c \,\textit {\_Z}^{2}-a -{\mathrm e}^{\operatorname {RootOf}\left ({\mathrm e}^{\textit {\_Z}} \cosh \left (\frac {\sqrt {a c}\, \left (2 c_1 +\textit {\_Z} +2 \ln \left (x \right )\right )}{2 b}\right )^{2}+a \right )}\right ) x \]
Mathematica. Time used: 0.07 (sec). Leaf size: 58
ode=D[y[x],x] == (-a*x+b*y[x])/(b*x-c*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [-\frac {b \text {arctanh}\left (\frac {\sqrt {c} y(x)}{\sqrt {a} x}\right )}{\sqrt {a} \sqrt {c}}-\frac {1}{2} \log \left (\frac {c y(x)^2}{x^2}-a\right )=\log (x)+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq((a*x - b*y(x))/(b*x - c*y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded