15.8.18 problem 18

Internal problem ID [3021]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 18
Date solved : Tuesday, March 04, 2025 at 03:44:35 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.009 (sec). Leaf size: 29
ode:=(3*x+4*y(x))*diff(y(x),x)+y(x)+2*x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x \left (\tan \left (\operatorname {RootOf}\left (-\ln \left (2\right )+\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+\textit {\_Z} +2 \ln \left (x \right )+2 c_{1} \right )\right )-1\right )}{2} \]
Mathematica. Time used: 0.04 (sec). Leaf size: 41
ode=(3*x+4*y[x])*D[y[x],x]+(y[x]+2*x)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\arctan \left (\frac {2 y(x)}{x}+1\right )+\log \left (\frac {2 y(x)^2}{x^2}+\frac {2 y(x)}{x}+1\right )=-2 \log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 1.519 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (3*x + 4*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 {\frac {1}{2} + \frac {y{\left (x \right )}}{x} + \frac {y^{2}{\left (x \right )}}{x^{2}}} \right )} - \frac {\operatorname {atan}{\left (1 + \frac {2 y{\left (x \right )}}{x} \right )}}{2} \]