76.4.5 problem 5

Internal problem ID [17328]
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.6 (Exact equations and integrating factors). Problems at page 100
Problem number : 5
Date solved : Monday, March 31, 2025 at 03:52:59 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=-\frac {4 x +2 y}{2 x +3 y} \end{align*}

Maple. Time used: 0.017 (sec). Leaf size: 53
ode:=diff(y(x),x) = -(4*x+2*y(x))/(2*x+3*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-2 c_1 x -\sqrt {-8 x^{2} c_1^{2}+3}}{3 c_1} \\ y &= \frac {-2 c_1 x +\sqrt {-8 x^{2} c_1^{2}+3}}{3 c_1} \\ \end{align*}
Mathematica. Time used: 0.51 (sec). Leaf size: 115
ode=D[y[x],x]==-(4*x+2*y[x])/(2*x+3*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{3} \left (-2 x-\sqrt {-8 x^2+3 e^{2 c_1}}\right ) \\ y(x)\to \frac {1}{3} \left (-2 x+\sqrt {-8 x^2+3 e^{2 c_1}}\right ) \\ y(x)\to \frac {2}{3} \left (\sqrt {2} \sqrt {-x^2}-x\right ) \\ y(x)\to -\frac {2}{3} \left (\sqrt {2} \sqrt {-x^2}+x\right ) \\ \end{align*}
Sympy. Time used: 1.276 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + (4*x + 2*y(x))/(2*x + 3*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (\sqrt {\frac {C_{1}}{x^{2}} - 8} - 2\right )}{3}, \ y{\left (x \right )} = \frac {x \left (- \sqrt {\frac {C_{1}}{x^{2}} - 8} - 2\right )}{3}\right ] \]