58.7.12 problem 12

Internal problem ID [14667]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Section 2.4. Special integrating factors and transformations. Exercises page 67
Problem number : 12
Date solved : Thursday, October 02, 2025 at 09:49:29 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} 3 x -y-6+\left (x +y+2\right ) y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (2\right )&=-2 \\ \end{align*}
Maple. Time used: 1.400 (sec). Leaf size: 51
ode:=3*x-y(x)-6+(x+y(x)+2)*diff(y(x),x) = 0; 
ic:=[y(2) = -2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -3-\tan \left (\operatorname {RootOf}\left (-3 \sqrt {3}\, \ln \left (\left (x -1\right )^{2} \sec \left (\textit {\_Z} \right )^{2}\right )-3 \sqrt {3}\, \ln \left (3\right )+6 \sqrt {3}\, \ln \left (2\right )+\pi +6 \textit {\_Z} \right )\right ) \sqrt {3}\, \left (x -1\right ) \]
Mathematica. Time used: 0.082 (sec). Leaf size: 90
ode=(3*x-y[x]-6)+(x+y[x]+2)*D[y[x],x]==0; 
ic={y[2]==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {\arctan \left (\frac {-y(x)+3 x-6}{\sqrt {3} (y(x)+x+2)}\right )}{\sqrt {3}}+\log (2)=\frac {1}{2} \log \left (\frac {3 x^2+y(x)^2+6 y(x)-6 x+12}{(x-1)^2}\right )+\log (x-1)+\frac {1}{18} \left (\sqrt {3} \pi +18 \log (2)-9 \log (4)\right ),y(x)\right ] \]
Sympy. Time used: 2.912 (sec). Leaf size: 58
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*x + (x + y(x) + 2)*Derivative(y(x), x) - y(x) - 6,0) 
ics = {y(2): -2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x - 1 \right )} = - \log {\left (\sqrt {3 + \frac {\left (y{\left (x \right )} + 3\right )^{2}}{\left (x - 1\right )^{2}}} \right )} - \frac {\sqrt {3} \operatorname {atan}{\left (\frac {\sqrt {3} \left (y{\left (x \right )} + 3\right )}{3 \left (x - 1\right )} \right )}}{3} + \frac {\sqrt {3} \pi }{18} + \log {\left (2 \right )} \]