4.5.5 problem 5

Internal problem ID [1197]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.6. Page 100
Problem number : 5
Date solved : Tuesday, September 30, 2025 at 04:28:05 AM
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.012 (sec). Leaf size: 77
ode:=diff(y(x),x) = (-a*x-b*y(x))/(b*x+c*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-b x c_1 +\sqrt {-x^{2} \left (a c -b^{2}\right ) c_1^{2}+c}}{c c_1} \\ y &= \frac {-b x c_1 -\sqrt {-x^{2} \left (a c -b^{2}\right ) c_1^{2}+c}}{c c_1} \\ \end{align*}
Mathematica. Time used: 17.863 (sec). Leaf size: 139
ode=D[y[x],x]== (-a*x-b*y[x])/(b*x+c*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {b x+\sqrt {-a c x^2+b^2 x^2+c e^{2 c_1}}}{c}\\ y(x)&\to \frac {-b x+\sqrt {b^2 x^2+c \left (-a x^2+e^{2 c_1}\right )}}{c}\\ y(x)&\to -\frac {\sqrt {x^2 \left (b^2-a c\right )}+b x}{c}\\ y(x)&\to \frac {\sqrt {x^2 \left (b^2-a c\right )}-b x}{c} \end{align*}
Sympy. Time used: 1.164 (sec). Leaf size: 49
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)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (- b + \sqrt {\frac {C_{1} c}{x^{2}} - a c + b^{2}}\right )}{c}, \ y{\left (x \right )} = \frac {x \left (- b - \sqrt {\frac {C_{1} c}{x^{2}} - a c + b^{2}}\right )}{c}\right ] \]