76.5.23 problem 24

Internal problem ID [17372]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.7 (Substitution Methods). Problems at page 108
Problem number : 24
Date solved : Monday, March 31, 2025 at 04:09:37 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.172 (sec). Leaf size: 53
ode:=(3*x(y)-y)*diff(x(y),y)+9*y-2*x(y) = 0; 
dsolve(ode,x(y), singsol=all);
 
\[ x = \frac {y \left (\sqrt {11}\, \tan \left (\operatorname {RootOf}\left (3 \sqrt {11}\, \ln \left (y^{2} \sec \left (\textit {\_Z} \right )^{2}\right )+3 \sqrt {11}\, \ln \left (11\right )-6 \sqrt {11}\, \ln \left (2\right )+6 \sqrt {11}\, c_1 +2 \textit {\_Z} \right )\right )+1\right )}{2} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 42
ode=(3*x[y]-y)*D[x[y],y]+(9*y-2*x[y])==0; 
ic={}; 
DSolve[{ode,ic},x[y],y,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {x(y)}{y}}\frac {3 K[1]-1}{K[1]^2-K[1]+3}dK[1]=-3 \log (y)+c_1,x(y)\right ] \]
Sympy. Time used: 67.781 (sec). Leaf size: 48
from sympy import * 
y = symbols("y") 
x = Function("x") 
ode = Eq(9*y + (-y + 3*x(y))*Derivative(x(y), y) - 2*x(y),0) 
ics = {} 
dsolve(ode,func=x(y),ics=ics)
 
\[ \log {\left (y \right )} = C_{1} - \log {\left (\sqrt {3 - \frac {x{\left (y \right )}}{y} + \frac {x^{2}{\left (y \right )}}{y^{2}}} \right )} + \frac {\sqrt {11} \operatorname {atan}{\left (\frac {\sqrt {11} \left (1 - \frac {2 x{\left (y \right )}}{y}\right )}{11} \right )}}{33} \]