30.6.26 problem 27

Internal problem ID [7561]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problems. page 79
Problem number : 27
Date solved : Tuesday, September 30, 2025 at 04:51:19 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} 3 x -y-5+\left (x -y+1\right ) y^{\prime }&=0 \end{align*}
Maple. Time used: 0.493 (sec). Leaf size: 77
ode:=3*x-y(x)-5+(x-y(x)+1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {4 c_1 -\operatorname {RootOf}\left (-3 c_1^{2} x^{2}+18 c_1^{2} x -{\mathrm e}^{2 \operatorname {RootOf}\left (3 c_1^{2} x^{2}+{\mathrm e}^{2 \textit {\_Z}} \cosh \left (\textit {\_Z} \sqrt {3}\right )^{2}-18 c_1^{2} x +27 c_1^{2}\right )}-27 c_1^{2}+\textit {\_Z}^{2}\right )}{c_1} \]
Mathematica. Time used: 0.061 (sec). Leaf size: 73
ode=(3*x-y[x]-5)+(x-y[x]+1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {2 \text {arctanh}\left (\frac {y(x)-3 x+5}{\sqrt {3} (-y(x)+x+1)}\right )}{\sqrt {3}}+\log \left (\frac {3 x^2-y(x)^2+8 y(x)-18 x+11}{2 (x-3)^2}\right )+2 \log (x-3)=c_1,y(x)\right ] \]
Sympy. Time used: 22.550 (sec). Leaf size: 54
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*x + (x - y(x) + 1)*Derivative(y(x), x) - y(x) - 5,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x - 3 \right )} = C_{1} - \log {\left (\sqrt [6]{\left (- \sqrt {3} + \frac {y{\left (x \right )} - 4}{x - 3}\right )^{3 - \sqrt {3}}} \sqrt [6]{\left (\sqrt {3} + \frac {y{\left (x \right )} - 4}{x - 3}\right )^{\sqrt {3} + 3}} \right )} \]