12.6.8 problem 8

Internal problem ID [1687]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Section 2.5 Page 79
Problem number : 8
Date solved : Tuesday, March 04, 2025 at 01:32:21 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.123 (sec). Leaf size: 51
ode:=2*x+y(x)+(2*y(x)+2*x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \left (\sqrt {7}\, \tan \left (\operatorname {RootOf}\left (-3 \sqrt {7}\, \ln \left (2\right )+\sqrt {7}\, \ln \left (\sec \left (\textit {\_Z} \right )^{2} x^{2}\right )+\sqrt {7}\, \ln \left (7\right )+2 \sqrt {7}\, c_1 +2 \textit {\_Z} \right )\right )-3\right )}{4} \]
Mathematica. Time used: 0.066 (sec). Leaf size: 62
ode=(2*x+y[x])+(2*y[x]+2*x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {\arctan \left (\frac {\frac {4 y(x)}{x}+3}{\sqrt {7}}\right )}{2 \sqrt {7}}+\frac {1}{4} \log \left (\frac {2 y(x)^2}{x^2}+\frac {3 y(x)}{x}+2\right )=-\frac {\log (x)}{2}+c_1,y(x)\right ] \]
Sympy. Time used: 3.591 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (2*x + 2*y(x))*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\sqrt {1 + \frac {3 y{\left (x \right )}}{2 x} + \frac {y^{2}{\left (x \right )}}{x^{2}}} \right )} - \frac {\sqrt {7} \operatorname {atan}{\left (\frac {\sqrt {7} \left (3 + \frac {4 y{\left (x \right )}}{x}\right )}{7} \right )}}{7} \]